[FFmpeg-user] Four Quick Questions and a tough one

John Van Ostrand john at vanostrand.com
Thu May 12 17:47:54 EEST 2022


Hi Everybody,

Hopefully these are quick and easy questions to answer. The background: I'm
working with my own 60 year old 8 mm home movies and the digitizing lab
presumed they were 18fps, I think they are 16 fps.  So I have to change
that and also do other things like make cuts, colour correct, etc. I'd like
to preserve the quality.

1. In changing FPS what is better when going from 16 fps to 24 fps a
pattern of 2 frames+duplicate or 3 frames+2 dupes +3 frames+1 duplicate, or
something else?

2. When performing many different filters or changes to a video (fps
change, colour correction, etc) how bad is it to perform that in many steps
instead of a filter_complex? Does decode/rencode eventually create chaos?
Is there a way to do it without further loss? the "-c copy" codec has
issues when not used on a keyframe, right?

3. What Linux tool is useful for determining cuts on an exact frame
boundary. And since a frame isn't a point in time but a brief period (41.66
ms in this case) how important is it to be exactly on a time boundary.

4. Am I being too picky about all this?

5. These two source files produce a different frame pattern when I inverse
telecine, then telecine with the correct frame rate. The 8mm was done from
18 fps to 24 fps. It should have been 16 fps to 24 fps.

input.mp4
=========
Pattern 1-2-3-3 (3 frames + dupe)
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1920x1080, 11413 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc (default)

ffmpeg -r 21.33333 -i input.mp4 -vf mpdecimate=lo=500 -r 24 -t 3 output.mp4
produces:

Pattern: 1-1-2-3-3+4-5-6-6 (1 frame + dupe, 2 frames + dupe, 3 frames +
dupe)
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
bt709), 1920x1080, 4535 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)

input2.mp4
==========
Pattern: 1-2-3-3 (3 frames + dupe)
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 13365 kb/s, 24 fps, 24 tbr, 24k tbn, 48 tbc
(default)

ffmpeg -r 21.33333 -i input2.mp4 -filter_complex mpdecimate=lo=500 -r 24 -t
3 output2.mp4

Pattern 1-2-2 (2 frames + dupe)
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 4731 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc
(default)

I'm checking using ffmpeg -i output.mp4 -vsync vfr -q 2 frame\ %04d.jpg and
looking at the frames.
-- 
John Van Ostrand
At large on sabbatical


More information about the ffmpeg-user mailing list