[FFmpeg-user] How to select audio stream in filter_complex with concat?

Moritz Barsnick barsnick at gmx.net
Thu Jul 12 18:25:54 EEST 2018


On Thu, Jul 12, 2018 at 16:23:58 +0200, Dmitri wrote:
> I've also tried to add same file again and map it's audio stream, but it
> gives error:
> "Filter concat:out:a0 has an unconnected output"
> 
> ffmpeg -i "D:\videos\intro_1.mov" -ss 00:00:00 -to 00:00:40 -i
> "D:\videos\logo_1.mp4" -i "D:\videos\logo_2.mp4" -i "D:\videos\intro_1.mov"
> -filter_complex
> "[0:v]fade=t=out:st=37:d=3[0v];[1:v]fade=t=out:st=11:d=1[1v];[2:v]fade=t=out:st=9:d=1[2v];
> [0v][0:a][1v][1:a][2v][2:a] concat=n=3:v=1:a=1 [v1][a]" -map "[v1]" -map
> 3:1 output.mp4 -y
> 
> Feels like I am missing something simple :)

Yes. ;-) You are still concat'ing video and audio, with audio as "[a]",
but not mapping "[a]" anywhere. You need to adapt the concat parameters
to use only the video streams as input, and to output only "[v1]".

Moritz


More information about the ffmpeg-user mailing list