2

I am using the latest version 2.8.5 ffmpeg on Windows and I want to add 5s intro jpeg frame at the beginning of the video starts, and a 5s jpeg end frame at the end of the video.

I found a lot of example online, but seems all of them are using previous version of ffmpeg, and none of them works with the latest version.

Can anyone tell me how I can do that with the latest version.

1 Answer 1

5

Try

ffmpeg -loop 1 -t 5 -i intro.jpg -loop 1 -t 5 -i end.jpg -f lavfi -t 5 -i anullsrc -i video -filter_complex "[2:a]asplit[i][e];[0][i][3:v][3:a][1][e]concat=n=3:v=1:a=1[v][a]" -map [v] -map [a] output.mp4

With 1-second fades:

ffmpeg -loop 1 -t 5 -i intro.jpg -loop 1 -t 5 -i end.jpg -f lavfi -t 5 -i anullsrc -i video -filter_complex "[2:a]asplit[i][e];[0]fade=in:st=0:d=1[0f];[1]fade=out:st=4:d=1[1f];[0f][i][3:v][3:a][1f][e]concat=n=3:v=1:a=1[v][a]" -map [v] -map [a] output.mp4
7
  • I have this error: [Parsed_split_0 @ 0000000004f00f20] Media type mismatch between the 'Parsed_spli t_0' filter output pad 0 (video) and the 'Parsed_concat_1' filter input pad 1 (a udio) [AVFilterGraph @ 00000000030f1f60] Cannot create the link split:0 -> concat:1 Error initializing complex filters. Invalid argument Commented Jan 26, 2016 at 5:34
  • Oops. Audio needs asplit
    – Gyan
    Commented Jan 26, 2016 at 5:40
  • Another user lacked the rep to comment and asked for clarification in a now deleted answer. They asked where to add the video, and whether you could list the full command. If you could elaborate, that would be great. Thanks.
    – fixer1234
    Commented Apr 9, 2017 at 10:38
  • 1
    @fixer1234 The full command is listed and the placeholder for the video input is also specified. Probably they don't see or realize there's a horizontal scrollbar to see the full string..
    – Gyan
    Commented Apr 9, 2017 at 11:05
  • where do I specify input video file name?
    – Toolkit
    Commented Dec 29, 2018 at 14:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .