Skip to main content

commands for syncing audio video recordings

Project description

tictacsync

Warning: this is at beta stage

Unfinished sloppy code ahead, but should run without errors. Some functionalities are still missing. Don't run the code without parental supervision. Suggestions and enquiries are welcome via the lists hosted on sourcehut.

Description

tictacsync is a python script to sync, cut and join audio files against camera files shot using a specific hardware timecode generator called Tic Tac Sync. The timecode is named TicTacCode and should be recorded on a scratch track on each device for tictacsync to work.

Status

Feature complete! tictacsync scans for audio video files and then merges overlapping audio and video recordings, It

  • Decodes the TicTacCode audio track alongside your audio tracks
  • Establishes UTC start time (and end time) within 100 μs!
  • Syncs, cuts and joins any concurrent audio to camera files (using FFmpeg)
  • Processes multiple audio recorders
  • Corrects device clock drift so both ends coincide (thanks to sox)
  • Sets video metadata TC of multicam files for NLE timeline alignement
  • Writes synced ISO files with dedicated file names declared in tracks.txt
  • Produces nice plots.

Installation

This uses the python interpreter and multiple packages (so you need python 3 + pip). Also, you need to install two non-python command line executables: ffmpeg and sox. Make sure those are accessible through your PATH system environment variable. Then pip install the syncing program:

> pip install tictacsync

This should install python dependencies and the tictacsync command.

Usage

Download multiple sample files here (700+ MB, sorry) unzip and run:

> tictacsync dailies/loose

The program tictacsync will recursively scan the directory given as argument, find all audio that coincide with any video and merge them into a subfolder named SyncedMedia. When the argument is an unique media file (not a directory), no syncing will occur but the decoded starting time will be printed to stdout:

> tictacsync dailies/loose/MVI_0024.MP4

Recording started at 2024-03-12 23:07:01.4281 UTC
true sample rate: 48000.736 Hz
first sync at 27450 samples in channel 0
N.B.: all results are precise to the displayed digits!

If shooting multicam, put clips in their respective directories (using the camera name as folder name) and the audio under their own directory. tictacsync will detect that structured input and will generate multicam folders ready to be imported into your NLE (for now only DaVinci Resolve has been validated).

Options

-v

For a very verbose output add the -v flag:

> tictacsync -v dailies/loose/MVI_0024.MP4

--terse

For a one line output (or to suppress the progress bars) use the --terse flag:

> tictacsync --terse dailies/loose/MVI_0024.MP4 
dailies/loose/MVI_0024.MP4 UTC:2024-03-12 23:07:01.4281 pulse: 27450 in chan 0

--isos

Specifying --isos produces synced ISO audio files: for each synced <video-clip> a directory named <video-clip>_ISO will contain a set of ISO audio files each of exact same length, padded or trimmed to coincide with the video start. After re-editing and re-mixing in your DAW of choice a remergemix command will resync the new audio with the video and the new sound track will be updated on your NLE timeline, automagically on some NLEs or on command for Davinci Resolve.

> tictacsync --isos dailies/structured

-p

When called with the -p flag, zoomable plots will be produced for diagnostic purpose (close the plotting window for the 2nd one) and the decoded starting time will be output to stdin:

> tictacsync -p dailies/loose/MVI_0024.MP4

Typical first plot produced :

word

Typical second plot produced (note the 34 FSK encoded bits 0010111101001111100110000110010000): slicing

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tictacsync-1.5.2b0.tar.gz (77.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tictacsync-1.5.2b0-py3-none-any.whl (81.7 kB view details)

Uploaded Python 3

File details

Details for the file tictacsync-1.5.2b0.tar.gz.

File metadata

  • Download URL: tictacsync-1.5.2b0.tar.gz
  • Upload date:
  • Size: 77.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for tictacsync-1.5.2b0.tar.gz
Algorithm Hash digest
SHA256 251a3a10d7699276f5548afce15fdd2458d8ae3a535b4329899ed1f8653c2375
MD5 cb2914f46d7ab617721904ef71fc269b
BLAKE2b-256 23c7f2bdb721a250c5de3f507cc98a1bf9c8a7fe993bd7aed109047b91286d44

See more details on using hashes here.

File details

Details for the file tictacsync-1.5.2b0-py3-none-any.whl.

File metadata

  • Download URL: tictacsync-1.5.2b0-py3-none-any.whl
  • Upload date:
  • Size: 81.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for tictacsync-1.5.2b0-py3-none-any.whl
Algorithm Hash digest
SHA256 e35c3b45b6bd6c401cf3adf67aefce32b0c72fd8c404bcc706bbedc5fa840bd6
MD5 f7340356f8c48f2d27916f42d1961a0c
BLAKE2b-256 56547b376087a88f883632a970af300cba5e2dd005a091251ac991b52e06f727

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page