Site Tools

New release available: 2013-12-08 "Binky". upgrade now! [43] (what's this?)
New release candidate available: 2013-11-18 "Binky" RC2. upgrade now! [42] (what's this?)
New release candidate available: 2013-10-28 "Binky" RC1. upgrade now! [41] (what's this?)


The Epeios timecode calculator (ETMCCALC)


etmccalc is a tool which makes calculations with timecodes and related ways of measuring time for audio-visual media.

The etmccalc tool exclusively uses system and C/C++ standard libraries. So, no other packages have to be installed for etmccalc to work properly.

The Windows binary is included in the package. To obtain the linux binary, (or the cygwin one), simply unpack the package, and launch make in the obtained directory. This should also work for Mac OS X and probably all POSIX-like systems.

If the Windows binary doesn't work on your Windows system, please take a look to this page.


This tool (and the underlying libraries) are released under the GNU General Public License. This is the default licence, but, under some circumstances, other licences (with less restrictions, like GNU Lesser General Public License) are possible. Please contact me for more details.


  • Last stable release : 0.7.2 (2009-10-14)

How to use

This tool is in the early stages of development, so the way to use it will probably be changed in the future.

Command line syntax

This is the general command line syntax:

etmccalc [<options>] <fps> [<timcode>[ <timecode>[...]]]

where :

  • options :
    • (-f|--format) <format> : output formating specification. Default is the content of the enviroment variable ETMCCALC_FORMAT or, if empty or not defined, '%P'. See below for more details.
    • (-p|--punctuations) <punctuations> : punctuations used for %p (see above). Default is the content of the enviroment variable ETMCCALC_PUNCTUATIONS or, if empty or not defined, ';:'. See below for more details.
  • fps is the frames-per-second specification for the result (an integer, 23(d|n), 24d, 29(n|d), 30d, 59(n|d) or 60d (d for drop-frame, n for not realtime)),
  • timecode the timecode for the calculation (currently in h:m:s:f@fps format ; for fps value, see above).

Output formating

Display markers

Marker Signification
%% % sign
%<f>d Amount of days
%<f>D Same as %<f>d
%<f>h Hours in the day
%<f>H Total amount of hours
%<f>m Minutes in the hour
%<f>M Total amount of minutes
%<f>s Seconds in the minute
%<f>S Total amount of seconds
%<f>f Frames in the second
%<f>F Total amount of frames
%c Remainder as float (for testing purpose)
%C Remainder as fraction (for testing purpose)
%p FPS-type dependent punctuation (see below)
%E After Effect format (%2H%p%2m%p%2s%p%2f)
%P Final Cut Pro format (%2H:%2m:%2s%p%2f)

<f> : [<w>][(.|,)[<p>]] (1 by default). Optional set of following flags :

  • <w> : count of the minimum amount of digits for the integer part,
  • . or , : the decimal separator to use,
  • <p> : count of the maximum amount of digits for the fractional part.

The punctuations option is used for the '%p' format marker. For drop frame, the first character is used. For non-real-time, the second character is used if set. If not defined the one for drop frame is used. For non drop frame, the third character is used if set. Alternatively the one for non-real-time is used.

Rounding markers

These optional markers specify how the timecode values are rounded, but don't cause anything to be display. You have to specify a display marker (see above) to see some output.

This rounding markers affect the timecode as a whole. For example, if you specify %<m (round down the minutes), the seconds (and frames) value will always be 0.

Marker Signification
%<[<p>]<t> Round down
%=[<p>]<t> Mathematical rounding (default rounding)
%>[<p>]<t> Round up
  • <p> : rounding precision (optional, 0 to 9, 0 if missing).
  • <t> : rounding target (d for days, h for hours, and so on …)


Let's say you want to convert an NTSC/29.97 frame count to a PAL frame count:

etmccalc -f '%F' 25 '7035@30d'
=> 5863

The last example will round as taught in school. So if you are interested in the size of the error you can do this:

etmccalc -f '%F %c' 25 '7035@30d'
=> 5863 -0.0143

The result now contains a second value that tells you the error in seconds. A negative value means that the actual value should be smaller by the amount given. In this case the value was about 1/100 of a second smaller (0.01 seconds). The resulting value is too large by the same amount.

If you want to force rounding up or rounding down you can do it like this:

etmccalc -f '%>0F%F %c' 25 '7035@30d'
=> 5864 0.0257

For rounding down just swap the ”>” with a ”<”.

There currently is no obvious way to convert from seconds (as a float value) to anything else. Here is a workaround:

etmccalc -f '%<0F%F' 30d '1.7035@10000'
=> 51


Due to the variable types used, the maximum frame rate is 4294967295 fps. This is also the maximum value for any other integer.

Old versions.

For Mac OS X users

For those who don't want or cannot compile binaries for Mac OS X, there are some precompiled Mac OS X binaries made by Jan Weiß (who also helped with testing, suggestions and updating of this page) in the download section.


etmccalc.txt · Last modified: 2009/10/14 16:40 by