[FFmpeg-devel] [PATCH] AVFoundation: Add -pixel_format option
Carl Eugen Hoyos
cehoyos at ag.or.at
Sun May 11 19:34:02 CEST 2014
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.)
> > 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.
>
> I can reproduce this, but I am not sure which approach
> one would to take to fix this.
I cannot really test (I only borrowed a Mac for the quick
test before) but I would expect that some function call
returns an error if a pixel format that is not supported
is requested.
Carl Eugen
More information about the ffmpeg-devel
mailing list