[FFmpeg-user] Confusion about fieldmatch, decimate and framerate (now with yadif)

L. Lee llee040 at sbcglobal.net
Thu Dec 19 16:22:37 CET 2013

On 12/18/13, 8:02 PM, "Nicholas Robbins" <nickrobbins at yahoo.com> wrote:
>>> fps=fps=30000/1001,fieldmatch,decimate,yadif (which will yadif
>> I would surely like to get a sample. I shouldn¹t need more than 20-30
>> seconds to see what results I¹m able to produce. You might be able to
>> email me such an excerpt. I don¹t see how any conversion to deinterlaced
>> 30 fps would result in optimal output. Nearly any smooth horizontal
>> panning is like getting slapped in the face 6 times per second. If
>> is deinterlaced, all 4th and 5th frames are duplicates. If not
>> deinterlaced, those frames are interlaced complements which still take
>> twice as long as a normal frame to play. Thanks.
>> Laine Lee
>I will see about sending you a snippet offline. I can't seem to edit the
>file as a vob without starting at the beginning and there aren't really
>good problems at that point.  So I've remuxed it into a mkv using
>Also, I don't think you are quite understanding the filters.
>fps=30000/1001 is actually just relabeling things. If you've been
>following the thread, the video file actually has this man frames, but
>the container things is has 60000/1001 fps. So that first filter just
>labels the file correctly. The second filter should replace the 30 fps
>telecined with  ABCDD non-telecinded originals. Decimate will then remove
>every fifth frame. At least that is how it is supposed to work. However,
>it doesn't always work, some frames sometimes are missed, sometimes due
>to editing after telecining for instance. These frames are supposed to me
>marked as interlaced by fieldmatch and then yadif can de-comb them, which
>isn't ideal, but the information to do the ideal thing is on the cutting
>room floor presumably.
>However, yadif=deint=interlaced isn't noticing any interlaced frames. So
>if I want to remove the combing, I have to yadif everything.
>In any case, I'll send you the file and you can play with it.

Thanks for the 0:30 sample file. Yes, some are interlaced, but not in the
pattern I would expect for telecined video. If you open it in mplayer, you
can pause it at any point by pressing space, then advance frame by frame
using ³.². What I see for the interlacing is the pattern of 3 frames
interlaced followed by 3 frames non-interlaced. Please try that and let me
know if you agree. Pulldown would be interlaced frames 4 and 5 of every 5,
I believe. Here¹s a yadif filter chain that did the same thing as the one
I mailed you privately using -deinterlace, except probably better. Thanks

ffmpeg -i test1.mkv -pix_fmt yuv420p -c:v libx264 -vf
³yadif=0,fps=fps=30000/1001" -preset slower -crf 18 -x264opts
keyint=40:bitrate=1800:qpmin=8:qpmax=28:qpstep=4 test1.m4v

Laine Lee

More information about the ffmpeg-user mailing list