View Full Version : Time Delay Problem With AC3
skrairman
15th May 2007, 11:27
Here's the deal: I have a TS file, which is demuxed into a d2v file and an AC3 audio by the come-along feature D2V Creator in MeGUI.
Audio: christina_aguilera-candyman_(nba_allstar_game_halftime_show_2007)-hdtv-1080i-CtrlHD PID 014 T01 3_2ch 448Kbps DELAY -559ms.ac3
As you see, there's a delay. I re-encoded the ac3 to mp3 with the Lame MP3 codec and delayed it -559ms of course. Then I re-encoded the video by x264. Everything seems to be fine so far.
Then I did two muxing:
A: Mux the x264 video with AC3, set the delay at -559ms
B: Mux the x264 video with mp3, set the delay at 0 because i have delayed the audio during the transition from ac3 to mp3.
All above work were done by MeGui, btw.
Result: Case A is out of sync; Case B is synced pretty good.
Could anyone tell me why the muxing with ac3 at the same delay would result in an out-of-sync? And how to make it right?
Thanks in advance.
ETA: I encapsulated them with the mkv container.
skrairman
17th May 2007, 04:42
No one?
link.king
17th May 2007, 08:46
Prolly you use a third party s/w like Adobe Audition or Sony Sound Forge to put in the required delay and then mux!
Before muxing just make sure that the audio and video lengths are exactly the same! If not then insert the " exact required" silence into the beginning of the track!
Good Luck!
skrairman
18th May 2007, 03:40
Thanks link.king
I didn't use any third party muxers.
Question: how to tell the exact audio and video lengths? and they should be accurate enough to be able to sense millisecond.
link.king
18th May 2007, 03:54
No..No..Don't use third party muxers...but use third party delay producing s/w and then mux with megui.
Yes you're right..knowing the length uptill ms is critical! Use some video info tool for x264..I don't know any such tool..but a simple google search would help there!
If you don't get any..then the xvid4psp converter, though not assigned for that purpose must be able to help out..coz under tools its gotta media info tool..which should prolly sense d2v files as well!
tebasuna51
19th May 2007, 01:41
@skrairman
Use DelayCut (http://jsoto.posunplugged.com/audiotools.htm) to delay or cut (this case) the ac3 file without decode and re-encode (Audition or SoundForge).
skrairman
21st May 2007, 03:41
Thanks link.king and tebasuna51, sorry for the late response because of the weekend.
I'll try delaycut later in the afternoon today and see if it works well.
@link.king, i dont know how to see the length up till ms of audio, but to video, you can try info() command in your AVS script.
link.king
21st May 2007, 04:34
Try out on delaycut as tebasuna51 suggested and let us know.
btw, when you open the file in any of the major audio editing s/w's I mentioned, our work will be done! ;)
tebasuna51
21st May 2007, 10:35
Prolly you use a third party s/w like Adobe Audition or Sony Sound Forge to put in the required delay and then mux!
Before muxing just make sure that the audio and video lengths are exactly the same! If not then insert the " exact required" silence into the beginning of the track!
To adjust the length you must add silence at end, if is added "into the beginning" the previous delay adjust is destroyed.
BTW, this method is not recommended (but possible) because uncompress (ac3 -> wav) and recompress (wav -> ac3) always lose quality and is slow.
With DelayCut we can cut the first 17 ac3 frames (17 x 32ms = 544 ms) and preserve the rest untouched. We need cut always by frame (32 ms for 48 KHz) boundary then if cut 18 frames we obtain 576 ms less. But don't worry 15 ms of difference with nominal 559 can't be noticed.
DelayCut also can add ending silence to match the initial length.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.