[Libav-user] How can I get the pix_fmt info from AVFrame objects?

Peter Krefting peter at softwolves.pp.se
Sun Apr 10 00:42:50 EEST 2022


2022-04-09 15:01 skrev B Aleck:

> Assuming that the operation succeeds, I found frame->format is always 
> zero
> What's the format field used for? Only for outputs?
> And how can I get pix_fmt of the frame?

The format field should be the pixel format if the frame was decoded 
successfully, you should be able to get the textual representation by 
calling av_get_pix_fmt_name((AVPixelFormat) frame->format);

-- 
\\// Peter - http://www.softwolves.pp.se/


More information about the Libav-user mailing list