How to add timecode to older video recorders
670 words, 4 minutes.
Something a little bit different to the usual things I write about here. This post is an aide-mémoire for me as much as anything, but maybe you’ll find it useful too. I’ve recently been trying to utilise timecode on a number of video and audio devices to help with editing in post. After a few false starts, I think I now have the tools, and a process, that works.
For the last year I’ve turned a hobby into useful—and dare I admit, fun—work. Towards the end of 2022, I decided I needed a break from full time tech-industry work, and happened to mention this to a local garage that serviced my car. Cue a short conversation, and me agreeing to help them build a YouTube channel. It was a great opportunity to make use of the knowledge and experience I’d built up of marketing and communities in software companies. The goal was not a monetised YT channel, but a ‘marketing funnel’ to raise awareness of a young brand.
Complexity
As time has gone on, our video ideas have become more complex. After a recent filming trip, I found myself trying to coordinate footage from 10 cameras and three sources of audio!
I already owned Zoom audio equipment, and researching timecode use for them led me to Timecode Systems’ (now owned by Atomos) UltraSync products, in particular their Blue device.
A very helpful friend already owned a couple of Blues, so I borrowed them to try out. Syncing the audio devices with my main camera was easy enough, especially since Fujifilm have recently added UltraSync Blue support to the X-H2S.
The problems arise with devices like DJI drones and older Osmo Action cameras (the newer 3 and 4 support timecode jamming via a cable.
Adding timecode with ffmpeg
Whilst down another rabbit hole on using ffmpeg to re-encode ProRes footage, I discovered you can embed timecode; and the UltraSync Blue app is also a slate.
The easiest solution for these older devices seems to be relatively simple then — start recording facing the UltraSync Blue Slate app to grab the timecode that instant, then use ffmpeg to embed timecode in the clip metadata.
That’s an important thing to note — you need the timecode right at the beginning of the clip. So don’t start recording, then put the slate in front of the camera. Timecode embeds from the absolute beginning of the file, so it’s important to have the image as the first frame. Or, at least, trim the clip so it’s the first frame (but that’s another step, ergo faff).
From the first frame, we now know what the starting timecode is and it can be embedded in the video file. I found a relatively cheap app to help with this, QTchange. Under the hood, it uses ffmpeg to do the work, and since I’d only recently built an Apple Silicon specific version of ffmpeg (good for moving video processing off to the embedded GPU in my laptop’s M1 Max processor) and was comfortable working in a terminal, I didn’t see the need for it. If you prefer using graphical interface tools, then QTchange is probably a worthwhile spend.
With the image above as an example, we know the starting timecode is 10:28:22:00
. To embed that in a video file we can use these switches with ffmpeg:
ffmpeg -i dji_mimo_20240602_102956_23_1717320826054_video.mp4 -timecode 10:28:22:00 -codec copy osmo.mp4
Note that -i
is the input file.
Now when I build a Multicam Clip in FCP, every clip has timecode embedded, and they synchronise perfectly:
A relatively cheap solution, that will save hours of work.
Update, October 2024: I’ve now automated most of this with Apple Shortcuts. I’m sure these two could be folded down into one shortcut, but I was developing them in separate steps, and now it works to the point I can’t be bothered to distil it further. One shortcut extracts the first frame and OCRs the numbers (timecode) out, then a second shortcut applies the timecode. Here’s what they look like: