[FFmpeg-user] 4-bit and 2-bit gray pixel format?

Carl Eugen Hoyos cehoyos at ag.or.at
Sun Jun 3 09:04:52 CEST 2012


Kyle Parker-Robinson <kcrobinson <at> gmail.com> writes:

> 1) I know that gray16be and gray16le stand for big-endian 
> and little endian, but I don't know what that means in terms 
> of what I should expect from using them or what the 
> difference of the output would be between these two? 
> Can anyone please explain that to me?

gray16be and gray16le are 16 bit formats, the (luminance) 
information in 16 bit formats can either be saved in 
little-endian or in big-endian, FFmpeg supports both.

> 2) The project I'm working on requires converting videos to 
> 4-bit and 2-bit grayscale as well, but these do not appear 
> to be options in ffmpeg. Is there a way to achieve this 
> another way?

You will probably have to add these formats to libswscale.
Please send patches to ffmpeg-devel, don't forget to read the 
development section in the documentation.

Carl Eugen



More information about the ffmpeg-user mailing list