Log in

View Full Version : Bluray rip on MKV -> Audio out of sync


sierramike
11th December 2012, 17:39
Hi,

I am actually ripping my bluray discs because I want them to be played from NAS on my HTPC, and I don't own a BD drive on the HTPC (and don't want to, I have one on my laptop), also I want to choose my movies without having to step up and also my network isn't fast enough to transfer content at original bitrate thru the network.

So I need to compress them, I found the relevant informations on using Avidemux to compress my videos using x264 codec. It is working fine, quality satisfies me. For the audio part, I demuxed the original m2ts file using tsMuxer Gui, to get the dts and dtshd tracks on separate files.

Then I mux the video with these audio files using mkvMerge Gui, setting the correct framerate on the video part.

Here starts the issue : when I playback, using MPC-HC or VLC, my audio is out of sync of values going from 40ms to 250ms depending on movies, also two audio tracks of the same movies (different languages) haven't the same delays.

When I try to play the orignal m2ts file, audio is perfectly synced.

I try to resync by watching and adjusting delay by hand on each track, then remux the mkv putting the obtained delays, it works fine but :
1) It's much time consuming
2) It's done using my eyes/ears, not a scientific way ...

Is there any explanation about this issue and is there a way to avoid this out of sync ?

I'm wondering if the issue is caused by tsMuxer when demuxing, or by mkvMerge when muxing ...

Any help would be greatly appreciated, as I'm yet bored about re-syncing manually after only ten titles, I can't imagine having to do that work on my whole discs ...

Thanks a lot !

setarip_old
11th December 2012, 18:14
Hi!

Instead of going through those multiple steps, you can simply load your initial (not compressed) ripped Bluray into BD-Rebuilder (with no demuxing/remuxing, etc.). BD-Rebuilder will compress your rip as Blu-ray in one (visible) step...

sierramike
11th December 2012, 18:19
I'll have a look, but do I have the same fine tuning of the x264 parameters to act on picture quality as I have in Avidemux ?

Also, I'll still need to remux at the end because I need to convert subtitles from sup to srt to be compatible with my HTPC ...

sneaker_ger
11th December 2012, 18:25
I would recommend using makemkv to rip the Blu-Rays to a lossless mkv files first. These should be in sync and are easier to work with. You can also make makemkv only keep the DTS core, if you want to. Keep in mind that DTS-HD MA only works with an intact DTS core, so if you put "DTS" and "DTS-HD MA" into separate tracks, you will actually have the "DTS" part in both of them and usually wasted 1,5 Mbit/s.

setarip_old
11th December 2012, 19:58
@sierramike do I have the same fine tuning of the x264 parameters to act on picture quality as I have in Avidemux ? No...

sierramike
12th December 2012, 10:19
@sneaker_ger : I know this about the DTS/DTS-HD MA, in fact I'm keeping two audio tracks to keep original audio (generaly in English), and the local audio (in French), so there are no duplicate DTS data, but thanks for quoting me about that !

I did further testing yesterday evening, seems that it's not tsMuxer nor mkvMerge that are faulty : I remuxed original video with sound streams in mkv, and it was perfectly synced, so it turns out there could be actually some more frames at the begining of the video, in the resulting compressed video that comes out of Avidemux. (By checking longly, I think in fact the two audio streams have the same delay, not very simple to sync french sound on english pictures :scared: )

By hand, I saw approx 200/210ms delay on the last movie I processed yesterday (don't know if I can post the title here). At 23,976fps, this delay is equivalent to 5 frames.

Do you guys have some informations about this kind of issue ? It seems that not every movie gets the same delay ...

sekininsha
12th December 2012, 11:23
I demuxed the original m2ts file using tsMuxer Gui, to get the dts and dtshd tracks on separate files.

try demuxed with Eac3to (http://forum.doom9.org/showthread.php?t=125966&highlight=UsEac3to)

A Gui UsEac3to
(http://forum.doom9.org/showthread.php?t=145574&highlight=UsEac3to)

sierramike
13th December 2012, 10:58
Okay, yesterday evening I did a new try at the last Handbrake version and saw more x264 advanced parameters and the ability to put command line parameters by hand, so I could set the same parameters I used to set in Avidemux, and encoded 2 chapters for testing, quality seemed equivalent and no audio delay. The entire movie is actually being encoded, I'll watch the result this evening.

Seems like the issue is in the Avidemux decoder which sends wrong frames at the begining of the source video to the x264 encoder. Maybe Avidemux is not such a good tool after all ...

setarip_old
13th December 2012, 18:34
@sierramike

Have you as yet tried BD-Rebuilder?