[FFmpeg-user] flag YUV input as interlaced

bouke bouke at editb.nl
Thu May 12 17:37:44 CEST 2011


---- Original Message ----- 
From: "Mark Himsley" <mark at mdsh.com>
To: "FFmpeg user questions and RTFMs" <ffmpeg-user at ffmpeg.org>
Sent: Thursday, May 12, 2011 5:17 PM
Subject: Re: [FFmpeg-user] flag YUV input as interlaced


> On 12/05/11 16:03, bouke wrote:
>> ----- Original Message -----
>> From: "Mark Himsley"<mark at mdsh.com>
>> To: "FFmpeg user questions and RTFMs"<ffmpeg-user at ffmpeg.org>
>> Sent: Thursday, May 12, 2011 4:51 PM
>> Subject: Re: [FFmpeg-user] flag YUV input as interlaced
>>
>>
>>> On 12/05/11 14:11, bouke wrote:
>>>>
>>>> ----- Original Message -----
>>>> From: "Mark Himsley"<mark at mdsh.com>
>>>> To: "FFmpeg user questions and RTFMs"<ffmpeg-user at ffmpeg.org>
>>>> Sent: Thursday, May 12, 2011 2:13 PM
>>>> Subject: [FFmpeg-user] flag YUV input as interlaced
>>>>
>>>>
>>>>> Imagine I am using FFmpeg to read a raw YUV file. How do I flag that
>>>>> input
>>>>> file as interlaced so that interlaced aware filters process the stream
>>>>> correctly?
>>>>>
>>>>> For instance:
>>>>>    I have an SD PAL sized yvyu422 file that I know is top-field-first
>>>>>    I want to output that as PAL DV 25, which is bottom-field-first
>>>>>
>>>>> I expect to use a command like like this:
>>>>>
>>>>> ffmpeg -f rawvideo -r 25 -s 720x576 -pix_fmt yuyv422 -i
>>>>> input.yvyu422 -vf
>>>>> fieldorder=bff -vcodec dvvideo -pix_fmt yuv420p -y output.mov
>>>>
>>>> Normally you put the known input specs before the input file, as in 
>>>> your
>>>> example.
>>>> So did you test
>>>>    ffmpeg -f rawvideo -r 25 -s 720x576 -pix_fmt yuyv422  -vf
>>>> eldorder=tff   -i input.yvyu422 -vf fieldorder=bff -vcodec
>>>> dvvideo -pix_fmt
>>>> yuv420p -y output.mov
>>>>
>>>> ?
>>>
>>> Hi Bouke,
>>>
>>> The -vf command is defining a filter, not setting switches on a file, so
>>> that command does not work.
>>
>> Doh!
>> Note to self, first think, then post....
>> Dirty trick, if you can spare a line, you could crop off one line at the
>> top, and pad one line at the bottom.
>> That switches field dominance as well.
>
> Hi Bouke,
>
> That is true, but I wrote the fieldorder filter to do a _slightly_ better 
> job then that (it fills the blank line created by the pad with roughly the 
> right video data and only does the shift up/down it its required).

Good for HD, but SD is an overscanned format that you have to crop for 
computer use anyways, or you have incorrect framing.
Lot's of mics hanging in the top of the shot, matte boxes, and overall 
incorrect framing as any cam op that shot SD knew that the entire frame was 
never to be shown.
And on top of that blanking on analogue sources...
So, loosing one line is not that bad...

Bouke

> What I want to do, though, is to set a flag like -s, -r and -pix_fmt that 
> sets the interlaced flag and tff flag on -f rawvideo media before the 
> video hits the filter chain.
>
> I just assumed I'd missed something. Perhaps I need to patch ffmpeg 
> instead.
>
> Thanks :-)
>
>
>> Bouke
>>
>>
>>> Thanks though.
>>>
>>>> Bouke
>>>>
>>>>> But, since the input file is not flagged as interlaced the fieldorder
>>>>> filter cannot do it's job.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> --
>>>>> Mark
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user 




More information about the ffmpeg-user mailing list