LuToC - Linear Time Code (SMPTE-LTC) Generator

LTC allows you to sync up multiple audio and video recorders so that they are frame-accurate for your post-production.

Similar projects worth following
SMPTE Time Codes are the industry (open) standards for synchronizing multiple video and audio recorders so that their recordings can be synchronized in post for easier editing of multi-cam and multi-mic projects. LTC is a simple streaming (manchester-encoded) signal often recorded as an audio track in a video or audio recording. The LuToC project aims to produce a simple to use, open-source/creative commons licensed and highly accurate LTC device for low-budget film, live event, and concert recording.

I first thought of this project when I saw a product (which shall not be named) that generated LTC from a small battery-powered brick. While the product would be very useful, it was pricey for what it did and I thought, "Good project for me to tackle!"

The project has these goals:

  1. Required - Support standard LTC signal generation. Stretch - Support additional, non-standard, LTC types (e.g. higher frame rates). Stretch - Support LTC "overlaid" over an audio signal, preferably with LTC encoded so that it can be filtered out and the original audio signal restored. (Encode onto a high carrier frequency?) Stretch - Sense whether LuToC output is connected, only generate LTC when connected, sleep after a period of time of no connection. Indicate connection status via display. Stretch - Support IRIG timecode formats.
  2. Required - 3.5mm line out jack. Stretch - 3.5mm line in jack. Stretch - Built-in mic and speaker for for LTC sync "over the air" and audio alerts. Stretch - Cable safety mechanisms.
  3. Required - Battery-powered operation via USB power. Stretch - Battery-powered operation via LiPo. Stretch - Battery-powered via camera-style battery. Stretch - Battery-powered via AA batteries. Stretch - Multiple batteries, with automatic failover. Stretch - Battery charging on-board from USB power source.
  4. Required - Power-on time of less than 20 seconds. Stretch - Power-on time of less than 1 second.
  5. Required - Push-button power-off. Stretch - Seamlessly handle power loss. Stretch - Automatic sleep mode.
  6. Required - Long battery life (12 hours). Stretch - Automatic re-establishment of sync after power restored. Stretch - Accurate battery remaining computation. Stretch - Multiple power modes (high-power [wifi, display], medium-power [digital LTC injection], low-power [LTC signal generation, analog injection], sleep [for fast startup].)
  7. Required - LTC time generation with very low drift (over a day's project cannot drift more than 1/30s), Stretch - Less than one frame drift over one month.
  8. Required - (Re)configuration of device over USB via desktop application. Stretch - Configuration of the LTC time and signal format (frame rate) from a web UI via WiFi "hotspot" mode. Stretch - Configuration via on-device buttons/touchscreen. Stretch - Configuration over audio in. Stretch - Screen/button "hold" to prevent accidental presses.
  9. Required - LED indicators showing battery level, current run status (whether LTC is being generated.) Required - A way to indicate that multiple LuToC's are synchronized. Stretch - LCD/OLED screen with text display. Stretch - LCD/OLED screen with graphical UI. Stretch - Status reported via audio indicators using built-in speaker.
  10. Required - Establish time on LuToC devices via sync with a computer over USB. Stretch - Establish time with computer over WiFi, Bluetooth. Stretch - Sync between LuToC devices via Wifi or Bluetooth. Stretch - Establish/maintain sync via GPS receiver. Stretch - Sync with phones or other devices over WiFi/Bluetooth. Stretch - Sync via LTC input. Stretch - Wireless communication between LuToCs and other devices to ensure time remains synced.

I'm thinking eventually this would run on an ESP32 board with a LiPo battery, a stereo mic/line-in jack (useful for receiving LTC, or for passing audio through), a stereo headphone jack, and a micro-USB plug. But I'm a software guy so would need to have someone design a board.

Likely will use libltc and the I2S API provided by esp-idf.

  • how you can help, + LTC output

    Chris Knight10/01/2020 at 01:22 0 comments

    Next up for me is to adapt existing LTC code to this project.

    Help I could use:

    1) Guidance on what features you feel we need for this to work in a production environment. -- display? input button(s)? time sync input? phone app?

    2) 3D-printed case -- I don't have my own printer and know very little about 3-D printing model design (a rabbit hole I've intentionally avoided). A case would be a great selling point. A modular case (whether you want a display or not, whether you want an internal LiPo battery or use a USB cable power source, whether to have a timecode input cable port, etc.)

    3) Testing ideas -- how would we test the signal is "compliant"? I can test with Panasonic GH4/GH5 but I don't know if I have any other hardware that work with LTC.

  • github repo created

    Chris Knight09/30/2020 at 17:19 0 comments

    In order to collaborate on development, I've created a repo on github. I have started work on the code, currently it connect to wifi, syncs with NTP, and prints the RTC time. Short-term, I'll write code to *set* the RTC from the NTP time (one-shot on startup, we won't want to be running wifi all the time, yes?

View all 2 project logs

Enjoy this project?



Joe Coutcher wrote 04/08/2021 at 19:50 point

@Chris Knight - Have you looked at the M5Stack board?

These are pretty handy for prototyping small devices that require a screen.  I used them as Wi-Fi enabled tally lights combined with an ESP32 acting as an access point on a video mixer.  Having a built in ISP, might be able to tie into that, along with the on-board mic to provide both timecode and audio on separate channels.  Also, it has a RTC.  The battery is very weak, but you could plug it into a USB power bank.

I need something similar to sync 5 cameras together (so I don't have to do it manually in post), and totally agree that alternative products are pricey.

  Are you sure? yes | no

Chris Knight wrote 09/30/2020 at 02:42 point

I have my boards and they're talking to each other over the Qwiic connector. Some further thoughts -- I'm thinking NTP time synchronization to set the realtime clock makes the most sense. I could probably have a web UI for setting/showing the time but setting the time via a web browser will not be sub-second accurate. I suppose a specialized web client (like a phone app) could work, but NTP is well understood, very accurate, and "automagic" on most networks.

Would a small display (e-paper? or LED) to indicate current operating state be worthwhile? The devices that got me thinking about this project lack a display and rely on a phone app.

  Are you sure? yes | no

Chris Knight wrote 09/24/2020 at 15:19 point

I've been learning ESP32 (esp-idf) with an WS2812 strip and e-paper, plus my day job talked about timecode yesterday, so I am coming back to this project soon. I picked up a SparkFun ESP32 board with LoRa (would be really cool to timecode sync over LoRa! More likely to work well in an RF-heavy multicam shoot environment) plus a RTC board and an audio jack breakout board and jack.

In the meantime, I'll look into more details on what would make sense to connect to the audio jack and what API to use to send data. I've been using the "FastLED-idf" library for my WS2812 string with reasonable success, and it's recently switched from the RMT API to the I2S API for bit-banging to the string and that did seem to improve performance.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates