[Libav-user] How can i extract Y plane from any frame in video

Amir Rouhi-Rmit amir.rouhi at rmit.edu.au
Tue Jun 28 04:11:17 CEST 2011

The problem still exist in opening YUV generated files. All i do is as below
please follow and inform me why i cant view the yuv files.
1- i convert a video to yuv images (1 image per second) as below:
ffmpeg -i c:\test\animals.wmv -r 1 -f image2 -s 320x240 -pix_fmt yuvj420p
the size 320x240 is exactly the frame size of the source video.

2- I try to view the Img--.yuv files by Irfanview program/file/open as raw
and the parameters which i input in the open raw file page are:
image width: 320 Image height: 240
YUV 420
File header size 0
Byte pattern start GR
Color Order RGB

But the result is a green image which top part of image is bright green and
bottom part is dark green !!!!!
Where is my mistake

On Mon, Jun 27, 2011 at 6:02 PM, Alex Cohn <alexcohn at netvision.net.il>wrote:

> > when i want to view the results images by Irfanview software, the
> software detect them as .jpg and says the extension .yuv is wrong.
> IrfanView does not know yuv extension. You should open file "As Raw"
> manually, or change the extension.
> > How can i view any raw image in yuv format or even just intensity image
> with extension(.y)?
> When you choose "Open as Raw" menu, you get a dialog to specify the
> image width & height, and also format. If you choose 8-bit grayscale,
> you will see intensity only, even if the input is yuv (-f yuvj420).
> Or, you may choose 24-bit YUV420 to see your image in color.
> Sincerely,
> Alex
> PS Note that this list requires no to top-post.
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

Amir H. Rouhi
PhD Student/ CSIT RMIT University
Room: 14-09-04
rouhi_amirhossein at student.rmit.edu.au
amir.rouhi at rmit.edu.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110628/11f4140a/attachment.html>

More information about the Libav-user mailing list