Tick frequency for media processing

It’s common to use high precision tick count for measuring the duration of media.

For example, the duration of one video frame is about 0.033366… second. It’s inconvenient because it’s not integer.

Instead, DirectShow uses 100ns as a unit (=10Mhz). The duration of one video frame is then 333667 ticks.

Though it’s good enough for Media Player, it’s not sufficient for professional video processing. As you can see, 333667 ticks is not exactly correct – the actual duration is 333666.6666… ticks. This lack of precision causes serious problem when the errors are accumulated.

Ideally, we should use a precision high enough to describe all the media duration precisely. Practically, we have these numbers;

Duration (second)



Duration of one video frame in US broadcasting.


Duration of one video frame in European broadcasting.


Movie frame duration


High-end HD broadcasting frame duration


A common frame rate for legacy web video


A duration of one 48khz audio sample (DVD)


A duration of one 96khz audio sample (High quality audio)


A duration of one 44.1khz audio sample (audio CD)


A duration of one 32khz audio sample (4ch DV tape)


To represent them in integer, we need tick frequency:

lcm(30000, 25, 24000, 60000, 15, 48000, 96000, 44100, 32000) = 70560kHz

70560kHz is surely ideal but too expensive. The hardware clock generator for such high frequency is uncommon and quite expensive. The clock generator must be installed to STBs at the subscriber’s house. It needs to be very cost effective.

Good news is, practically, it’s rare to describe the audio duration in sample duration precision. If we don’t have to consider audio, the story is much simper.

lcm(30000, 25, 24000, 60000, 15) = 120khz

So, the next question is "What’s the frequency more than 120khz and the clock generator is cheap?"

The answer was 27Mhz.

27Mhz is beautiful because it’s integral multiple of 120khz. It’s high frequency enough even for audio for most practical purpose. And, 24 hours duration is just fit in 42bits register. With current 64bits data register, it even count up to 21664 years.

Most video processing software, hardware, and standard/specifications, therefore, use 27Mhz as tick frequency.


About Moto

Engineer who likes coding
This entry was posted in Video. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s