Log in

View Full Version : MKV Video Audio timing issue.


WildTexasChef
30th October 2009, 21:28
I am using MKVmerge Gui.

I have been ripping my Blu-rays succesfully for a while using AnyDVD, & EAC3TO to demux the wanted video & audio tracks from the Blu-ray rip, I then merge these 2 files into a MKV file which then can be played on my LG BD390 &/or my TiVo. (Im not refering to any VC-1 encoded Blu-rays as that is a different issue)

Lately though, I have come across a few Blu-ray rips that when I have merged the video & audio tracks into the MKV there ends up being an Audio Snyc problem.

I do see where you can adjust in MKVmergeGui in ms the sync. However, how do you determine the amount of time you need to adjust the sync? Trial & Error isn't a satisfactory method, as that would end up taking several days to get the correct sync timing.

One other thing I noticed about the Audio/Video sync. On some of the movies the audio was maybe off by a 1sec or 2. But by the end of the movie it was off by maybe 3 or 4 seconds. Another movie though maintained the 1/2 sec synch issue from beggining to end. It didn't change.

Or is there another program I can use to make an MKV file and it will automatically do the syncing for me?

Like I said, this has only been on a few H.264 blu-rays. Some of the movies I am having sync issues with are: Surveilance, The Sleep Dealer, & Battle for Terra.

WTC

Inspector.Gadget
30th October 2009, 21:42
You're running eac3to against a playlist [ 1), 2), etc.) rather than an M2TS file(s), right? Does eac3to print a delay to the console when you use it to get information about a playlist? Do you see the same sync problems when viewing the first (or only) M2TS file in a playlist using MPC-HC?

With AVC discs specifically: Are you demuxing with eac3to to a MKV file containing the video stream? If you demux to an H.264 elementary stream, then mkvmerge assumes 25 fps on muxing, which is not correct for a FILM blu-ray movie, and will produce a variable desynchronization that gets worse over time. Always demux H.264 streams to an MKV container unless you're using the DG tools or you need to do pre-processing with h264 info or another ES-only utility.

WildTexasChef
31st October 2009, 00:39
You're running eac3to against a playlist [ 1), 2), etc.) rather than an M2TS file(s), right? Does eac3to print a delay to the console when you use it to get information about a playlist? Do you see the same sync problems when viewing the first (or only) M2TS file in a playlist using MPC-HC?

With AVC discs specifically: Are you demuxing with eac3to to a MKV file containing the video stream? If you demux to an H.264 elementary stream, then mkvmerge assumes 25 fps on muxing, which is not correct for a FILM blu-ray movie, and will produce a variable desynchronization that gets worse over time. Always demux H.264 streams to an MKV container unless you're using the DG tools or you need to do pre-processing with h264 info or another ES-only utility.

When I play the original M2TS file as-is in powerDVD or WinDVD, there isn't any kind of delay. It plays perfectly.

I found that with Surveillance (I haven't tested any of the others yet) that if I use TSmuxer to demux & Remux a new M2TS file containing the desired video & audio track. Again it works perfectly. (At least on the computer with powerDVD or winDVD)

That does make sense how MkVmergeGUI is getting out of sync with the h.264 file. It does give me warning about the 25fps.

So your saying I should use EAC3TO to demux the video track directly to MKV instead of h264? example being...

Eac3to 1) 2:Myh264movie.mkv 3:myh264movie.dts

Use the above INSTEAD of what I am using below...

Eac3to 1) 2:myh264movie.h264 3:myh264movie.dts

Is that what your saying?

WTC

Inspector.Gadget
31st October 2009, 01:09
So your saying I should use EAC3TO to demux the video track directly to MKV instead of h264? example being...

Eac3to 1) 2:Myh264movie.mkv 3:myh264movie.dts

Use the above INSTEAD of what I am using below...

Eac3to 1) 2:myh264movie.h264 3:myh264movie.dts

Is that what your saying?

WTC

Precisely. Unless you'd like to add the correct framerate in MKVMergeGUI manually.

setarip_old
31st October 2009, 07:26
@WildTexasChef

HI! am using MKVmerge Gui. I have been ripping my Blu-rays succesfully for a while using AnyDVD, & EAC3TO to demux the wanted video & audio tracks from the Blu-ray rip, I then merge these 2 files into a MKV file which then can be played on my LG BD390 &/or my TiVo.Why are you going through these steps and using three programs, when you can simply use (presently free) "MakeMKV" (with NO other programs) to accomplish the same thing with "one click"?

WildTexasChef
2nd November 2009, 04:42
@WildTexasChef

HI!Why are you going through these steps and using three programs, when you can simply use (presently free) "MakeMKV" (with NO other programs) to accomplish the same thing with "one click"?

So are you saying that with "MakeMKV" I don't need AnyDVD and it will remove all the DRM? Will it it aslo downcovert DTS-HD to DTS & AC3? Sometimes I want the DTS audio, sometimes I want the AC3. Will it also allow me to choose which audio track too if I want it? Such as the commentary track instead of the main track?

What if the movie or TV show is a combination of several M2TS files that are found on the Blu-ray.

Example... on Star Trek: TOS Blu-ray. Each episode is about 10 to 20 M2TS files that are found on the Blu-ray disk. Each episode isn't actually just one M2TS files but between 10 & 20.

Is MakeMKV a Gui? You wouldn't happend to have a link would you? Does it require AVISYNTH? As I don't know how to use AVISynth.

WTC

setarip_old
2nd November 2009, 07:47
So are you saying that with "MakeMKV" I don't need AnyDVD and it will remove all the DRM? Will it it aslo downcovert DTS-HD to DTSYes, you don't need AnyDVD, yes it will remove all copy protection, yes it will downconvert DTS-HD...

Will it also allow me to choose which audio track too if I want it? Such as the commentary track instead of the main track?Yes...

Is MakeMKV a Gui?No, it's not.

Does it require AVISYNTH?No, it doesn't.

You wouldn't happend to have a link would you? Yes, although you should accustom yourself to performing searches:

www.makemkv.com

WildTexasChef
2nd November 2009, 21:30
Yes, you don't need AnyDVD, yes it will remove all copy protection, yes it will downconvert DTS-HD...

Yes...

No, it's not.

No, it doesn't.

Yes, although you should accustom yourself to performing searches:

www.makemkv.com


I did try this program. Very nicely done. I like it and will use it in some situations.

One thing it won't do. Is it won't downconvert the DTS-HD audio track to DTS, or AC3 (DD5.1). It also won't downconvert DD5.1-hd down to DD5.1 either. So I will still have to use eac3to to downcovert any of my audio. Again after I demux the MKV then I will have to remux it after I downconvert the audio.

Other than that it's a wonderful program. Very very easy to use and fast as well.

I did run into one problem though. On one blu-ray I tested it with apparently it didn't have the BD+ keys or something to be able to break the DRM. AnyDVD-HD was able too.

It's still in Beta, so maybe when they finish with the release version it will be able to downconvert the Audio.

WTC

setarip_old
2nd November 2009, 23:16
I did run into one problem though. On one blu-ray I tested it with apparently it didn't have the BD+ keys or something to be able to break the DRM.You REALLY have to start reading (about how to set things up with v.1.4.8, reporting [SEMI-AUTOMATICALLY] such titles - and having it resolved within 24 hours!). Read the information at the MakeMKV website (I already gave you the link), as well as the threads here, in the "Decrypting" sub-forum at:

http://forum.doom9.org/showthread.php?p=1332434#post1332434

Is it won't downconvert the DTS-HD audio track to DTSIncorrect. Read the log to see that it DOES extract ONLY the core version of the DTS from the DTS-HD...

BTW - There's absolutely NOTHING in your initial (Or second) post to this thread that refers to downconverting and/or converting audio:I have been ripping my Blu-rays succesfully for a while using AnyDVD, & EAC3TO to demux the wanted video & audio tracks from the Blu-ray rip, I then merge these 2 files into a MKV file which then can be played on my LG BD390 &/or my TiVo.

WildTexasChef
3rd November 2009, 21:58
I stand corrected. After further investigation I saw that it did infact downcovert the DTS-HD audio to the DTS core 6.1 audio track.

IT is deffinatly very easy to use, & I like that.

I joined the MakeMKV forums. One thing I did learn is that it won't convert the VC-1 video track to h.264. So it will create a MKV with the VC-1 video track in tact. So I will still have to use another program for those Blu-rays that use the VC-1 vidoe codec. But that isn't bad.
I can still use MakeMKV for all the h.264 DTS-HD/Dolby TrueHD Blu-rays.

Handbrake does convert VC-1 video to h.264 and writes it into a MKV file. Although it doesn't support DTS-hd/Dolby TrueHD downcoverting. IF it does I haven't figured it out yet.

I did find another program that converts the VC-1 video to AVI (VC12AVI). Then the trick is getting all the AVI files back together again with the audio track. I am testing several programs that can do that to see which one I like the best.

And yes... you are correct again. My Bad... I never said that I needed to downconvert my audio from DTS-HD or Dolby TrueHD down to their respective core formats of DTS or AC3. I also never mentioned in my original post that I also had a need to convert VC-1 video to h.264 or MPG2 either.

So I will gladly admit, that MakeMKV after some more research into the product does in fact solve my original problem with h.264 timing issues with the audio sync.

WTC

setarip_old
3rd November 2009, 22:28
And yet again, as you were told in yet another of the similar threads you've once again spread all over the Doom9 Forums, "multiAVCHD" WILL readily convert such an MKV to h264...

WildTexasChef
5th November 2009, 07:04
And yet again, as you were told in yet another of the similar threads you've once again spread all over the Doom9 Forums, "multiAVCHD" WILL readily convert such an MKV to h264...

Edited...

I have downloaded "multiAVCHD" and have been trying to get it to work. Either it is having issues with "Torchwood" because it is INTERLACED VC-1 or I haven't figured out how to set all the settings. I have read the tutorial a few times. But apparently I am missing something.

HOWEVER... back to the ORIGINAL reason for THIS thread...... MKV timing issues. Has been SOLVED. The issue was relating to H.264 audio/video sync. Problem solved by using different methods &/or programs.

To the Moderator.... PLEASE LOCK this thread... as the original issue has been solved & the thread has digressed back to my other issues of VC-1. I will move future posts regarding VC-1 issues to the other threads that are relating to this issue.

Schruppinator
9th November 2009, 17:48
Hello,

I think I have the same problem as the threadstarter, but I cant solve the problem with the last posts.
I have riped a BluRay with MakeMKV. This MKV file I loaded in AviDeMux to convert it into a X264 avi file.
I had done this with a few other films without any problem.
But at this movie the audio in the avi file is out of sync. At the beginning all is nice, the audio is in sync. with the movie. When the movie plays a little bit, the audio gets out of sync. At the middle of the movie its so mucht, that you cant watch the movie any longer.

I tried to use MKVMerge to change the FPS. But with no predefined value the sound is in sync.

Here are a few informations about the original mkv file and my avi file, that I get from AviDeMux. In AviDeMux I didnt cut anything.

The DTS files I converted with VLC to AC3. This way I had used at other movies, without problems.
In AviDeMux I only use the video converter for the x264 codec, the audio file I loaded and say "copy" at audio.

To load the movie in AviDeMux and use AviDeMux to convert the audio directly to ac3 didnt solve the problem.

How I get the sound in sync. the whole video?

Thanks for your help and sorry for my bad englisch :thanks:

General
Format : Matroska
File size : 24.5 GiB
Duration : 2h 50mn
Overall bit rate : 20.5 Mbps
Encoded date : UTC 2009-10-02 16:09:06
Writing application : MakeMKV v1.4.7 beta linux(x64-release)
Writing library : libmakemkv v1.4.7 beta (0.7.7/0.8.1) x86_64-suse-linux

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Muxing mode : Container profile=Unknown@4.1
Codec ID : V_MPEG4/ISO/AVC
Duration : 2h 50mn
Bit rate : 17.9 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.359
Stream size : 21.3 GiB (87%)
colour_primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
transfer_characteristics : BT.709-5, BT.1361
matrix_coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177

Audio #1
ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : A_DTS
Duration : 2h 50mn
Bit rate mode : Constant
Bit rate : 1 510 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Resolution : 24 bits
Stream size : 1.80 GiB (7%)
Title : 3/2+1
Language : English

Audio #2
ID : 3
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : A_DTS
Duration : 2h 50mn
Bit rate mode : Constant
Bit rate : 754 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Resolution : 24 bits
Stream size : 922 MiB (4%)
Title : 3/2+1
Language : German

General
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
File size : 12.9 GiB
Duration : 2h 50mn
Overall bit rate : 10.8 Mbps

Video
ID : 0
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : H264
Duration : 2h 50mn
Bit rate : 9 912 Kbps
Nominal bit rate : 10 000 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.199
Stream size : 11.8 GiB (92%)
Writing library : x264 core 66
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 /
analyse=0x3:0x113 / me=hex / subme=6 / psy_rd=1,0:0,0 / mixed_ref=0
/ me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 /
deadzone=21,11 / chroma_qp_offset=-2 / threads=3 / nr=0 /
decimate=1 / mbaff=0 / bframes=2 / b_pyramid=0 / b_adapt=1 /
b_bias=0 / direct=0 / wpredb=1 / keyint=250 / keyint_min=25 /
scenecut=40(pre) / rc=abr / bitrate=10000 / ratetol=1,0 / qcomp=0,60 /
qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1,40 / pb_ratio=1,30 / aq=0

Audio #1
ID : 1
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : 2000
Duration : 2h 50mn
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 548 MiB (4%)
Alignment : Aligned on interleaves
Interleave, duration : 42 ms (1.00 video frame)

Audio #2
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : 2000
Duration : 2h 50mn
Bit rate mode : Constant
Bit rate : 448 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 548 MiB (4%)
Alignment : Aligned on interleaves
Interleave, duration : 42 ms (1.00 video frame)

Inspector.Gadget
9th November 2009, 18:11
You have a different problem, and you're going about things in a completely irrational workflow. You should be using eac3to for DTS to AC3 and DGAVCIndex->Avisynth->x364, for one. This is basic stuff, and I suggest you do more reading. If you still have trouble with sync, you need to post in the MakeMKV thread to find out how audio delay is detected and fixed (or not).

setarip_old
9th November 2009, 19:01
@Schruppinator

Hi!

Is there some reason you are using MakeMKV v.1.47, rather than v.1.48?

Schruppinator
9th November 2009, 19:20
You have a different problem, and you're going about things in a completely irrational workflow. You should be using eac3to for DTS to AC3 and DGAVCIndex->Avisynth->x364, for one. This is basic stuff, and I suggest you do more reading. If you still have trouble with sync, you need to post in the MakeMKV thread to find out how audio delay is detected and fixed (or not).

OK, thanks. I will try these programs.
I never see a reason to use other programs until now, because every movie works fine:confused:

@Schruppinator

Hi!

Is there some reason you are using MakeMKV v.1.47, rather than v.1.48?

The reason is easy. When I riped the BluRay, v. 1.47 was the newest MakeMKV Version.
Do you think with the new version the problem can be solved?

setarip_old
9th November 2009, 21:56
Do you think with the new version the problem can be solved?The only way you'll know is to try it ;>}

Schruppinator
9th November 2009, 22:38
I think I solved the problem :)
I looked for the tools Inspector.Gadget posted. At this search I found a page, where is descripted how you can bring the video/audio in sync. when the sync. is constant and not constant. Page (http://www.gromkov.com/faq/faq2004-0064.html)

May be its not the beste solution, but it works.
I tried to solve the problem with changing the FPS a few days ago, but I didnt know that the change I have to do is so small.

Now I change the FPS from 23,976 to 23,977 and I think everything is fine. I will check these, when I look the whole movie in the next days.

By the way: Anyone know a program like eac3to for linux? I run it with wine and it works, but I search a linux program.:cool:
:thanks: for help ons more!
Great and very interesting Forum :D