4

One video processing software vendor i work with uses the multiplicator "27000" to describe in and out points of videos in full numbers. I never got out why...

One example: We want to describe the point [end of the first frame] of a video that has got those properties

  • Frames per second: 23.976
  • milliseconds per frame: 41,70837504170838
  • fps numerator/denominator: 24000/1001

My question is: what makes the number 27000 magical for videos? Or what formula could i use to calculate it... When multiplying any of the following common video framerates with this magic number, we always get an a value without commas:

Outpoint = (1000/23,97602397602398) * 27000 = 1126125

In Words:

Outpoint= (MillisecondsInASecond/MilliSecondsPerFrame) * 27000

Here a list of common framerates: enter image description here

Harry
  • 1,233
  • 10
  • 24
  • Long time after asking this, i found further, very good information in the comments here https://stackoverflow.com/questions/43333542/what-is-video-timescale-timebase-or-timestamp-in-ffmpeg/43337235#43337235 – Harry May 05 '21 at 17:40

1 Answers1

13

It's not really magic. It's about common demoninators... 27000 is just the product of the cubes of the first three prime numbers ...

27000 = 2^3 * 3^3 * 5^3

That is, 27000 is evenly divisible by a whole slew of numbers...

 2
 3
 4  (=2*2)
 5
 6  (=2*3)
 8  (=2*2*2)
 9  (=3*3)
10  (=2*5)
12  (=2*2*3)
15  (=3*5)

(notably absent from the list of divisors are primes... 7, 11, 13, ...)

So 27000 is an even multiple of the most common frame rates:

24   (=2*2*2*3)
25   (=5*5)
30   (=2*3*5)
50   (=2*5*5)
60   (=2*2*3*5)
120  (=2*2*2*3*5)

1001 milliseconds / 24 frames

( 1001 / 24 ) * 27000 

can be refactored as

1001 * ( 27000 / 24 )

the trick is that 27000 (2^3*3^3*5^3) is evenly divisible by 24 (2^3*3)

1001 * ( 2^3*3^3*5^3 ) / (2^3*3)

or

1001 * (3^2*5^3)  

This trick with 27000 wouldn't work with bizarre frame rates. I don't think anyone does a framerate of 77 frames per second (77=7*11).

spencer7593
  • 106,611
  • 15
  • 112
  • 140