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