如何修改此 ffmpeg 字符串以生成具有不同视频比特率的多个输出?
这可以在 yadif=1 消耗大量电量时节省时间。此外,不能让它在 Windows 中接受 yadif_cuda。
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"
最佳答案
实现我的评论
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"
关于ffmpeg - 来自同一来源的多个输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69311136/