[FFmpeg-user] Mixed telecined non-telecined media to constant frame rate.

Nicholas Robbins nickrobbins at yahoo.com
Tue Jan 21 00:12:40 CET 2014


I have dvds that were produced as a mixture of 24fps[*] and 30fps content[**]. Live action scenes were filmed at 24fps but CGI was at 30fps.  If I use -vf fieldmatch,decimate the cgi scene have judder. If I use -vf fieldmatch, the live action scenes have judder. If I use -vf pullup, all is well! No judder and ffmpeg produces a variable frame rate file. Good work ffmpeg! (also a case where pullup is superior)

However, there is a problem. My set top box can't deal with vfr files. It adds judder! So what do I do? My thought was to add a fps onto the filterchain. Ideally fps=120 would work, but my media player also doesn't play more than 60fps. So I tried fps=60. 

When I stepped through the output frame by frame, I find that I get a pattern of 2 identical frames, 2 identical frames, 2 identical frames, and then 4 identical frames. Working it out pencil & paper, I think I should be seeing 2,3,2,3. 

The best explanation I can get for this is that each block of 5 frames ABCDE of 30 fps is being converted into 4 frames of 24 fps as appropriate giving ABCX_ where ABC have unaltered time codes and X has D's timecode and there is a gap. 

Indeed if I don't put in any fps filter I see that I have frames at the following pkt_pts's
...
20020
20053
20087
20120*
20187
20220
20254
20287*
20354
20387
20420
20454*
20521
20554
20587
20621*
20687
20721
20754
....

I've marked the frames before the gaps. Note that they all still have pkt_duration=33.

Is there a way to change the pts's of the frames in the sections marked with pullup? So that the fps=60 (or 120 for that matter) can treat those sections properly.

Note that I've tried this with fps=120 and then I get 4,4,4,8 rather than 5,5,5,5 which should happen. 

-Nicholas Robbins


[*] all frame rates are over 1001.
[**] babylon 5:  http://www.modeemi.fi/~leopold/Babylon5/DVD/DVDTransfer.html


More information about the ffmpeg-user mailing list