Log in

View Full Version : confused about 23.976


Jan Marijniszoon
15th July 2008, 22:41
Hello guys (and some girls),

To get the correct framerate I know that you officialy need to do 24 / 1.001 and then you get 23,976023976023976023976023976024
If you round this off to six decimates you get: 23.976024

Then why is it that AviSynth reports, when using the function: WriteFile("info.txt","Framerate"), that the framerate is 23.976044?

Then there is this other value too...when you instruct Avisynth that the framerate should be 23.976, then Avisynth reports 23.975986

So to summarize we got three different values:

23.976024
23.976044
23.975986

Now which one is the most correct? Can someone clear out this confusing matter once and for all?

Thanks in advance!

mpucoder
16th July 2008, 00:09
23.976024 is the closest to correct. However, even though the framerate is described as 24000 / 1001 in iso 13818-2, that is only an approximation.

The actual framerate of NTSC is determined from the color subcarrier, which is 3579545 Hz. Each line is 227.5 color clocks long, and each frame contains 525 lines. So each frame is 119437.5 color clocks long, yielding 3579545/119437.5 = 29.97002616 fps. Pulldown means that every 4 frames is displayed as 5, so the film framerate is 29.97002616 * 0.8 = 23.97602093

The framerate of NTSC DVD matches iso 13818-2 and is defined as 90000 / 3003 = 29.97002997... (90000 clock ticks per second, 3003 clock ticks per frame) giving a film framerate of 23.976023976...

Gavino
16th July 2008, 00:31
To add to mpucoder's explanation.

For the Avisynth aspects, see here (http://avisynth.org/mediawiki/AssumeFPS), for example. Basically it's to do with the limited precision of 32-bit floating-point numbers, which is roughly 7 decimal digits in total. That's why it's best, where possible, to specify the frame rate as two separate integer parameters, numerator (24000) and denominator (1001), or use a named preset such as "ntsc_film".

Jan Marijniszoon
16th July 2008, 00:59
Very good explanation guys!

But I still have some questions though...

When I use AssumeFPS(24000,1001), then Avisynth reports as info 23.976025. Which is strange to me...Why not 23.976024?

And also, why do many people use 23.9759856527702 instead of 24/1.001? What's the difference?

Gavino
16th July 2008, 09:10
When I use AssumeFPS(24000,1001), then Avisynth reports as info 23.976025. Which is strange to me...Why not 23.976024?

And also, why do many people use 23.9759856527702 instead of 24/1.001? What's the difference?
Info (http://avisynth.org/mediawiki/Info) reports it as 23.9760. However, if you do
Subtitle(string(Framerate))
it will show your 23.976025. Again, it's the limitations of floating point, and it's showing more precision than it actually has - the 8th digit and even the 7th one are subject to rounding errors unless the result and all numbers involved in the calculation can be represented exactly as a binary fraction.

As for using 23.9759856527702, that's just a waste of typing, for the same reason.

foxyshadis
16th July 2008, 21:32
On the non-technical side, no one really cares when there's a 1/10 of a second desync at most after two hours. Typical workflow and playback problems usually introduce much higher desyncs right from the outset; people are normally only sensitive to more than .3-.4 seconds of sync difference.

Jan Marijniszoon
17th July 2008, 11:00
Thanks alot you all! It's all more clearer to me now!

2Bdecided
17th July 2008, 12:08
23.976024 is the closest to correct. However, even though the framerate is described as 24000 / 1001 in iso 13818-2, that is only an approximation.

The actual framerate of NTSC is determined from the color subcarrier, which is 3579545 Hz.I think you've got this the wrong way around. While the differences are irrelevant for analogue video (which gives a tolerance of +/- 10Hz on the subcarrier), 24000/1001 is exactly right, while saying "the subcarrier is 3579545 Hz" is an approximation.

The subcarrier (as defined in SMPTE 170M) is exactly 5MHz * (63/88) = 3579545.4545....ish. Work from that, and you get exactly 30000/1001 frame rate. This is how the analogue video signal is defined, and AFAIK has been since the introduction of "color" (it really was 30fps before then) - though of course no analogue signal is that accurate.

The digital video signal matches the "perfect" analogue signal perfectly (as you've noted). 858 total samples per line, 13.5MHz sampling, 525 lines per frame. 13.5MHz/(858*525)=13500000/450450=30000/1001.

3-2 pulldown of this for film material really does give you exactly 24000 / 1001.


But I live in PAL land, so I don't care - 25fps exactly is nice and simple!

Cheers,
David.

Jan Marijniszoon
17th July 2008, 16:45
Well soon we all move to HD land and then you should care ;)

2Bdecided
17th July 2008, 17:11
Hey, I'm there too, and it's still 25fps! ;)

Integer number of frames per second, integer number of audio samples per frame. If only would could convince the film industry to move up by 1fps, it would be perfect!

Cheers,
David.

Mug Funky
27th July 2008, 15:49
most projectors these days can handle 25fps.

several cannes films were shot native 25fps, one of which stayed at 25 simply to stay within the time constraints of the short film section...