我尝试编码原始yuv视频,以libx264将各种比特率的流作为ffmpeg命令中的视频编码。这是:
ffmpeg.exe -f rawvideo -vcodec rawvideo -s 1920x1080 -r 25 -pix_fmt yuv420p -i D:\TestSeqncs\crowd_run_1080p25.yuv -c:v libx264 -preset ultrafast -b:v 5000K C:\Users\sree\Desktop\FFmpeg_Experiment\crowd1080p5.264 -s 1280x720 -b:v 4000K C:\Users\sree\Desktop\FFmpeg_Experiment\crowd720p4.264 -s 704x576 -b:v 2000K C:\Users\sree\Desktop\FFmpeg_Experiment\crowd704p2.264
。
我的输出也是。
然后我想要使用这些流来获取单个传输流,这是:
" ffmpeg.exe -i crowd1080p5.264 -i crowd720p4.264 -i crowd704p2.264 -map 0 -map 1 -map 2 muxout.ts "
。
但是我的任务是在同一个命令中执行两个操作(不在同一个命令中再次使用&&和ffmpeg),如果有人有想法,请帮帮我吗?
答案 0 :(得分:2)
尝试
ffmpeg.exe -f rawvideo -vcodec rawvideo -s 1920x1080 -r 25 -pix_fmt yuv420p -i D:\TestSeqncs\crowd_run_1080p25.yuv -lavfi "[0:v]split=2[in2][in3];[in2]scale=1280x720[out2];[in3]scale=704x576[out3]" -map 0:v -map "[out2]" -map "[out3]" -c:v libx264 -preset ultrafast -b:v:0 5000K -b:v:1 4000K -b:v:2 2000K muxout.ts