ffmpegmultipleoutputs

Multiple outputs from same source


How do I modify this ffmpeg string to generate multiple outputs with different video bitrates? This to save time when yadif=1 take a lot of power. Also, can't get it to accept yadif_cuda in windows.

ffmpeg -y -f lavfi -i anullsrc=cl=mono:sample_rate=48000 -i "test.mxf" -vf yadif=1 -s 1920:1080 -c:v h264_nvenc -force_key_frames "expr:gte(t,n_forced*10)" -pix_fmt yuv420p -preset slow -rc vbr_hq -b:v 4.5M -map 1:v -map 0:a -c:a aac -b:a 192k -shortest "test.mp4"


Solution

  • Implementing my comment

    shortest is an output option. Your command deinterlaces and scales the video twice. Use filter_complex, deint and scale once, thn use split to produce two outputs. Map one each per output.

    ffmpeg -y -i "test.mxf" -f lavfi -i anullsrc=cl=mono:sample_rate=48000 -filter_complex "yadif=1,scale=1920x1080,format=yuv420p,split=2[90m][45m]" -map "[90m]" -map 1:a -force_key_frames "expr:gte(t,n_forced*10)" -c:v h264_nvenc -preset slow -rc vbr_hq -b:v 9.0M -c:a aac -b:a 192k -shortest -fflags +shortest -max_interleave_delta 200M "test90m.mp4" -map "[45m]" -map 1:a -force_key_frames "expr:gte(t,n_forced*10)" -c:v h264_nvenc -preset slow -rc vbr_hq -b:v 4.5M -c:a aac -b:a 192k -shortest -fflags +shortest -max_interleave_delta 200M "test45m.mp4"