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

sfan5 sfan5 at live.de
Tue May 20 21:40:40 CEST 2014


Am 19.05.2014 11:16, schrieb Thilo Borgmann:
> 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?
> http://article.gmane.org/gmane.comp.video.ffmpeg.devel/177722
>
> -Thilo
I haven't tried this yet but I will look into it when I have time and 
send a seperate patch if it works.

By the way: The -pixel_format patch should be ready for merge now.


More information about the ffmpeg-devel mailing list