MKV audio video drift out of sync during playback

Home Forums Home Theater Computers MKV audio video drift out of sync during playback

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #26439

    I just recently upgraded my AVR to one that can handle the HD audio formats (Dolby TrueHD, DTS-MA, etc).  After getting things pretty well setup, I set out to try some of my movies (most from HD-DVD, but some from bluray) specifically those that have some form of uncompressed audio.

    The last couple of nights we watched the first two in the Harry Potter series.  I have ripped them as MKV containing the original contents:  VC-1 for video (24000/1001 fps), and Dolby TrueHD.  I am bitstreaming the audio to a Yamaha RX-V867 through HDMI from Media Center (MyMovies).

    One thing we noticed is that although the A/V sync starts out right, over time the video appears to be falling behind the audio.  It gets more and more off as the movie plays along (and these are long movies).  Hitting Replay (7-sec back) on the remote fixes the problem as does any other kind of seek (Stop/Resume, click on seekbar, skip forward 30-sec, etc.)

    Although the workaround is easy (every 15-20 mins or so, skip back 7-sec), it is a bit annoying, so I thought I’d check in here and see if anyone had any suggestions:

    Here is my setup:

    – MKV created with MKVtoolnix (4.2.0).  VC-1 and TrueHD track extracted with HdBrStreamExtractor from HD-DVD disk.  AnyDVDHD to do the dirty work.

    – Running 32-bit Windows 7.  Playback in Windows Media Center.  Default video decoder (WMvideo decoder dmo is what shows in graphstudio).

    – Haali is the MKV splitter.  ffdshow tryouts using only the audio decoder to allow for audio pass thru to Yamaha (all codecs disabled on the video side).

    – Hardware is DH67BL/Core i3-2100T.

    – TV settings are set for 59.9x Hz, 1920×1080.

    Other than Haali (for MKV) and ffdshow (for HD audio bitstream) it is pretty basic Win7 install.

    I’m willing to try anything you might suggest.  A few things I thought of:

    – Try different splitter?  Could it be a problem with Haali?  I could try MPC-HC MKV splitter or there is a new one (SMM).  Is it worth a try or should Haali work.

    – Try a different video decoder?  It seems strange I don’t get hardware acceleration with VC-1 content, as Sandy Bridge is supposed to have support for it.  I see MPC-HC has one, and maybe even it would do accelerated VC-1 (my experience so far is that Intel claims HD2k to do VC-1 hardware decode, but in practice my CPU is running 25% or so on VC-1 content in MKVs).  There is also a new version of ffdshow claiming to use QuickSync for HW accel decode on Sandy Bridge.  Has anyone tried any of these?

    – Try a different video player.  I may try VLC if I can get it to bitstream audio to my AVR.

    Any other ideas?

    Thanks,

    // Dean

    #31868
    RehabMan

      I just realized I probably should have posted this to ‘the red button’ forum.  Mods, feel free to move it if you want.

      #31869
      RehabMan

        Another idea I had:

        – Remux into different container?  On the downside I haven’t found too many containers (with decent tools, and splitters) that can handle the HD audio formats.

        #31871
        NightCactus

          I was also getting unsatisfactory playback with Haali on my Gigabyte Z68/Ci5 2500K setup.

          The better MKV splitter for Sandy Bridge video seems to be the LAV splitter included with the Shark007 Codec Pack; I get smooth video and perfectly timed audio.

          #31886
          RehabMan

            I’ll play around with a different splitter and see if that makes a difference…  One problem that has been holding me up really using a different splitter is that it seems only Haali supports DirectVobSub (vsfilter) for subtitles.  At least that was what I saw in graphstudio upon setting things up for either LAV or MPC-HC MKV splitter.  Haven’t tried the SMM splitter yet.  Is there some trick to getting DirectVobSub to load with the other splitters?

            A couple of nights ago, we watched Avatar extended edition (almost 3 hours long) and there was no drift between audio/video.  A bit different than my Harry Potter HD-DVDs, Avatar was a backup MKV from Bluray.  AVC video not VC-1.  And DTS-HD MA audio instead of Dolby TrueHD.  Nice to know that at least one MKV was a satisfactory experience though…

            #31890
            NightCactus

              The Shark007 codec pack lets you choose between DirectVobSub and FFdshow subtitles by checking the appropriate box in a control panel. Give it a try; it uninstalls cleanly if it doesn’t work for you.

              I was initially against installing a mega codec pack such as Shark007 at first, but after much trial and error with different standalone codecs, I’m glad I finally did. I have a bunch of Anime episodes encoded with Ogg from long ago and the codecs included with Shark007 will play it. Saves me the pain of transcoding everything.

              I’ve been ripping my Blu-Ray discs to MKV using MakeMKV. It retains the original bitstreamed audio track. It’s free to use while in beta; the author provides a key here: http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053#p3548

              #31892
              phoneguyinpgh

                What program did you use to create your MKVs??  I use MKVMerge (GUI) and if the video is H264 encoded, then MKVMerge can’t seem to determine the fps so you have to set that manually or it defaults to 25fps.  That would deff cause audio drift.

                #31893
                RehabMan

                  Using MKVmerge from the mkvtoolnix suite… so same as you.  I got my Harry Potter series in a box set (HD-DVD) and backed them up last summer, so I was using “4.2.0”… I’m thinking of remuxing with the current version and seeing what happens.  I definitely know about the FPS issue…  But these are VC-1 and MediaInfo correctly shows 23.976.  I probably did have to set it to 24000/1001 when I originally ran mmg (mkvmerge GUI).

                  My thoughts on it so far:

                  Since it is TrueHD and I’m bitstreaming, it seems to me the player needs to keep the video in sync with the audio (because the audio is being handled externally bit-for-bit… there is no opportunity to slow down or speed up (stretch or shrink) the audio to match the video frame).

                  I’m not really sure how the media pipeline works in DirectShow, but either the splitter component or the video decoder component has to be responsible for skipping a video frame should the video start falling behind the audio.

                  I wonder if this problem isn’t related to the SNB clock being not quite exact with respect to 23.967 (well actually, 24000/1001).

                  I may try recoding the video as h264 just to see if I have similar issues with drift (keep the TrueHD audio untouched).

                  I really don’t think there is a muxing problem w/ respect to sync because when I seek into the movie at any point, the sync problem corrects itself (then later falls behind).  If there was some kind of sync problem from the get-go (say if the video really was 24fps on disc), you would think that as you seek further and further into the movie, the AV-sync would get more and more off…

                  But heck… I’m just an old washed up C++ programmer who has not had any real media programming experience, so I’m just guessing…

                  I haven’t had time to look at this issue, so really haven’t tried a lot of the suggestions and ideas of my own, but I hope to soon.

                  #31894
                  RehabMan

                    I tried to author a much more elaborate response, but it got rejected as spam for some unknown reason.

                    I’ll try to be brief.  I used mkvmerge as well.  I’m aware of the fps issue and MediaInfo shows 23.976.  On top of that, seeking into the movie works, so it would seem to me that the audio and video are interleaved correctly.

                    At any rate, I’ve got other ideas to try, and when I get a chance I’ll try those ideas and some of the ones suggested here.

                    #31898
                    skirge01

                      [quote=RehabMan]

                      I tried to author a much more elaborate response, but it got rejected as spam for some unknown reason.

                      [/quote]

                      Sorry that happened to you.  You should get the option to post it anyway, so, if that–regrettably–happens again to you or anyone else, go ahead and post it, but follow it up with a PM to me or any of the other staff members.  We’ll approve it manually.  That’ll also help us train the system better, so that it doesn’t continue to happen.  Mikinho also found your original post and unblocked it, as you can probably see.

                      #31899
                      RehabMan

                        Thanks for that.  I didn’t see an option to post anyway, but perhaps I was not really looking for it.

                        On the subject of filters, I’m going to give the LAV filters a try.  Originally, I tried to use shark007 to switch to the LAV splitter, but couldn’t get DirectVobSub to load.  This time, I uninstalled shark007 (I really don’t like codec packs like shark007 anyway), found the download for LAV, and installed them manually.  They worked (with subs) on my test machine (a laptop I use for trying out experimental stuff before setting it loose on my HTPC).

                        I don’t know if they will fix my sync issue, but I’ll give it a try later today…

                        #31901
                        skirge01

                          [quote=RehabMan]

                          Thanks for that.  I didn’t see an option to post anyway, but perhaps I was not really looking for it.

                          [/quote]

                          It’s entirely possible it just tells you it was flagged and sends it to the “spam folder” we have access to.  Again, sorry for the false-positive, but I’m kind of glad it happened, so that we could investigate and let people know.  We certainly don’t want valuable posts getting flagged!

                          #31902
                          RehabMan

                            Tried to use just the LAV splitter.  As stated above, I got it to work with DirectVobSub, but unfortunately, could not get HD audio bitstreaming.  For some reason everything was being down mixed to stereo LPCM when played from WMC or WMP.  Strangely, if I loaded the file in graphstudio and ran the graph, it did correctly bitstream.  WMC and WMP must be doing something funny with the graph after its built… something that kills bitstreaming using combination of LAV splitter + ffdshow audio.

                            Now trying LAV audio as it seems to support HDMI audio bitstreaming…  We’ll see.

                            I also tried recoding the video stream as h264 (using Handbrake, then remux w/ mkvmerge), but the same audio drift was apparent.  Pretty amazing though… I think that without an A/B test no PQ degradation could be noticed… and h264 seems to be better accelerated than is VC1 on Sandy Bridge (at least HD 2k in Core i3-2100T).

                            #31903
                            RehabMan

                              I installed LAV splitter + audio (no LAV video codec)… and… it worked!  No more drift and bitstreaming is working.  Have yet to actually try something with subs, but according to graphstudio, DirectVobSub is loading so it should work.

                              Had one little problem with an audio decoder (supporting only stereo) from Remote Potato (a recent addition to my HTPC in the last few days) loading instead of the LAV audio decoder.  For now, I unregistered that audio decoder.  Will have to see if that has broken AC3 decoding for Remote Potato and if so figure out the real answer (I would imagine… reducing its merit).

                              Thanks for all the ideas and hope my trial-and-error helps somebody else in the future.

                            Viewing 14 posts - 1 through 14 (of 14 total)
                            • You must be logged in to reply to this topic.