LTC.wasm decodes SMPTE timecodes from an LTC encoded audio signal.
To synchronize multiple music and video recordings a shared SMPTE timecode signal is often used. For practical purposes the timecode signal is encoded in an audio stream. The timecode can then be recorded in sync with microphone inputs or added to a video recording. The timecode is encoded in audio with LTC, linear timecode
The first step is to extract, downmix and resample audio from the incoming media file. This is done with a wasm version of ffmpeg. If a video file with multiple audio streams enters the system, the first audio stream is used for synchronization.
The next step is to extract SMPTE data.
The final step is to show the results.
To use go to the LTC.wasm website and drag and drop your media files containing SMPTE. Similarly to the screencapture above.
After installing make, git, emscripten and a c compiler, the following should get you started:
make downloadlibltc make web
First the libltc library is downloaded and then the c code is compiled with emscripten. The bridge is a
To capture stdout at the javascript side, the ltcdec.js file needs to be modified. The first statement should be:
var Module = typeof Module != "undefined" ? Module : { 'print': function(text) { handleStdout(text) } };
To test if the bridge is working correctly, the there is also a plain c version. The supplied raw file needs to be a headerless audio file with f32le samples.
#make downloadlibltc make plain make clean /bin/ltc_dec test/test.raw
The LTC.wasm software was developed at IPEM, Ghent University by Joren Six.
- libltc ‘libltc provides functionality to encode and decode LTC audio from/to SMPTE or EBU timecode, including SMPTE date support.’ LGPL
- ffmpeg ‘A complete, cross-platform solution to record, convert and stream audio and video.’ The licenses depend on which components are included in your ffmpeg build.
- ffmpeg.audio.wasm A wasm version of ffmpeg with a focus on audio extraction. The licenses depend on which components are included in your ffmpeg build.