[FFmpeg-user] Pullup old MPEG-2

Nicholas Robbins nickrobbins at yahoo.com
Mon Dec 21 15:59:01 CET 2015

> On Monday, December 21, 2015 12:39 AM, llee782 <llee040 at sbcglobal.net> wrote:

> > Carl Eugen Hoyos wrote
>>  Your MEncoder command line includes "-ofps 24000/1001".
>>  How is this supposed to work for 30fps progressive 
>>  input?
> The inverse telecine operation must yield video of 23.94 fps rather than
> 29.97 fps, right?
> Laine


It seems like you may be asking too much from your command. Having spent some time converting dvd's to mkv's, I've encountered the following on dvds:

1) 24 fps labeled 30fps
2) 24 fps telecined to 30fps
3) 30 fps interlaced material
4) 30 fps progressive material
5) a mix of 2 & 4 in the same title

6) a mix of 1 & 2 in the same title
7) a mix of 2 & 3 in the same title
8) a mix of 3 & 4 in the same title

9) 25 fps telecined to 30 fps (PAL->NTSC)
10) Rarely, 24 fps -> 30 fps by duping every 4th frame.

I have a different ffmpeg "-vf" command for each option, and there is no automated way to tell what is what (except I can detect 1) by actually counting the frames.)

You have to use your eyes. Just find a scene with some horizontal movement, a pan or a person walking across the shot, looking for combing, if there is combing on every frame, it is probably interlaced. If there is combing for 2 frames out of every five, it is probably telecined. If there are effect shots, check them separately, they might be made differently. If there are lots of shots of TV's check those separately too.

There is no single command that will do the correct thing will all of these. If you through enough fieldmatch's and yadif's at it you will get rid of all the combs, but you will also produce blurry juddery video.

The ffmpeg commands I use are:

1) -r 24000/1001 (I've also used -fps=24000/1001, but -r works better for me for this)
2) -vf fieldmatch,decimate (produces 24000/1001)

3) -vf yadif=mode=1 (produces 60)
4) Nothing
5) -vf pullup,dejudder,fps=fps=120000/1001:round=zero (Leave of the fps if you can deal with vfr output)

6) -vf pullup,dejudder,fps=fps=24000/1001:round=zero   
7) -vf pullup,dejudder,idet,yadif=mode=1:deint=interlaced,fps=fps=120000/1001:round=zero (leave off fps if you can deal with vfr output) 8) -vf idet,yadif=mode=1:deint=interlaced,fps=fps=60000/1001:round=zero
9) -vf fieldmatch,decimate=6
10) -vf decimate=5

There is no single command that will work.


More information about the ffmpeg-user mailing list