[FFmpeg-user] Pixel Formats for libx264

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Aug 30 18:04:26 CEST 2013


James Board <jpboard2 <at> yahoo.com> writes:

> What pixel format, if any, does the x264 codecs 
> convert video to before encoding?

(First of all: the "x264 codec" does no pixel format 
conversion at all, but since x264 does not accept all 
pixel formats that FFmpeg supports internally, ffmpeg 
- the application - automatically converts your input 
into a pixel format supported by the "x264 codec" if 
necessary.)

Doesn't the console output tell you?

If not, that might indicate a serious bug or at least 
some information that we could give you (on this list).

If yes, I wonder if the (correct) answer you received 
really has any advantages over simple testing:

$ ffmpeg -f rawvideo -pix_fmt rgb24 -i /dev/zero -vframes 1 out.h264
$ ffmpeg -f rawvideo -pix_fmt yuv422p -i /dev/zero -vframes 1 out.h264
$ ffmpeg -f rawvideo -pix_fmt yuva420p -i /dev/zero -vframes 1 out.h264
$ ffmpeg -f rawvideo -pix_fmt rgb24 -i /dev/zero -vcodec libx264rgb out.h264

(This is probably missing -s cif but you get the idea.)

Carl Eugen



More information about the ffmpeg-user mailing list