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

Nicholas Robbins nickrobbins at yahoo.com
Tue May 6 16:28:53 CEST 2014


> On Monday, May 5, 2014 11: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 was the one who asked him for the ffprobe output. List protocal is to post the output of these kinds of commands to the list so that it is archived for posterity. 

Something fishy is going on with these files. Both ffprobe files seem strange to me:

Looking at the short file, ffprobe reports the file is 37.66 seconds long and contains 1142 frames. That is 32.35 fps, very strange.

Looking at the long file, ffprobe reports that the files is 64 seconds long and contains 71617 frames.  I suspect that the 64 seconds part is crazytalk. If I assume the long file is somewhere between 42 and 46 minutes long  I get a frame rate of between 28.42 and 25.95. All nonsense frame rates, no sensible frame rate is in that range AFAIK. 

The problem is that decimate butchers PTS's. It recalculates the PTS's based on the stream's stated frame rate and the frame count. So if your stream says it is 29.97 fps then fieldmatch will set the PTS's of the output frames to be 23.98 fps, regardless of the actual input timestamps. If the actual input frame rate is different this causes sync issues of course 

It looks like you have a mix of frame rates in your video. Can you play VFR video on your phone?

If so, the solution is just use pullup. Pullup introduces judder sometimes. You might want to use the dejudder filter after the pullup. 

When they made these shows they used different methods for different types of scenes, some was filed at 24fps and TC'ed, some at interlaced 30fps, etc. I would scan through the vide and look to see if the whole thing is TC'ed. I would look at four kinds of scenes:

1) All live action, like the start of sample.vob
2) Composite shots, like the end of sample.vob (that TV is porbably not actually in the shot) also shots of the bridge screen will be composites. The ship orbiting might or might not be composite.
3) All model-work, outside shots of the ship in space
4) Live action with some FX, like someone getting phasered or a transporter.

If possible cut these out using ffmpeg -c copy or dd. If you are using ffmpeg, chuck the ther streams for this analysis. Then run the ffprobe command on each scene and see what frame count is "nb_read_frames" and divide the duration into that to get a fps. Hopefully it will be one of: 23.98, 24, 29.97, 30, 59.94, 60. 

Once you figure out what the producers of the show are doing frame rate, interlace, progressive, TC'ed wise, you can make a filterchain that should work.

If my STB could deal with VFR I would just use -vf pullup,dejudder for this kind of material, mixed telecine & progressive. If there was also interlaced in there, I might add yadif

-vf pullup,dejudder,idet,yadif=deint=interlaced:mode=1

Since my STB can't deal with VFR I make it CFR at the highest FR my box can deal with, "60" in my case, so I add fps=fps=60000/1001 to my filterchain.


> Steven Boyer
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user 



More information about the ffmpeg-user mailing list