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

Stefano Sabatini stefano.sabatini-lala at poste.it
Fri Jun 17 12:37:54 CEST 2011


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.


More information about the Libav-user mailing list