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

Alex Cohn alexcohn at netvision.net.il
Tue Jun 28 11:14:38 CEST 2011


Amir,

> 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 c:\test\Img-%03d.yuv

By default, -f image2 produces JPEG files. You should use -vcodec
rawvideo to produce yuv420 images, e.g.

ffmpeg -i c:\test\animals.wmv -r 1 -f image2 -vcodec rawvideo -pix_fmt
yuvj420p c:\test\Img-%03d.yuv

Note that you can skip -s if you do not resize the result.

Sincerely,
Alex


More information about the Libav-user mailing list