[FFmpeg-user] FFMpeg problem using fieldmatch and decimate filters to IVTC

L. Lee llee040 at sbcglobal.net
Thu May 15 04:47:54 CEST 2014




On 5/5/14, 10:42 PM, "Steve Boyer" <steveboyer85 at gmail.com> wrote:

>Hey all,
>
>Originally, I posted this to the wrong mailing list and had a request to
>execute an ffprobe command. I am reposting and including the output of the
>commands.
>
>The ffprobe.txt file is for the sample.vob and the ffprobe.4.18.txt is for
>the full, ~2GB vob.
>
>I'm trying to encode a large number of videos so I can watch them on my
>phone, but not having luck doing a proper IVTC using the fieldmatch and
>decimate filters. I have compiled from source yesterday afternoon as
>outlined on https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu. Using
>the
>command:
>
>ffmpeg -i 4.18 -map 0:1 -map 0:3 -vf crop=704:480:10:0 -vf
>fieldmatch,decimate -c:v libx264 -preset veryfast -level 41 -crf 22 -c:a
>libfdk_aac -t 360 4.18.fieldmatch.decimate.mp4
>
>I result in a proper IVTC'ed video stream, but the video seems to go at an
>incorrect framerate (although running "ffmpeg -i 4.18.mp4" shows it at a
>23.976 fps). I did other versions (using -vf fieldmatch, -vf yadif, -vf
>pullup,fps=24000/1001, or -vf pullup -r 24000/1001, etc) and the audio
>track remains in sync with the video consistently. Adding the decimate
>filter in to the mix seems to make the video play faster than the audio
>leading to the desynchronization. I see that
>https://trac.ffmpeg.org/ticket/3019 claims this as fixed, but I'm still
>experiencing it.
>
>Samples (a snippet of the .vob cut using dd, MP4s going through various
>filter combinations, and then a 6 minute run of the encode using the
>command above to really show the AV desync) along with text output files
>are available on my dropbox at:
>
>https://www.dropbox.com/sh/v9jp4pdxzad4a7g/djUTH4OYcA
>
>If I can help in any way, let me know! A good IVTC solution is the ONLY
>thing I miss from Windows so far. I've had hit and miss results with
>pullup
>and -r and/or -fps
>
>Steven Boyer
>_______________________________________________


I can¹t do it very well with ffmpeg. Parts just return double frames (1
dup per pair) Here¹s closest I could get in a number of tries:

ffmpeg -i 'long.sample.vob' -vf "fieldmatch=order=tff, fps=fps=24000/1001"
-pix_fmt yuv420p -c:v libx264 -preset slower -tune film -crf 18 -maxrate
2100k -bufsize 1835k 'long.sample.m4v'


Mencoder seems right on the money for most of the clip, but it¹s not
absolutely perfect either.

mencoder -v Œlong.sample.vob¹ -oac copy -o 'long.sample.mp4' -demuxer lavf
-vf filmdint=io=30:24,softskip,gradfun,fspp -noskip -mc 0 -of lavf
-lavfopts format=mp4 -aspect 4/3 -alang en -oac faac -faacopts
br=192:mpeg=4:object=2:raw -ovc x264 -x264encopts
crf=28:bitrate=1375:nocabac:level_idc=31:bframes=0:global_header:qcomp=0.7:
threads=auto:subq=5:frameref=1:partitions=all:trellis=1:qp_step=4 -ofps
24000/1001


Laine Lee




More information about the ffmpeg-user mailing list