On Thu, Jun 16, 2011 at 10:02 AM, Amir Rouhi-Rmit
<[email protected]>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?
>
I'm not sure but it seems there are no ways to extract planes separately
(however separate planes could be used as input ???).

However if you know dimensions and pixel formats you may hack this way for
one frame
(W and H should be replaced with real width / height and math should be
applied):
ffmpeg -i input.mkv -vframes 1 -s WxH -f image2 rawimage.yuv
split -b W*H   rawimage.yuv spl-
split -b W*H/4 spl-ab spl2-
ffmpeg -s WxH     -pix_fmt gray -f rawvideo -i spl-aa  frameY.png
ffmpeg -s W/2xH/2 -pix_fmt gray -f rawvideo -i spl2-aa frameU.png
ffmpeg -s W/2xH/2 -pix_fmt gray -f rawvideo -i spl2-ab frameV.png

Sure this too complicated... maybe advanced ffmpeg users will give you more
adequate solution.
-----------------------------------------------
Kirill Gavrilov,
Software designer.
<[email protected]>
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to