On Wed, May 11, 2005 at 06:36:32PM +0200, Michel Bardiaux wrote:
Michael Niedermayer wrote:
Hi
On Wednesday 11 May 2005 16:47, Michel Bardiaux wrote:
Rich Felker wrote:
On Wed, May 11, 2005 at 11:53:20AM +0530, Mangesh Kulkarni wrote:
Hello, What should be the change in following command to convert 4:2:0 planar to 4:2:2 packed?
ffmpeg -s 720x576 -f rawvideo -pix_fmt yuv420p -i src.yuv -s 720x576 -f rawvideo -pix_fmt yuv422p dst.yuv
Specify yuv422 for output, not yuv422p.
I told you, if you do this to interlaced video without special care you'll ruin it!!
You mean, img_convert is broken?
yes, use the swscaler from mplayer/mencoder,
Cant do that, its GPL (and ISTR there was talk about changing it to LGPL, any news on that?)
img_convert will butcher interlaced video IIRC
Richard makes a lot of noise but not much info.
Well then let me try to give some info..
I just found I had asked a related question some month ago, never got a clear answer: assume I have an YUV420P image, 768x576, 2 interlaced fields, what do I with lavc to zoom it down by 2?
Treat the two fields as two independent, unrelated images and scale each one down by 2.
Do I need to apply the deinterlace filter first?
If you want to deinterlace, you can do this instead. However deinterlacing throws away roughly half the content of the video.
Richard also mentionned (I think) that when it comes from a BT878, 420P is broken.
Yes, if you capture "4:2:0" video from bttv, you'll get a 768x576 luma plane which contains both fields (correct), and two 384x288 chroma planes (u and v) which contain a single field, the top one. The bottom field of chroma data will be totally missing.
So, same question w.r.t. YUV422P.
Same thing applies.
And if lavc butchers the image, please you or Richard tell me exactly what, then maybe I will be able to fix it.
It's not that lavc butchers it. If you use lavc's image resampling independently on fields it's just fine (except for being very slow). The problem is that ffmpeg (afaik) has no interface for using it this way, so you'd need to write your own program or use mplayer/mencoder which already does this (and with much faster code). Rich