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.
This tool is in the early stages of development, so the way to use it will probably be changed in the future.
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).| 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 :
. or , : the decimal separator to use,
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.
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 |
0 to 9, 0 if missing).d for days, h for hours, and so on …)
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 those who don't want or cannot compile binaries for Mac, there are some precompiled Mac binaries made by Jan Weiß (who also helped with testing, suggestions and updating of this page) in the download section.