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

Marton Balint cus at passwd.hu
Sat Aug 29 17:39:28 CEST 2015


On Sat, 29 Aug 2015, Robert Krüger 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.

I am afraid I still don't understand how a non-deinterlacing approach 
can give better quality. Without deinterlacing you will blend frames which 
are 2 units distant in time, with deinterlacing you blend frames which are 
1 unit distant.

Consider you have a 25i source, and you want 30i (60p for display)

Are you referring to this filter chain for deinterleaving?

-vf il=l=d:c=d,framerate=30,il=l=i:c=i,yadif=1

And this for deinterlacing?

-vf yadif=1,framerate=60,interlace,yadif=1

The second is much, much better.

Regards,
Marton


More information about the ffmpeg-devel mailing list