Skip to content

Browser based SMTE timecode decoder for LTC encoded audio

License

Notifications You must be signed in to change notification settings

JorenSix/LTC.wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LTC.wasm

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

Extracting SMPTE data from audio
Fig. Extracting SMPTE data from audio.

How does LTC.wasm work?

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.

How to use LTC.wasm in the browser

To use go to the LTC.wasm website and drag and drop your media files containing SMPTE. Similarly to the screencapture above.

How to build and test LTC.wasm

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

Credits

The LTC.wasm software was developed at IPEM, Ghent University by Joren Six.

  • libltclibltc 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.

About

Browser based SMTE timecode decoder for LTC encoded audio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published