Is it possible to encode one yuv file to 3 h.264 files with different bitrates with one command?

StackOverflow https://stackoverflow.com/questions/11546663

I have a YUV file. I need to encode it to H.264 but using three different bitrates. Is it possible to do it with one command so the yuv file does not need to be processed muttiple times?

Here's what I do right now:

x264 -B 600 -o /path/to/output_first.264 /path/to/input.yuv
x264 -B 800 -o /path/to/output_second.264 /path/to/input.yuv
x264 -B 1000 -o /path/to/output_second.264 /path/to/input.yuv

Is it possible to do it in one command to make it faster? YUV file can be quite big so I don't want to extract it three times in a row. And all three encoding processes use the same input YUV file so I guess it should be possible.

有帮助吗?

解决方案

Is it possible directly with x264?

No. x264 cli supports only one input and one output.

其他提示

Yes, it's readily possible using FFmpeg:

ffmpeg -i input.yuv -b:v 600 output1.264 -b:v 800 output2.264 -b:v 1k output3.264
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top