[FFmpeg-devel] [PATCH] avfilter: add framerate video filter

Robert Krüger krueger at lesspain.de
Sat Aug 29 17:32:00 CEST 2015


On Sat, Aug 29, 2015 at 4:53 PM, Robert Krüger <krueger at lesspain.de> wrote:

>
>
> On Sat, Aug 29, 2015 at 4:45 PM, Robert Krüger <krueger at lesspain.de>
> wrote:
>
>>
>>
>> On Sat, Aug 29, 2015 at 3:53 PM, Carl Eugen Hoyos <cehoyos at ag.or.at>
>> wrote:
>>
>>> Robert Krüger <krueger <at> lesspain.de> writes:
>>>
>>> > Do you mean processing the top and bottom fields
>>> > as separate progressive
>>>
>>> Yes.
>>> (Sorry, I thought this is what "deinterleaving and
>>> interleaving" means.)
>>>
>>> > streams?
>>>
>>> Not necessarily "streams", just not processing them
>>> interlaced but deinterleaved.
>>> If this leads to shadows, then I would suggest to
>>> use two framerate instances.
>>>
>>>
>> I understand the variant with processing the fields as separate streams
>> with two framerate instances, but not the other one. One would have to test
>> but the more I think about it, I think it could very well work and result
>> in better quality as the deinterlacing/reinterlacing obviously destroys
>> motion information.
>>
>> One would probably have to make tests with interlaced footage that
>> contains a lot of motion.
>>
>> It would certainly be interesting to see that filter chain, though. I
>> haven't worked with the il filter at all, so I would have to read up on
>> that first.
>>
>
> Which I should have done first. I read the il filter docs and now I
> understand what you mean. If I am correct in assuming, what the framerate
> filter does, this might work just with one stream and would do what I
> described as using two streams.
>

Is this what you meant:

ffmpeg -i JEFF0059_01.MP4 -vf il=l=d:c=d,framerate=fps=24,il=l=i:c=i
-pix_fmt yuv422p -c:v mpeg2video -flags +ildct -q 1 -c:a copy
~/tmp/framerate-iltest.mov

Please ignore the fact that interlaced 24 fps does not make much sense but
I did not have a good 60i sample with motion to convert to 50i. Apart from
that the results look very good AFAICS, so I would say you were right and
thank you.

The only other thing I noticed was that the stream seams to be marked as
interlaced when it comes out of the first il filter, which causes warnings
like these:

[Parsed_framerate_1 @ 0x7fa4e3426080] Interlaced frame found - the output
will not be correct.

Should the il filter not make it a progressive stream (I mean in terms of
metadata) when in deinterleave mode?


More information about the ffmpeg-devel mailing list