Help with automating sound sync correction?

Random chit-chat and anything that doesn't belong elsewhere
Post Reply
Chris_BBR
Novice
Posts: 63
Joined: Tue Nov 24, 2009 2:36 pm

Help with automating sound sync correction?

Post by Chris_BBR »

I have a DVD (BBC comedy series from the 1990s called The High Life) that was poorly mastered with the sound half a second out of sync with the video. I'm on a Mac, and target playback device is Apple TV.

Post-HandBrake (CLI, latest snapshot, default ATV preset), I can manually fix each mp4 with QuickTime Player Pro 7 by extracting the audio, cutting 0.5 seconds from the start and adding 0.5 seconds to the end, and then adding it back to the mp4.

However, as it's a repetitive task and I'm that kind of guy, I'd much prefer to automate the process. I know my way round AppleScript, but I'm getting nowhere trying to automate QTP to extract the audio, do the edit, and then remux.

Can the collective wisdom suggest any other Mac OS or command-line tools I might use instead?

Many thanks in advance,

Cheers, Chris
mduell
Veteran User
Posts: 8206
Joined: Sat Apr 21, 2007 8:54 pm

Re: Help with automating sound sync correction?

Post by mduell »

Any decent muxing tool (such as mkvmerge) can apply both constant and linear audio offsets to correct sync issues.
Chris_BBR
Novice
Posts: 63
Joined: Tue Nov 24, 2009 2:36 pm

Re: Help with automating sound sync correction?

Post by Chris_BBR »

Thanks for the suggestion. mkvmerge does indeed do exactly what I want but, as its name implies, appears only to output to mkv when the stated objective is to retain the mp4 container for Apple TV.

From comments elsewhere in these forums I understood Subler fell into the category 'decent muxing tool' but it doesn't correct audio sync issues, and using Subler to convert the mkvmerge mkv file back to mp4 strips out the audio sync correction so I'm back where I started.

Cheers, Chris
mduell
Veteran User
Posts: 8206
Joined: Sat Apr 21, 2007 8:54 pm

Re: Help with automating sound sync correction?

Post by mduell »

I was thinking fix it before you go to Handbrake, not after. That way you correct it once rather than for every encode you do (one for tv, one for iPhone, one for something else).

Demux the MPEG2 files from the DVD and remux with mkvmerge to correct the audio. Feed the MKV to HB and get your tv compatible file.
Chris_BBR
Novice
Posts: 63
Joined: Tue Nov 24, 2009 2:36 pm

Re: Help with automating sound sync correction?

Post by Chris_BBR »

Right, I'm with you now! Thanks, I'll give that a try.

Cheers, Chris
Chris_BBR
Novice
Posts: 63
Joined: Tue Nov 24, 2009 2:36 pm

Re: Help with automating sound sync correction?

Post by Chris_BBR »

Works like a dream. Thanks, mduell - on the money as ever!

Cheers, Chris
Post Reply