9

I'm trying to select the correct capture options for ffmpeg and I'm confused by this kind of listing:

[decklink @ 00000000010564c0]   17      3840x2160 at 24000/1001 fps
[decklink @ 00000000010564c0]   18      3840x2160 at 24000/1000 fps
[decklink @ 00000000010564c0]   19      3840x2160 at 25000/1000 fps
[decklink @ 00000000010564c0]   20      3840x2160 at 30000/1001 fps
[decklink @ 00000000010564c0]   21      3840x2160 at 30000/1000 fps

Based on the fact that 24 and 30 have two entries and 25 only has one, I assume that the two 24 options are true 24fps and 23.9fps, and the two 30 options are true 30fps and 29.97fps.

But which is which? And why is this kind of notation used?

3 Answers 3

13

Yes, 24000/1000 is 24 fps and 24000/1001 is 23.976fps. Some refer to the X/1001 frame rates as "drop down" (as in "dropped down from the integer") but this is easy to confuse with "pull down" which often refers to the cadence of frames when fitting 24 or 25 fps material into a 30 fps program.

You can also think of these notations as 24,000 divided by 1,000 equals 24 and 24,000 divided by 1,001 equals 23.976023976 repeating. This notation is also the exact same thing as saying 24 divided by 1 equals 24 and 24 divided by 1.001 equals 23.976023976 repeating. It is, of course, quite ridiculous to articulate the repeating decimal values.

The 1001 options and their resulting notation are a legacy from analog color television systems. As Mulvya points out "it's because that's the smallest set of numbers that represent the value as integers". These standards are still around today mainly for backwards compatibility (with black and white television sets) and 'cause that's just the way TV grew up. Prior to color television, the NTSC frame rate was actually exactly thirty frames per second.

As for the 30000/1000 and 30000/1001 notation it comes from the NTSC video standard. "30"fps NTSC is actually displaying 30/1.001 frames per second (sometimes referred to as "29.97" or "30DF" for short, but to be precise 29.97002997... repeating frames per second). Due to this slight difference (.01%), NTSC uses either Drop-Frame (DF) or Non Drop-Frame (NDF) time-code counting. Drop-Frame "drops" frame counts in a pattern such that every ten minutes the time-code duration will correspond to the actual playback duration. No image frames are dropped and this was mainly a consideration for broadcasters fitting their programs with commercial breaks. Non Drop-Frame on the other hand more accurately represents a count of the total number of frames in a program (for those who enjoy counting in base 24:60:60:30...)

As for 25000/1000 there's no 25/1.001fps standard because 25fps is a PAL standard and PAL video systems were engineered using 50Hz AC power which did not have the same issues as NTSC when color came about.

7
  • You mentioned 50 Hz AC. Are you saying that these non-integer frame rates were used to avoid interference with AC power supply frequency? Jan 28, 2017 at 16:02
  • @VioletGiraffe both NTSC (29.97fps) and PAL(25fps) were engineered for use with AC mains. The characteristics of the US standard with AC (60Hz) led to the implementation of NTSC color video with 29.97 (30/1.001). The implementation of PAL color with the European AC standard (50Hz) did not require the same engineering considerations. This blog explains some of the history/engineering considerations for the non-integer standards. 24/1.001 came from fitting film (24fps) into NTSC. Fitting 24fps film into 25fps (PAL) video is much easier
    – MmmHmm
    Jan 28, 2017 at 17:04
  • @Mr.Kennedy, the non-integer frame rates are "drop frame", not drop down. Jan 28, 2017 at 17:26
  • @MichaelLiebman "drop frame" refers specifically to the time code, "some" refer to the non-integer frame rate as "drop down" - i.e. dropping the frame rate down from the integer, e.g. 30 drop down is the frame rate of NTSC & drop frame skips from 00;09;59;28 to 00;10;00;00. This was common parlance in the late nineties and early '00s prior to the ubiquity of digital standards.
    – MmmHmm
    Jan 28, 2017 at 18:12
  • In my entire career in television, which started in the mid-90s in the US, I've never heard the term "drop down" frame rate. I could not find any reference to that term in the SMPTE journal. Jan 28, 2017 at 19:22
6

Those are rational numbers. So, 24000/1000 = 24.000 and 24000/1001 = 23.976. These are in fact the exact representations i.e. 23.976 is an approximation but 24000 divided by 1001 isn't.

As for why 24000/1001 and not 24/1.001, it's because that's the smallest set of numbers that represent the value as integers. Else, a floating point variable would be needed for the denominator.

5
  • 1
    Regarding your last paragraph, are you sure integer data types are the reason it's represented in thousands? My understanding of programming is that if you do math on integer data types that results in decimals, the decimals are simply truncated in your result. If this is true then that certainly can't be the reason why they represent them in thousands.
    – user3643
    Jan 28, 2017 at 17:22
  • For storage in files. You can always cast the variables during operations.
    – Gyan
    Jan 28, 2017 at 17:28
  • 3
    From ffmpeg's rational.h: "While rational numbers can be expressed as floating-point numbers, the conversion process is a lossy one, so are floating-point operations. On the other hand, the nature of FFmpeg demands highly accurate calculation of timestamps." framerate is stored as a AVRational struct which has two ints - one for numerator and one for denominator.
    – Gyan
    Jan 28, 2017 at 18:40
  • 1
    @Mulvya I'm sorry, but I don't quite understand. How can a data structure be lossy? You still have to do the math on the numerator and denominator. And if there's only a finite number a frame rates that are used why can't they just be enumerated?
    – user3643
    Jan 28, 2017 at 19:27
  • 1
    I didn't say or quote anything about a "a data structure be lossy". Floating point numbers have precision limited by the space devoted to their storage. A rational rep can maintain better accuracy because in code involving framerate manipulation, ffmpeg uses custom routines that keep the value in num/den form i.e. it is not collapsed to a single floating-point or integer result.
    – Gyan
    Jan 28, 2017 at 19:43
4

The original framerate for broadcast television was 60 fields (half of a frame) per second in the U.S., and timing was based on the oscillation of AC power (so, clearly, European television needed a different framerate under the oldest technology).

However, when color was added to NTSC, the color signal interfered the audio signal. By this time, more advanced means of timing were available, so the quick fix was to reduce the frame rate ever so slightly. Color was done slightly differently in PAL and this adjustment was not necessary so there is no 25000/1001.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.