-
Notifications
You must be signed in to change notification settings - Fork 101
Auto Audio Align
After decoding your Video RF and or HiFi FM audio you will want to sync your decoded audio data with your video file or Linear captures made by audio ADC's running off the same clock source like the Clockgen Mod or MISRC.
There is a few ways to do this, as it is only a simple process of reading the post decoded .JSON file for total duration and offsets from dropped fields/frames of information, but the standard workflow currently uses Rene Wolfs implementation for Windows, Linux and MacOS, however this may change to a more universal python replacement later as Mono is considered an extra dependency.
With a standard configuration you just need to alter the following:
-i baseband.wav
Input PCM or FLAC audio file.
--json capture.tbc.json
Input TBC JSON from decoded video RF.
baseband_aligned.flac
Output name at the end (also s16 will do 16-bit if s24 is replaced)
-
--stream-sample-rate-hz-
Input rate of your audio file in Hz i.e 46875 for clockgen baseband or 48000 for hifi-decode or 44100 for ld-decode.
--rf-video-sample-rate-hz
Capture rate of your base file this normally will be 40000000 (40Msps) or 20000000 (20Msps) & 16000000 (16Msps) for down-sampled captures.
Tip
Below is premade commands for usage:
"ffmpeg" -i baseband.wav -filter 'channelmap=map=FL-FL|FR-FR' -f s24le -ac 2 - | mono VhsDecodeAutoAudioAlign.exe stream-align --sample-size-bytes 6 --stream-sample-rate-hz 46875 --json capture.tbc.json --rf-video-sample-rate-hz 40000000 | ffmpeg -f s24le -ar 46875 -ac 2 -i - -af aresample=48000 -sample_fmt s32 baseband_aligned.flac
"ffmpeg" -i baseband.wav -filter_complex "[0:a]channelsplit=channel_layout=2.1:channels=FL[FL]" -map "[FL]" -f s24le -ac 1 - | mono VhsDecodeAutoAudioAlign.exe stream-align --sample-size-bytes 3 --stream-sample-rate-hz 46875 --json capture.tbc.json --rf-video-sample-rate-hz 40000000 | ffmpeg -f s24le -ar 46875 -ac 1 -i - -af aresample=48000 -sample_fmt s32 baseband_aligned.flac
ffmpeg.exe -i baseband.wav -filter_complex "channelmap=map=FL-FL|FR-FR" -f s24le -ac 2 - | VhsDecodeAutoAudioAlign.exe stream-align --sample-size-bytes 6 --stream-sample-rate-hz 46875 --json capture.tbc.json --rf-video-sample-rate-hz 40000000 | ffmpeg.exe -f s24le -ar 46875 -ac 2 -i - -af aresample=48000 -sample_fmt s32 baseband_aligned.flac
ffmpeg.exe -i baseband.wav -filter_complex "[0:a]channelsplit=channel_layout=2.1:channels=FL[FL]" -map "[FL]" -f s24le -ac 1 - | VhsDecodeAutoAudioAlign.exe stream-align --sample-size-bytes 3 --stream-sample-rate-hz 46875 --json capture.tbc.json --rf-video-sample-rate-hz 40000000 | ffmpeg.exe -f s24le -ar 46875 -ac 1 -i - -af aresample=48000 -sample_fmt s32 baseband_aligned.flac
- FAQ - Frequently Asked Questions
- Diagram Breakdowns
- Visual-Comparisons
- VCR Reports / RF Tap Examples
- Download & Contribute Data
- Speed Testing
- Capture Setup Guide
- MISRC
- CX Cards & CXADC
- CX Cards - Clockgen Mod
- DdD - Domesday Duplicator
- RTL-SDR
- Hardware Installation Guide
- Finding RF Tap Locations
- Amplifier Setup Guide
- The Tap List Example VCR's
- Visual VBI Data Guide
- Closed Captioning
- Teletext
- WSS Wide - Screen Signalling
- VITC Timecode
- VITS Signals
- XDS Data (PBS)
- Video ID IEC 61880
- Auto Audio Align
- Vapoursynth TBC Median Stacking Guide
- Ruxpin-Decode & TV Teddy Tapes
- Tony's GNU Radio For Dummies Guide
- Tony's GNU Radio Scripts
- DomesDay Duplicator Utilities
- ld-decode Utilities