0

I am using this code but the error always come with.

ffmpeg -loop 1 -t 5 -i 0.png -loop 1 -t 5 -i 1.png -loop 1 -t 5 -i 2.png \
-loop 1 -t 5 -i 3.png -loop 1 -t 5 -i 4.png \
-filter_complex "[0:v]fade=t=out:st=4:d=1[v0]\
[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1];\
[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2];\
[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3];\
[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4];\
[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v]" -map "[v]" transition2.mp4

Error:

No output pad can be associated to link label '1:v'

2

You're missing a semicolon (;) after [v0] at the end of the third line. I've tested the fixed command with my PNGs and it's OK.

For the record, the fixed command:

ffmpeg -loop 1 -t 5 -i 0.png -loop 1 -t 5 -i 1.png -loop 1 -t 5 -i 2.png \
-loop 1 -t 5 -i 3.png -loop 1 -t 5 -i 4.png \
-filter_complex "[0:v]fade=t=out:st=4:d=1[v0];\
[1:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v1];\
[2:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v2];\
[3:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3];\
[4:v]fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v4];\
[v0][v1][v2][v3][v4]concat=n=5:v=1:a=0,format=yuv420p[v]" -map "[v]" transition2.mp4
  • Now ,getting this error . [Parsed_concat_9 @ 0x217f680] Input link in1:v0 parameters (size 460x426, SAR 0:1) do not match the corresponding output link in0:v0 parameters (361x400, SAR 0:1) [Parsed_concat_9 @ 0x217f680] Failed to configure output pad on Parsed_concat_9 Error configuring complex filters. Invalid argument – ahmadlatif1084 Aug 3 '18 at 10:12
  • Can you please guide me on this , i want to take multiple images and apply fade in/out effect.Please guide me. @Kamil Maciorowski – ahmadlatif1084 Aug 3 '18 at 10:15
  • 2
    @ahmadlatif1084 I guess the tool complains about different resolutions of the video streams. Resize your PNGs to the same size beforehand. If it doesn't work, please post a separate question. Sticking to a single user and/or introducing new problem(s) in comments is not a good practice here. Let the entire community see your new problem. This is how the site works: one problem -- one question. – Kamil Maciorowski Aug 3 '18 at 10:23
  • @ahmadlatif1084 See the example "For input images with varying or arbitrary sizes" in Create video with 5 images with fadeIn/out effect in ffmpeg. – llogan Aug 3 '18 at 19:36
  • @KamilMaciorowski okay checking it. – ahmadlatif1084 Aug 7 '18 at 4:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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