ffmpeg merge images with first image duration -


i'm try merge images in mp4 ffmpeg. with:

ffmpeg -r 25 -i %06d.jpg -s 480x360 -vcodec libx264 /output.mp4 

the first image must have duration of 3 seconds , others must have framerate of 25.

i know can set duration of image:

-loop 1 -t 3 -i 000000.jpg-s 480x360 -vcodec libx264 output.mp4 

but how can merge 2 things?? first image of 3 seconds , others image 25 fps in 1 mp4 output??

thank you

i suggest create 2 individual video files separately , join them after. can try concat methods available here. following simple concat using filter_complex

ffmpeg -i input_video1 -i input_video2 -filter_complex " [0:0][0:1][1:0][1:1]concat=n=2:v=1:a=1[outv][outa]" -map [outv] -map [outa] -c:v libx264 output.mp4 

if images not in same dimensions may need scale them. 2 videos may have different sar values , need adjust them accordingly using setsar. feel free change video , audio codecs depending on need of output format need re-encode this.

hope helps!


Comments