[Libav-user] 回复: How can I get the pix_fmt info from AVFrame objects?
B Aleck
aleck099 at outlook.com
Sun Apr 10 05:54:09 EEST 2022
I got it from the codec_ctx:
codec_ctx->pix_fmt represents the actual pixel format
________________________________________
发件人: Libav-user <libav-user-bounces at ffmpeg.org> 代表 Peter Krefting <peter at softwolves.pp.se>
发送时间: 2022年4月10日 5:42
收件人: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter.
主题: Re: [Libav-user] How can I get the pix_fmt info from AVFrame objects?
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/
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/libav-user
To unsubscribe, visit link above, or email
libav-user-request at ffmpeg.org with subject "unsubscribe".
More information about the Libav-user
mailing list