Search code examples
ffmpegh.264video-encodingx264

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


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.


Solution

  • Is it possible directly with x264?

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