Log in

View Full Version : Losslessy edit and join AC3 files


flapane
9th July 2011, 23:01
Hi,
I have an audio track split into two pieces.
I want to join them in order to mux the result ac3 with an h264 video (I'd like to avoid editing and recompressing my audio tracks).
The problem is that the last 3000ms of the first ac3 part, and the first 3000ms of the second ac3 part, are identical.

So if I join them with copy /b foo.ac3 bar.ac3 result.ac3, I'll obtain a 3000ms duplicated part just in the middle of the new track. (of course the video will be out of sync at that point)

I tried to join them via mkvmerge by importing the first ac3 part and then by clicking on APPEND and selecting the second ac3 part. Then I set a -3000ms delay on the second ac3 part and muxed the result audio track with my h264 video.

In theory it works, but if I play the file in MPC-HC the video will stop playing for 3 seconds, just in the point where the two ac3 files have been joined. Then it keeps playing with the correct a/v sync.

In VLC, it shows a lot of macroblocks for 5 or 6 seconds where the two audio tracks have been joined.

On my Samsung LED-TV, it goes out of a/v sync at that point, but if I close the video and reopen it, it plays well.

Can I join my two audio tracks in some better way?

sneaker_ger
9th July 2011, 23:27
Try delaycut (http://www.videohelp.com/tools/delaycut) to cut away the 3000ms.
Your mkvmerge usage was bound to fail, as you cannot apply delays to parts of tracks you are appending (IIRC). When muxing use the following command switch for mkvmerge: "--append-mode track". Do not try to apply any delays in mkvmerge. For this to work you need to make sure you are cutting exactly, otherwise there will A/V sync problems.

flapane
9th July 2011, 23:39
Thanks a lot, it was fast and worked great.
I have cut from 3000ms till the end of the second ac3 file, then I joined them with mkvmerge.
Now the resulting mkv looks great.