[FFmpeg-user] flag YUV input as interlaced

Herve Flores herve.flores at free.fr
Fri May 13 22:22:46 CEST 2011


Le 12 mai 2011 à 18:07, Mark Himsley a écrit :

> On 12/05/11 16:37, 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 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
>>>>>> 
>>>>>> ?

[…]

> I'm only using fieldorder as an example.
> 
> But, FYI, the field order filter DOES drop (or raise) the picture by one line when doing the tff <-> bff conversion. It ALSO adds pertinent picture data into the new line created by the crop+pad, AND it only does the tff <-> bff conversion if the original file is not in the interlaced format that has been requested.
> 
> Anyway...
> 
> What I need is a way to flag rawvideo media when its used as an input into ffmpeg. Anyone?


Hi 
first, sorry this is not the answer you searched, I searched too, but I didn't find any way to do :-(

I have the same concern with converted 1080i(ttf) to DV: some QuickTime versions does a good job during this conversion (good resample, preserve interlacing) BUT does not change field order, so my DV file contents is ttf (but flaged/readed as bff by ffmpeg)
So your cool filter has no effect
another eg: my file has an interlaced -ttf- contents, but is -badly- encoded as progressive, your filter cannot work here too

(From memories about the cvs-log-list) I'm not sure that a automatic filter was the best choice.
Is is possible to modify your filter to force fieldorder inside it? 
eg: "-vf fieldorder=ttf,bff" (or "-vf fieldorder=0,1" to keep the usual ffmpeg syntax)
…and a syntax like "-vf fieldorder=-1,1" will produce the same behavior than the actual filter ;-) (automatic detection of input fieldorder > change -or not- fieldorder according to 2nd parameter)

was just my 2 cents as user
good continuation
bye

Hervé


More information about the ffmpeg-user mailing list