0

I was successfully able to to use upscale on one image before pan and zoom using this code:

ffmpeg -y -t 15 -i 1.jpg -t 15 -i 2.jpg -t 15 -filter_complex "[0:v]scale=8000:-1,zoompan=z='min(zoom+0.0020,1.5)':d=417[v0]; [1:v]zoompan=z='if(lte(zoom,1.0),1.5,max(1.021,zoom-0.0020))':d=417,fade=t=in:st=0:d=5[v1];[v0][v1]concat=n=2:v=1:a=0,format=yuv420p[v]" -c:v libx264 -map "[v]" -s "800x450" -t 300 -threads 2 video.mp4

But i am not able to the same on multiple images using:

ffmpeg -y -t 15 -i 1.jpg -t 15 -i 2.jpg -t 15 -filter_complex "[0:v]scale=8000:-1,zoompan=z='min(zoom+0.0020,1.5)':d=417[v0]; [1:v]scale=8000:-1,zoompan=z='if(lte(zoom,1.0),1.5,max(1.021,zoom-0.0020))':d=417,fade=t=in:st=0:d=5[v1];[v0][v1]concat=n=2:v=1:a=0,format=yuv420p[v]" -c:v libx264 -map "[v]" -s "800x450" -t 300 -threads 2 video.mp4

This is the error generated:

Input link in1:v0 parameters (size 1280x720, SAR 59001:59000) do not match the corresponding output link in0:v0 parameters (1280x720, SAR 1:1) [Parsed_concat_5 @ 0000022fb3004b80] Failed to configure output pad on Parsed_concat_5 Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #1:0 Conversion failed!

Any help would be appreciated thanks...

0

Use

ffmpeg -y -i 1.jpg -i 2.jpg -filter_complex "[0:v]scale=8000:-1,zoompan=z='min(zoom+0.0020,1.5)':d=417:s=800x450,setsar=1[v0]; [1:v]scale=8000:-1,zoompan=z='if(lte(zoom,1.0),1.5,max(1.021,zoom-0.0020))':d=417:s=800x450,setsar=1,fade=t=in:st=0:d=5[v1];[v0][v1]concat=n=2:v=1:a=0,format=yuv420p[v]" -c:v libx264 -map "[v]" -t 300 -threads 2 video.mp4

zoompan operates on each image individually. By adding -t 15 before each image, it will operate upon 375 frames of each image, producing, for each, a zoompan of 417 frames! I don't think this is what you want.

Since concat is complaining about mismatching aspect ratios, setsar is added to force a common SAR.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.