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

Amir Rouhi-Rmit amir.rouhi at rmit.edu.au
Mon Jun 27 07:11:20 CEST 2011


Hi
I use the below command for extracting raw image (YUV) from a video:
ffmpeg -i input.avi -r 1 –f image2 -s WxH -pix_fmt yuvj420p Img-%03d.yuv
But when i want to view the results images by Irfanview software, the
software detect them as .jpg and says the extension .yuv is wrong. Whats
your idea?
How can i view any raw image in yuv format or even just intensity image with
extension(.y)?


On Fri, Jun 17, 2011 at 2:16 PM, Alex Cohn <alexcohn at netvision.net.il>wrote:

> I don't see cb or cr in ffmpeg -pix-fmts. You probably can use the
> split solution proposed by Kirill. Note that cb an cr will be
> half-width and half-height.
>
> Maybe you should post to ffmpeg-user?
>
> Sincerely,
> Alex
>
> On Friday, June 17, 2011, Amir Rouhi-Rmit <amir.rouhi at rmit.edu.au> wrote:
> > Thanks alot, The Y plane is quite satisfactory. but for Cb and Cr planes
> separately in different images cant i use:
> > ffmpeg -i input.avi -r 1 -s WxH -pix_fmt cb Img-%03d.yuv
> > or
> > ffmpeg -i input.avi -r 1 -s WxH -pix_fmt cr Img-%03d.yuv
> > Whats your advice for this request?
> >
> >
> >
> >
> >
> > On Thu, Jun 16, 2011 at 4:41 PM, Alex Cohn <alexcohn at netvision.net.il>
> wrote:
> > You can use
> >
> > ffmpeg -i input.avi -r 1 -s WxH -pix_fmt yuvj420p Img-%03d.yuv
> >
> > to produce YCbCr files. Or -pix_fmt gray if you want the Y plane only.
> >
> > Enjoy,
> > Alex
> >
> >
> >
> > On Thu, Jun 16, 2011 at 09:02, Amir Rouhi-Rmit <amir.rouhi at rmit.edu.au>
> wrote:
> >> 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?
> >> Tnx
> >> Amir
> >>
> >>
> >> _______________________________________________
> >> Libav-user mailing list
> >> Libav-user at ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/libav-user
> >>
> >>
> > _______________________________________________
> > 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
> >
> >
> _______________________________________________
> 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/20110627/06b25c11/attachment.html>


More information about the Libav-user mailing list