[FFmpeg-devel] about original video format

hong liu l1436636
Tue Jul 3 16:11:36 CEST 2007

The original raw video file is YUV420P format. I encoded it into an h.264 file. I use ffmpeg to decoded the video encoded stream. Now I attempts
to save the decoded frames in the orignal format into the disk. I used
the code from the ffmpeg library to decode frame that follows:

avcodec_decode_video(pCodecCtx, pFrame, &frameFinished, packet.data, packet.size);

Its source code is posted by http://dranger.com/ffmpeg/tutorial01.c

first I tried to save pFrame.data directly into the disk. It doesn't
work. Can any expert to explain what relationship between video formats and pFrame.data and
pFrame.linesize and how to use them for this case? If I did wrong, could you recommend some solution? If possible, can you give any clue or links to explain it in details.

Thank you so much!

Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.

More information about the ffmpeg-devel mailing list