[FFmpeg-user] How to get raw frame data from AVFrame.data[] and AVFrame.linesize[] without specifying the pixel format?

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Oct 17 23:12:54 CEST 2013


vivienlwt <luthlee <at> gmail.com> writes:

> According to AVFrame.h:
> 
> uint8_t* AVFrame::data[AV_NUM_DATA_POINTERS]
> 
>      pointer to the picture/channel planes.
> 
> int AVFrame::linesize[AV_NUM_DATA_POINTERS]
> 
>      For video, size in bytes of each picture line.
> 
> Does this mean that if I just extract from data[i] 
> for linesize[i] bytes then I get the full pixel 
> information about the frame?

No, it contains the information for one (horizontal) 
line of the frame.

Carl Eugen



More information about the ffmpeg-user mailing list