[Libav-user] save YUV420p file
Misha Penkov
misha.penkov at gmail.com
Tue Jun 19 08:37:49 CEST 2012
On 19 June 2012 15:24, Alex Cohn <alexcohn at netvision.net.il> wrote:
> On Fri, Jun 15, 2012 at 10:18 AM, Vijay Ajay <namballa.vijaykumar at gmail.com>
> wrote:
>>
>> Hai all,
>>
>> i am decoding jpeg using
>>
>> avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet);
>>
>> I want to save pFrame to a file i,e in yuv420 format.
>> Can some one please help me.
Also have a look at http://dranger.com/ffmpeg/tutorial01.html (there's
a more recent version of the source here:
https://github.com/mpenkov/sandpit/blob/master/ffmpeg/tutorial01.c)
> You can use rawvideo format with yuv pixel format. If you want to access an
> `AVFrame` structure directly, you should look at `data[0]` (for Y),
> `data[1]` (for U), and `data[2]` (for V). For Y plane you should read
> `height` lines, `linesize[0]` bytes per line. For U and V planes, there will
> be `height/2` lines, and linesize[1] and linesize[2] will define bytes per
> line for each plane. `linesize` is expected to be the same for U and for V.
>
>> Thanks in advance.
>> vijay
>
>
> Good luck,
> Alex
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
More information about the Libav-user
mailing list