ffmpegvideo-editing

can we use -vf and -filter:a with -filter_complex


I want to combine some videos with some specific features like(video Speed, volume increase, resolution, rotation, framerate) of the final output of the video We can do this process in 2 steps like

Combine video

ffmpeg -i test1.mp4 -i test2.mp4 -filter_complex [0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[outv][outa] -map [outv] -map [outa] output.mp4

Then apply filters

ffmpeg -i output.mp4 -filter:a volume=1.0,atempo=1.0 -vf transpose=2,setpts=1/1.0*PTS,scale=3840X2160,fps=30 final.mp4

I can do it this way but is there any way to do it in 1 step

thank you


Solution

  • You have to apply the filters after concat.

    ffmpeg -i test1.mp4 -i test2.mp4 -filter_complex [0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[v][a];[v]transpose=2,setpts=1/1.0*PTS,scale=3840X2160,fps=30[outv];[a]volume=1.0,atempo=1.0[outa] -map [outv] -map [outa] output.mp4