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

Amir Rouhi-Rmit amir.rouhi at rmit.edu.au
Wed Jun 22 05:00:01 CEST 2011


When i use the below command
ffmpeg -i input.wmv -r 1 -s WxH -f image2 Img-%03d.Y
i will get three different output file for each image which the extensions
are Img-xxx.u and Img-xxx.v and Img-xxx.y
it seems that the command separate the picture of each frame to 3 plane y,u
and v. But i cant view them to see the result. are they correct or not? Can
you recommend a software for viewing this images with extensions *.y *.u and
*.v?

But when i use the command:
ffmpeg -i input.wmv -r 1 -s WxH -f image2 -pic_fmt gray Img-%03d.Y
the result contains like previous command , for each image three planes with
*.y ,*.u and *.v which the size of *.u and *.v is 0.
how can i see the image of *.y resulted in this command and compare it with
previous one? size in both are same and hex editor shows same content but i
need to see the images. how to view them?
Tnx

On Fri, Jun 17, 2011 at 8:37 PM, Stefano Sabatini <
stefano.sabatini-lala at poste.it> wrote:

> On date Thursday 2011-06-16 16:02:43 +1000, Amir Rouhi-Rmit encoded:
> > I know that i can extract images of a video by ffmpeg as can be seen in
> > below command:
> > ffmpeg -i input.avi -r 1 -s WxH -f image2 Img-%03d.jpeg
> > But what i want is a separated Y plane and cb and cr plane. can i i
> achieve
> > this by ffmpeg? if yes pleas let me now how and if no do you suggest any
> > idea?
>
> You may use the .Y raw image format:
> ffmpeg -i input.avi -r 1 -s WxH -f image2 Img-%03d.Y
>
> to get separate .Y, .U, .V raw images. A possibly better solution
> would be to use the lut filter, soon to be committed, and I suppose
> you can achieve the same purpose using some of the MPlayer filters
> wrapped by mp.
> _______________________________________________
> 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/20110622/7d365c7f/attachment.html>


More information about the Libav-user mailing list