Code Monkey home page Code Monkey logo

ffmpeg-video-slideshow-scripts's Introduction

FFmpeg Video Slideshow Scripts made-with-bash MIT license Build Status

Configurable shell scripts to create video slideshows from images and videos using FFmpeg.

Features

                  Blurred Background                                                     Moving Text                                                            

                  Object Animation                                                     Photo Collection                                                            

                          Push Film                                                           Zoom In and Pan                                        

                  Blurred Background                                                     Moving Text                                                            

                    Object Animation                                                     Zoom In and Pan                                                    

                              Bars                                                                   Checkerboard                                  

                              Clock                                                                     Collapse                                            

                              Cover                                                                       Expand                                          

                            Fade In                                                                     Push Box                                        

                              Push                                                                         Rotate                                        

                        Sliding Bars                                                         Spin Blur Rotation                                                              

                              Stack                                                                     Wipe In                                           

                              Bars                                                                   Checkerboard                                  

                              Clock                                                                     Collapse                                            

                              Cover                                                                       Expand                                          

                            Fade In                                                                   Moving Bars                                          

                            Push Box                                                                     Push                                        

                          Rotate #1                                                                   Rotate #2                                                  

                        Sliding Bars                                                         Spin Blur Rotation                                                              

                            Wipe In                                                                                                                  

Requirements

  1. ffmpeg 2.8.x or later for all scripts except those listed in 2.
  2. ffmpeg 3.x or later for the following scripts
    • logo_overlay_and_zoom.sh
    • zoom_in_and_pan_with_fade_in_out_one.sh
    • zoom_in_and_pan_with_fade_in_out_two.sh
    • zoom_out_and_pan_with_fade_in_out_one.sh
    • zoom_out_and_pan_with_fade_in_out_two.sh
    • box_in_horizontal.sh
    • box_in_vertical.sh
    • push_box_horizontal.sh
    • push_box_vertical.sh

Please note that Advanced Moving Text script needs FFmpeg to be build with freetype. If you compile FFmpeg from source you need to provide --enable-libfreetype flag on ./configure.

Description

Each script creates a video slideshow using selected files from media folder. Transition scripts implement different transition effects and advanced scripts implement more complex animation like transitions/transformations.

Output of all scripts is an h264 encoded MPEG-4 video.

Customization

  • There is a # SCRIPT OPTIONS section at the top of each script. That section lists all editable parameters for that individual file.

    Below you can see the list of commonly used options. Please note that editable options are not limited to the list below and some scripts define some extra options too.

    • WIDTH: Width of the slideshow, in pixels
    • HEIGHT: Height of the slideshow, in pixels
    • FPS: Frames per second value for the output video
    • IMAGE DURATION: Defines how long each image will be displayed, in seconds
    • TRANSITION DURATION: Defines transition duration, in seconds
    • SCREEN MODE: Defines how images/videos will be fitted. Supported modes are center, crop, scale and blur
    • DIRECTION: Controls transition direction in supported scripts, e.g., left to right, right to left, top to bottom, bottom to top
    • BACKGROUND COLOR: Defines background color. You can use short names like black, white; hex values in 0xYYYYYY format like 0x265074, 0xc4cdd4 or transparent color with #00000000. Refer to color-syntax documentation for the details.
  • # FILE OPTIONS section defines which files will be included in the slideshow and in which order.

    By default, find ../media/*.jpg command is used to select all .jpg files found in the media folder. Order is not defined in this selection. To include files in a specific order, it is possible to append sort at the end of find as in find ../media/*.jpg | sort -r expression.

If you want to learn more about how a specific script works refer to v1.x branch of this repository. Scripts in v1.x branch are not customizable but easier to understand.

Build Status

branch status
main Build Status
v2.x Build Status

Tips

Speed

  • Scripts may take a long time to complete depending on your computer hardware. You can decrease the values of resolution, fps and duration parameters as much as possible to increase the speed.

  • At the end of each script there exists a # XX. END section which defines the output video codec with additional tuning variables. Currently all scripts use H264 encoding using Main profile and level 4.2. This information is given in -profile:v main -level 42 -c:v libx264 part of that section. You can edit this part according to H.264 Video Encoding Guide to increase the speed of the scripts. There are many different tuning parameters defined in that guide and some of them may work for script you used.

    # 11. END
    FULL_SCRIPT+=" -map [video] -vsync 2 -async 1 -rc-lookahead 0 -g 0 -profile:v main -level 42 -c:v libx264 -r ${FPS} ../transition_push_vertical.mp4"
    

Memory

  • Unfortunately some scripts consume too much memory. If you experience memory issues, you may try to split your images/videos into two or more smaller sets, create partial videos for each set and concatenate them with the following command. Although this technique works perfect for some scripts and it won't be possible to guess that video is concatenated, some others will not include a transition between the partial videos and it will be noticeable that final video is concatenated. If you decide to apply this method, please pay attention to that.

    ffmpeg -i part1.mp4 -i part2.mp4 -filter_complex "[0:v][1:v]concat=n=2:v=1:a=0[slideshow]" -map "[slideshow]" full_slidshow.mp4

Versions

  • v1.x branch: Main focus of this branch is to show how ffmpeg filters work and how they can be used to implement a transition or animation. So scripts in this branch are mostly static and hard to customize.

  • v2.x branch: Scripts are optimized/rearranged in order to be customized. They are hard to understand but easy to customize.

Updates

Refer to Changelog for updates.

Known Issues

You may notice the following warnings when executing the scripts. Below you can find their reasons and possible fixes.

1.

[swscaler @ 0x............] deprecated pixel format used, make sure you did set range correctly

This warning is printed because input image streams are decoded with yuvj444p pixel format, which is deprecated. You can safely ignore it, ffmpeg users are not effected from this warning.

2.

[out_0_0 @ 0x............] 100 buffers queued in out_0_0, something may be wrong.s dup=. drop=. speed=...

[Parsed_overlay_80 @ 0x............] [framesync @ 0x............] Buffer queue overflow, dropping.

Statements inside filter_complex are ordered into logical groups to give a better understanding of how they work. In this ordering scheme too many streams/statements wait in the buffer queue, which generates these two warnings. If you want to resolve them change the order of statements inside filter_complex and use new streams immediately after they are created.

3.

Past duration 0.xyz too large

Currently push_box and box_in transitions print this warning. setpts=0.5*PTS statements used inside the scripts cause this. If you know how to remove it safely please submit an issue.

Useful Links

How to prevent shake effect for zoompan filter

Contributing

Feel free to submit issues or pull requests.

License

This project is licensed under the MIT License with the following exceptions.

Images inside media folder are published in the public domain. These images are:

Videos inside media folder are published in the public domain. These videos are:

Snow flake and heart images inside objects folder are downloaded from pngimg.com and pngimg.com, both licensed under the Creative Commons 4.0 BY-NC.

Film strip images inside objects folder are modified from Film Strip by Nevit Dilmen and licensed under Creative Commons Attribution-Share Alike 3.0 Unported.

Falling Sky font inside fonts folder is licensed under the SIL Open Font License (OFL).

See Also

ffmpeg-video-slideshow-scripts's People

Contributors

tanersener avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeg-video-slideshow-scripts's Issues

Transparent mov with transparent png

Hello, I would like to use this library to create a transparent slideshow with transparent png. How can we create a transparent .mov video. I have tried to set BACKGROUND_COLOR to "[email protected]" then add c:v png but did not work. Please help

Multiple Transitions in one video

I want to use multiple effects for one video.
For an instance,
Push-box for image 1, Sliding bars for image 2, Photo collection for image 3, Zoom in for image 4, Zoom out for image 5.
Thanks in Advance

Video removes original sound

when we apply Transition effects on 2 video It's remove original sound of video.

How to prevent this apply Transition effect on 2 videos with original sound of video

Could we mix Zoom in & pan #1 for Image, and Zoom in & pan #2 for Video in one script

Hi Taner,

I bought this https://github.com/tanersener/ffmpeg-video-slideshow-scripts/tree/master/advanced_video_scripts and I love to have it to create video faster. When I use the script, I see these:

  • I like the zoom in & pan of Zoom & Pan with Fade In/Out Transition # 1 for IMAGE, because we can see images move all the times in video
  • I like the zoom in of Zoom & Pan with Fade In/Out Transition # 2 for VIDEO, because if duration of video is long, video will NOT be zoomed in to much so can not see video clearly

When I compare code of 2 scripts, I see the different at here:

diff-one-vs-two

Could we mix like:

  • if Object if IMAGE, FULL_SCRIPT will call part of the zoom & pan in Script # 1
  • if Object if VIDEO, FULL_SCRIPT will call part of the zoom & pan in Script # 2

I try to do this but I can't so would you please help. I think this is your scripts so this will be done easier than I do. Or you can email vohoangan gmail.com

Again, thank you very much.

/script_1.sh: /bin/bash^M: bad interpreter: No such file or directory

Hi Taner,

Thank for sharing your work. I use all your scripts successfully, all scripts generate great video. I bought VSSG and it generates script_1.sh . When I run script1 in same linux box, it shows issue:

bash: ./script_1.sh: /bin/bash^M: bad interpreter: No such file or directory

Head of script is like following:

head-script1-Screenshot 2021-06-30 11 04 32

START_TIME=$SECONDS

VARIABLE DECLARATIONS

declare ELEMENT_0_FRAME_COUNT=100
declare ELEMENT_0_INCLUDES_AUDIO=
declare ELEMENT_0_DURATION=4
declare ELEMENT_1_FRAME_COUNT=100
declare ELEMENT_1_INCLUDES_AUDIO=
declare ELEMENT_1_DURATION=4
eval "null\ffmpeg -hide_banner -i 'demo/1-test-vid2' -map 0: v: 0 -vf fps=25 -f null - 2>/tmp/.mf.counter"
declare ELEMENT_2_FRAME_COUNT=$(cat -v -e /tmp/.mf.counter | sed 's/.^M//' | grep -Eo "frame=." | grep -Eo ".*fps" | sed 's/fps//g;s/frame//g;s/=//g;s/\ //g')
declare ELEMENT_2_INCLUDES_AUDIO=$(null\ffprobe -i 'demo/1-test-vid2' -show_streams -select_streams a -loglevel error)
declare ELEMENT_2_DURATION=$(null\ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 'demo/1-test-vid2.mp4')

Or the simple script has same issue as well.
SIMPLE-SCRIPT-Screenshot 2021-06-30 11 29 32

Would you please help. Thanks

dropped frame

By executing the script you generated, the generated video will drop frames.
I tried to solve it by increasing the FPS, but nothing worked.
Is there a solution?

Argument list too long for video-slideshow-script-generator

I've "bought" the binary and FFMPEG has issues with too many arguments. This is normally because the filter is colossal.

I fixed it by moving the filters into a separate file "filter.txt" and then replacing the environment variables for transition durations with the explicit values, eg. ${ELEMENT_235_FRAME_COUNT} is replaced with the value 180, which can be done for everything by doing a regex replace ELEMENT_(.*?)_FRAME_COUNT with 180, then replacing ${180} with 180. (In my case all durations were identical).

I then used -filter_complex_script filter.txt instead of a call to -filter_complex "${COMPLEX_FILTER}"

I wonder if the generated script could instead:

  • Dump all the values for each duration explicitly into the filter
  • Generate the filter file, eg. cat MASSIVEFILTER > filter.txt
  • Refer to the filter file using filter_complex_script filter.txt
  • Delete the filter file afterwards

Invalid stream specifier:

Invalid stream specifier: stream0out0.
Last message repeated 1 times
Stream specifier 'stream0out0' in filtergraph description [0:v]setpts=PTS-STARTPTS,scale=w='if(gte(iw/ih,1280/720),-1,1280)':h='if(gte(iw/ih,1280/720),720,-1)',crop=1280:720,setsar=sar=1/1,fps=30,loop=loop=3*30:size=1:start=0[stream0out0];[3:v]fps=30,setpts=PTS-STARTPTS,pad=w=1280:h=720:color=#00000000[random0];[stream0out0][random0]overlay=x=5:y=10,setpts=PTS-STARTPTS[random1];[4:v]fps=30,setpts=PTS-STARTPTS,pad=w=1280:h=720:color=#00000000[random2];[random1][random2]overlay=x=15:y=020,setpts=PTS-STARTPTS[random3];[stream0out0]trim=start_frame=0:end_frame=90-0,setpts=PTS-STARTPTS[stream0static];[stream0static]concat=n=1:v=1:a=0[video] matches no streams.
.\script_1.sh: [[: command not found

Background color does not change

How can we change background color to affect all images and translations in: advanced_push_box_horizontal.
For example, if I change background color to green, some black box is still there. It looks like in this gif:
optimize

How to add audio to script

Hello again
Please help me! How to add mp3 file to video background?
IImmediately with one command and a slideshow and audio
Is it possible?

Concatenating video files are always throws an error

I just downloaded scripts bundle v4 and trying to concatenate 2 videos from https://pixabay.com/videos/wheat-wheat-field-nature-17285 and I always got "Error initializing complex filters. Result too large" message.

Scripts I've tried to execute are

  • box*.sh
  • collapse*.sh
  • clock.sh
  • fade*.sh
  • rotate*.sh
  • push*.sh
  • wipe*.sh

Environment

  • Windows 10 64bit
  • 16 GB RAM
  • FFmpeg 4.3.1

Full logs from fade-in script

Video Slideshow Info
------------------------
Media count: 2
Dimension: 1280x720
FPS: 30
Image duration: 4 s
Transition duration: 1 s

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.1 (GCC) 20200726
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'media/field.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2018-07-15T03:19:17.000000Z
  Duration: 00:00:28.23, start: 0.000000, bitrate: 2491 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 2485 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 120k tbc (default)
    Metadata:
      creation_time   : 2018-07-15T03:19:17.000000Z
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'media/field2.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2018-07-15T03:19:17.000000Z
  Duration: 00:00:28.23, start: 0.000000, bitrate: 2491 kb/s
    Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 2485 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 120k tbc (default)
    Metadata:
      creation_time   : 2018-07-15T03:19:17.000000Z
      handler_name    : L-SMASH Video Handler
      encoder         : AVC Coding
Input #2, lavfi, from 'aevalsrc=0':
  Duration: N/A, start: 0.000000, bitrate: 2822 kb/s
    Stream #2:0: Audio: pcm_f64le, 44100 Hz, mono, dbl, 2822 kb/s
[trim @ 0596d640] Value -30.000000 for parameter 'end_frame' out of range [0 - 9.22337e+18]
    Last message repeated 1 times
[trim @ 0596d640] Error setting option end_frame to value -30.
[Parsed_trim_15 @ 0594f840] Error applying options to the filter.
[AVFilterGraph @ 05908640] Error initializing filter 'trim' with args 'start_frame=0:end_frame=-30'
Error initializing complex filters.
Result too large

Script crashes on large image input count

While having roundabout 100 input images for the slideshow, the script crashes once it starts encoding the video file:
frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
./fade_in_one.sh: line 115: 4283 Killed

I think, I might have run out of memory.
Any ideas for a workaround (except for getting more RAM)?

Transitions with fewer images

Hello,
I'm trying to adapt the script to use it with fewer images, after modifying the script, removing the stream that I do not need, I get this error:
Filter split: output1 has a unconnected output

This in my modified script:

ffmpeg -y
-loop 1 -i ../photos/1.jpg
-loop 1 -i ../photos/2.jpg
-filter_complex "
[0:v]setpts=PTS-STARTPTS,scale=w='if(gte(iw/ih,1920/1280),min(iw,1920),-1)':h='if(gte(iw/ih,1920/1280),-1,min(ih,1280))',scale=trunc(iw/2)*2:trunc(ih/2)*2,setsar=sar=1/1,format=rgba,split=2[stream1out1][stream1out2];
[1:v]setpts=PTS-STARTPTS,scale=w='if(gte(iw/ih,1920/1280),min(iw,1920),-1)':h='if(gte(iw/ih,1920/1280),-1,min(ih,1280))',scale=trunc(iw/2)*2:trunc(ih/2)2,setsar=sar=1/1,format=rgba,split=2[stream2out1][stream2out2];
[stream1out1]pad=width=1920:height=1280:x=(1920-iw)/2:y=(1280-ih)/2:color=#00000000,trim=duration=3,select=lte(n,90)[stream1overlaid];
[stream1out2]pad=width=1920:height=1280:x=(1920-iw)/2:y=(1280-ih)/2:color=#00000000,trim=duration=1,select=lte(n,30)[stream1ending];
[stream2out1]pad=width=1920:height=1280:x=(1920-iw)/2:y=(1280-ih)/2:color=#00000000,trim=duration=2,select=lte(n,60)[stream2overlaid];
[stream2out2]pad=width=1920:height=1280:x=(1920-iw)/2:y=(1280-ih)/2:color=#00000000,trim=duration=1,select=lte(n,30),split=2[stream2starting][stream2ending];
[stream1ending][stream2starting]overlay=y='-h+t/1
1280':x=0,select=lte(n,30)[stream2blended];
[stream1overlaid][stream2blended][stream2overlaid]concat=n=3:v=1:a=0,format=yuv420p[video]"
-map [video] -vsync 2 -async 1 -rc-lookahead 0 -g 0 -profile:v main -level 42 -c:v libx264 -r 30 ../transition_wipe_in_vertical.mp4

Do not request new transitions

If you want to or need to implement an animation/transition, please don't ask me to do it for you. Scripts in this repository already shows many different animations/transitions. Look at them and try to implement it yourself.

How Can I Replicate These Scripts in Python

Hi @tanersener

Thanks for the awesome repository. I don't have working knowledge of shell scripts but I have working knowledge of Python. It would be great if you could spare some time to guide me about how can i implement zoom and pan effects in Python.

It would be a great help. Thanks

How to random transition to the slideshow?

Hi

How I can make the random transition to the slideshow?
I already have the release version of "Video Slideshow Script Generator"
And I have many images to add to video slideshow but I don't how to make the random transition.

Thanks!

Invalid chars when running samples

When running advanced_video_scripts/blurred_background.sh, with the 3 sample videos linked to from the README, all downloaded at 1280x720 resolution, the script fails (on Ubuntu w/ ffmpeg 2.8.15 and on Mac as well).

[trim @ 0x229cd00] [Eval @ 0x7ffd128a5220] Invalid chars 'q-0.0sizeN/Atime00' at the end of expression '340.0q-0.0sizeN/Atime00'
[trim @ 0x229cd00] Unable to parse option value "340.0q-0.0sizeN/Atime00"
7775q-0.0sizeN/Atime00" as durationoption value "01.13bitrateN/A
12179q-0.0sizeN/Atime00' @ 0x7ffd128a5220] Invalid chars 'bitrateN/A12179q-0.0sizeN/Atime00' at the end of expression '02.56bitrateN/A
12179q-0.0sizeN/Atime00"e to parse option value "02.56bitrateN/A
16581q-0.0sizeN/Atime00' @ 0x7ffd128a5220] Invalid chars 'bitrateN/A16581q-0.0sizeN/Atime00' at the end of expression '04.03bitrateN/A
16581q-0.0sizeN/Atime00"e to parse option value "04.03bitrateN/A
20781q-0.0sizeN/Atime00' @ 0x7ffd128a5220] Invalid chars 'bitrateN/A20781q-0.0sizeN/Atime00' at the end of expression '05.50bitrateN/A
20781q-0.0sizeN/Atime00"e to parse option value "05.50bitrateN/A
25082q-0.0sizeN/Atime00' @ 0x7ffd128a5220] Invalid chars 'bitrateN/A25082q-0.0sizeN/Atime00' at the end of expression '06.90bitrateN/A
25082q-0.0sizeN/Atime00"e to parse option value "06.90bitrateN/A
636-30'0.0sizeN/Atime00:00:20.00bitrateN/Ae near '00:08.33bitrateN/A
636-30'0.0sizeN/Atime00:00:20.00bitrateN/Azing filter 'trim' with args 'start_frame=0:end_frame=340.0q-0.0sizeN/Atime00:00:01.13bitrateN/A
Error initializing complex filters.
Invalid argument

Slideshow creation failed

Is there any way I can control the image quality of each frame in the result video?

Thank you and your team for all the scripts provided. I've learnt a lot from your work.

But I found that when I improve the quality of my input image and other parameters remain unchanged, the image quality of each frame of the video and the size of the video itself hardly changes. (The image quality improves, and the video size should also be expected to increase a lot in my mind). In fact, I want every frame image quality stay the same as the original image but it seems as if the quality of the image has lost in the process of making the video.

Is there any way to change the image quality of each frame in the generated video to keep it consistent with the original image? (such as adding ffpmeg parameter at the end of the script)

Thank you

Pagination?

Is there any way to implement pagination for images?

such as this:
qq_pic_merged_1693120308553

Include original video audio in slideshow videos

When using the advanced_video_scripts, the source audio is dropped from the result video. It would be nice to have audio kept, and silence be used for photos and source videos w/o an audio track.

Borders on photos

Hello, can someone suggest me how to add white border to each image in a slideshow and how to indent from screen edges, so that no one image touches any edge of the screen. Thank you!

Zoompan duration acording to duration slide

PLease help? how to do zoompan duration acording to duration slide
in this script for example
https://github.com/tanersener/ffmpeg-video-slideshow-scripts/blob/master/advanced_scripts/zoom_in_and_pan_with_fade_in_out.sh
I was try to change parameter d in zoompan, but this didn't work

FULL_SCRIPT+="[stream$((c+1))fadein][stream$((c+1))][stream$((c+1))fadeout]concat=n=3:v=1:a=0,scale=${WIDTH}*5:-1,zoompan=z='min(pzoom+0.002,2)':d=1:${POSITION_FORMULA}:s=${WIDTH}x${HEIGHT}[stream$((c+1))panning];"

I would be very grateful!

More image

Hi bro!

Your codes are awesome. Please show me how to make these codes worked with a folder of image, and the number of images is random.

So thank you!

[Suggest] clock smooth

clock.sh

Suggest code and explain

exp = "((-0.5*H * (Y - 0.5*H))/(0.5*H * sqrt((X - 0.5*W)*(X - 0.5*W) + (Y - 0.5*H)*(Y - 0.5*H))))"
"all_expr=if(lt(T,${TRANSITION_DURATION}),if(lte(if(gte(X,W/2),acos(${exp}),2*PI-acos(${exp})),T*2*PI/${TRANSITION_DURATION}),A,B),B)"

Test Result

How to change zoom scale

Hello!
How to change zoom scale in zoom_in_and_pan_with_fade_in_out_one script?
Do you can do it in variable in settings?

P.S. Do you can do all transitions in one script with random choice? It would be great

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.