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

Thilo Borgmann thilo.borgmann at mail.de
Mon May 19 11:16:02 CEST 2014

Am 17.05.14 18:19, schrieb sfan5:
> ON 11.05.2014 19:34, Carl Eugen Hoyos wrote:
>> sfan5 <sfan5 <at> live.de> writes:
>>>>> +    { 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.
>>> Isn't AVFoundation a generic API for video sources?
>>> (not only cameras)
>>> There might be other devices that can record RGBA.
>> I can't really answer this but since AVFoundation
>> provides transparent images for 32 bit RGB it has
>> to be mapped to RGB0 to work at all.
>> (If a user ever protests that his alpha channel
>> disappears, we will have to find a solution.)
> I've changed the mapping as suggested.

Have you also tried querying for device capabilities like I suggested?


More information about the ffmpeg-devel mailing list