[FFmpeg-devel] [PATCH] AVFoundation: Add -pixel_format option

Carl Eugen Hoyos cehoyos at ag.or.at
Sun May 11 17:44:31 CEST 2014


sfan5 <sfan5 <at> live.de> writes:

> +    { AV_PIX_FMT_RGB0, kCVPixelFormatType_24RGB },

This should be AV_PIX_FMT_RGB24.
(I believe you didn't test, this fails with an 
appropriate error message here.)
Same for BGR0.

> +    { AV_PIX_FMT_BGRA, kCVPixelFormatType_32BGRA },

This should be AV_PIX_FMT_BGR0: The camera cannot 
record an alpha channel, the fourth channel is (or at 
least can be) 0, so it should be ignored.
Same for the other 32 bit rgb formats.

Imo, you don't have to add the pixel formats to the 
documentation. If you believe it makes sense, please 
remove gray (it's currently listed twice) once and 
update rgbx as above.

Right now, if I specify a pixel format that does not 
work (like gray) FFmpeg prints many error messages 
but does not quit. Can you reproduce this?
The expected behaviour imo is to quit if a pixel 
format that does not work is requested.

Thank you for working on this important feature, 
Carl Eugen



More information about the ffmpeg-devel mailing list