[Libav-user] How can i extract Y plane from any frame in video
Kirill Gavrilov
gavr.mail at gmail.com
Wed Jun 22 07:17:04 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?
>
Result files are RAW images. This means that these images are not compressed
and has NO any header - just bytes with data.
I don't know are there any image viewer that can open these files directly
(it should really ask you for pixel format and dimensions in this case) but
you can convert them into the normal images using ffmpeg (as I already
suggested):
ffmpeg -s WxH -pix_fmt gray -f rawvideo -i Img-001.Y frame001Y.png
ffmpeg -s W/2xH/2 -pix_fmt gray -f rawvideo -i Img-001.U frame001U.png
as you see dimensions and format of the input raw image should be specified
explicitly (try to omit some).
-----------------------------------------------
Kirill Gavrilov,
Software designer.
<kirill at sview.ru>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20110622/c1c177c7/attachment.html>
More information about the Libav-user
mailing list