I use this command to fade 2 pictures and it work perfect with 1024 × 768 test pictures.
ffmpeg -loop 1 -i 1-test.jpg -loop 1 -i 2-test.jpg -filter_complex "[1:v][0:v]blend=all_expr='A*(if(gte(T,3),1,T/3))+B*(1-(if(gte(T,3),1,T/3)))'" -t 4 frames_%04d.png
But with my original pictures in 1920 × 1080 this error shows up:
[Parsed_blend_0 @ 0x97c8240] First input link top parameters (size 1920x1080, SAR 0:1) do not match the corresponding second input link bottom parameters (1920x1080, SAR 1:1)
[Parsed_blend_0 @ 0x97c8240] Failed to configure output pad on Parsed_blend_0
Why is this happening and how can I fix it? Thank you for helping!
This error is no longer thrown in recent versions of ffmpeg (3.4 +).
For older versions,
ffmpeg -loop 1 -i 1-test.jpg -loop 1 -i 2-test.jpg -filter_complex "[1:v]setsar=1[1v];[0:v]setsar=1[0v];[1v][0v]blend=all_expr='A*(if(gte(T,3),1,T/3))+B*(1-(if(gte(T,3),1,T/3)))'" -t 4 frames_%04d.png