Question

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.

Was it helpful?

Solution

Is it possible directly with x264?

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

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top