[Libav-user] Getting pixel value at each x, y position of a given frame

Simon Brown simon.k.brown at gmail.com
Fri Apr 5 15:02:40 EEST 2019


>
>
>
> Ok, Thanks!
>
> But can you tell me how to get the frame pixel format, please?
> I use frame->format   but the output is only zero (0) value.
>
> Regards
>
>>
>> I have:

av_get_pix_fmt_name(frame->format)

to get a format name, but also:

pix_fmt = video_dec_ctx->pix_fmt;

This should still apply in current version.  pix_fmt is of type "enum
AVPixelFormat".
Try:
https://libav.org/documentation/doxygen/master/structAVCodecContext.html#a0425c77b3d06d71e5db88b1d7e1b37f2
for more information on that or other options.

Cheers,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190405/c813e115/attachment.html>


More information about the Libav-user mailing list