overlay - FFmpeg Slideshow + Audio + Watermark + Maintain Aspect Ratio -


i'm trying make slideshow pictures along existing mp3 (copied). picture dimensions differ, want video output 16:9 aspect ratio , 3840x2160. want watermark. important pictures not stretched.

i tried code...

ffmpeg -y -framerate 1/1.5 -i "pics/%03d.jpg" -i audio.mp3 -c:v libx264 -r 24 -preset veryfast -tune stillimage -c:a copy -pix_fmt yuv420p -aspect 16:9 -filter_complex "scale=iw*min(3840/iw\,2160/ih):ih*min(3840/iw\,2160/ih),pad=3840:2160:(3840-iw)/2:(2160-ih)/2, movie=watermark.png [watermark]; [in][watermark] overlay=main_w-overlay_w-10:main_h-overlay_h-10 [out]" vid.mkv 

but giving me error:

[avfiltergraph @ 0x2d21480] many inputs specified "movie" filter. error initializing complex filters. invalid argument

i able make slideshow pictures, audio, , watermark; however, unable factor in aspect ratio without having pictures getting stretched.

if makes difference, output video uploaded youtube.

you can remove aspect flag. since filter output 3840x2160, 16:9, don't need it. scale filter works me images of varying ratios.

here's full command try:

ffmpeg -y -framerate 2/3 -i "pics/%03d.jpg" -i audio.mp3 -loop 1 -i watermark.png -filter_complex  "[0:v]scale=iw*min(3840/iw\,2160/ih):ih*min(3840/iw\,2160/ih),  pad=3840:2160:(3840-iw)/2:(2160-ih)/2[ss];  [ss][2:v] overlay=main_w-overlay_w-10:main_h-overlay_h-10:shortest=1[out]"  -map "[out]" -map 1:a  -c:v libx264 -r 24 -preset veryfast -tune stillimage -pix_fmt yuv420p  -c:a copy vid.mkv 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -