Hello guest, if you like this forum, why don't you register? https://fanrestore.com/member.php?action=register (December 14, 2021) x


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syncing AC3 and AAC tracks without converting to wav?
#1
I want to want to work out the delay value to use on an AC3 file when muxing to mkv.

Is there a way to sync tracks without converting AC3 on import (like it does in Audacity).

I just want to open multiple audio files, sync it and find the delay value. Don't need to export them.
Reply
Thanks given by:
#2
Work out the delay-value, and use eac3to to apply it.  Examples are in my thread,  You can also make basic edits with eac3to, although you can't crossfade and the like as you can when you decode to WAV.
Reply
Thanks given by:
#3
Wait, So when you import a AC3 file into Audacity, it converts it soon as it is imported?
So it isn't a lossless process?
Reply
Thanks given by:
#4
I once tried to sync a LD AC3 track using eac3to and one other program, but other than the first edit or two, I kept running into problems like the program not actually making a delay/cut at the specified time. Eventually just gave up. Not sure if the problem was due to bugs or my own errors, but I personally found the experience way too frustrating.
Reply
Thanks given by:
#5
^ Did you make the cuts with eac3to one by one? Also, every edit changes the frame-count/time-code of everything after it, so once you've figured out the edit-points in reference to the original file, work backwards, applying the edits in reverse order. That's what I used to do with frame-duplications in AviSynth. But like you, I find syncing in eac3to frustrating and don't like doing it that way.
Reply
Thanks given by:
#6
Ah, OK. I forget what exactly I did in eac3to and what the non-eac3to program was that I tried, but I'll keep your tip in mind if I decide to try again!

FWIW, I was trying to sync the AC3 to my own capture of the 1st Terminator 2 squeeze LD, but decided that I'd probably just rather listen to the PCM with Prologic anyway.
Reply
Thanks given by:
#7
(2020-01-09, 04:24 PM)BusterD Wrote: Ah, OK.  I forget what exactly I did in eac3to and what the non-eac3to program was that I tried, but I'll keep your tip in mind if I decide to try again!

Great!  The other program was probably delaycut.

This is what I mean by applying the edits one by one.

Code:
#random example
eac3to audio1.wav audio2.wav -XXms
eac3to audio2.wav audio3.wav -edit=2:20:09.823,XXXms - loop
eac3to audio3.wav audio4.wav -edit=1:25:02.312,+XXms
eac3to audio4.wav audio5.wav -edit=0:55:01.957,-XXXms
eac3to audio5.wav audio6.wav -edit=0:04:68.617,+XXXXms -silence

Some people do work forward, but I work backward. If you call Info() in AviSynth and apply it to the video after loading it, the time-codes/frame-numbers printed will not change upon edits.

Code:
WhateverSource()
Info()

Scrub through the video in VDub.  When you find a missing frame, call DuplicateFrame() and duplicate the frame immediately before the missing one, taking its number from what Info() has printed, which you can trust to remain constant.

Code:
WhateverSource()
Info()
DuplicateFrame(7)

Keeping scrubbing.  When you find the next missing frame(s), take the number once more from what Info() has printed, and call DuplicateFrame() again, but make sure you insert it before the previous call.

Code:
WhateverSource()
Info()
DuplicateFrame(17)
DuplicateFrame(7)

In other words, the new duplication always goes to the top.  You can duplicate a frame multiple times.
Code:
WhateverSource()
DuplicateFrame(25, 25, 25, 25)#4*41.7ms=167ms
DuplicateFrame(21, 21, 21)#3*41.7ms=125ms
DuplicateFrame(17)#42ms
DuplicateFrame(7)#42ms
Info()

Once you've found all the edit-points, scrub back to the calls to DuplicateFrame() and read the time-codes from Info(), or note them down as you go.  In an real use case, I'd favor Loop() over DuplicateFrame() because I prefer the former's syntax, but that's the idea.  Obviously, AC-3 "frames" and DTS "frames" are not exactly 42ms, but eac3to will apply the closest delay to the figure input and let you know how much remaining delay couldn't be resolved.  Having said all that, I prefer decoding to WAV for greater precision and the freedom to make crossfades.
Reply
Thanks given by:
#8
Heart 
(2019-12-29, 02:53 AM)Chewtobacca Wrote: Work out the delay-value, and use eac3to to apply it.  Examples are in my thread,  You can also make basic edits with eac3to, although you can't crossfade and the like as you can when you decode to WAV.

Had forgotton I posted this!

My question was actually asking how to work out the delay value, and not how to apply the delay.

I normally use Audacity and and import files as multi tracks but it cannot import AC3 directly without first converting to Wav.

I want to avoid quality loss and keep it in AC3 format.

So I'm looking for a multi-track audio editor like Audacity which can import AC3 or AAC files without needing to convert to Wav first.

Once I know the value I will either add silence or cut it (using eac3to or whatever) or maybe even apply with mkvmerge.
Reply
Thanks given by:
#9
But the question didn't make any sense.  First, to convert AC-3 to WAV is to convert a lossy format to a lossless one, so there's no quality-loss to avoid.  Secondly, if there were a quality loss, what difference would it make?  The only reason to take the files into Audacity is to compare them and work out the delay-value, so you know how to do that already.  If there were a loss in quality, which there isn't, it wouldn't be anywhere near severe enough to interfere with that purpose.  The only pertinent question is the one I answered: how to apply the delay without otherwise affecting the original files.  And that's eac3to or delaycut or, as you said, applying the delay upon muxing. Smile
Reply
Thanks given by:
#10
^ What he said.

I sometimes even use only 8 bit wav files (instead of 16 or 24 bit) for syncing purposes. The waveform looks pretty much identical to the eye and thus for the sync. The difference is clearly audible but irrelevant for figuring out delay.
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
  Working concept syncing different audio sources SIUse 20 9,995 2022-06-23, 05:08 PM
Last Post: alleycat
  How to join 2 AC3 / DTS tracks ? Falcon 13 7,260 2021-06-01, 04:06 AM
Last Post: Doctor M
  [Help] Tools for syncing subtitles to video NeonBible 6 3,820 2021-03-27, 10:48 AM
Last Post: BusterD
  Beginners Guide To Syncing Audio alexp2000 31 26,094 2020-10-09, 05:42 PM
Last Post: pipefan413
  [Help] Fixing drift when syncing audio NeonBible 17 11,784 2019-08-17, 01:25 PM
Last Post: deleted user
  Subtitles Converting and Editing PDB 12 14,644 2016-07-29, 03:39 PM
Last Post: Feallan

Forum Jump:


Users browsing this thread: 1 Guest(s)