VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Member
    Join Date
    Dec 2009
    Location
    United States
    Search Comp PM
    I have tried several times to extract the .h264 video stream, audio and a subtitle track from any given .mkv file in order to mux them to an AVI (with the video quality as in tact as possible) for cutting and upload to a streaming site. I use MKVextractGUI and extract all the necessary files. Then I use the AVC2AVI GUI to encode the .h264 to an AVI file w/o audio. Finally I open the AVI in AVIDemux and add the audio. The audio problem usually becomes apparent at this point. I notice the when I add the audio in AVIDemux it's severely out of sync. This same problem also occurs when I try to open the MKV file in VDM w/ avisynth (directshowsource) and save it as an Xvid AVI; the audio/video are out of sync.
    Last edited by Eva-Unit01; 28th Aug 2010 at 11:39.
    Quote Quote  
  2. If the audio is off by a constant amount over the entire video all you have to do is set the audio skew. The "Shift" field in AviDemux.
    Last edited by jagabo; 17th Aug 2010 at 10:32.
    Quote Quote  
  3. Member
    Join Date
    Dec 2009
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    If the audio is off by a constant amount over the entire video all you have to do is set the audio skew. The "Shift" field in AviDemux.
    I tried that and it didn't work. Even when trying to play the original MKV file in avidemux, the audio was still only slightly corrected at -1200 miliseconds, if at all. Are there any other methods for fixing the audio/video sync issue? would it be easier to just cut the clip out of the original MKV file? If the latter, which program would be best?
    Quote Quote  
  4. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    Not sure why you want to put H264 in an AVI container but for the sync issues, I've found this to work best for me.

    Convert MKV to MP4 with Yamb (no re-encoding)
    Open MKV in Virtualdub, find where you need to make your cut and make a note (00:00:10.000 - 1:56:49.205)
    Open Yamb and pick Editing > Cllick to Split MP4 File
    Open MP4 file and tick Split From
    Type in the time noted in Virtualdub and click next

    You should have an MP4 file which plays with no sound but not to worry.

    Open mkvmergegui and drag in the mp4 file and click next. When finished, you should have an MKV file that is pretty close to where you cut and is in sync.
    Quote Quote  
  5. Member
    Join Date
    Dec 2009
    Location
    United States
    Search Comp PM
    Does anyone know how to cut a 2-5 minute segment of a 23 min. mkv in mkvtoolnix without quality loss?
    Quote Quote  
  6. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    I've seen a lot of people recommend using mkvtoolnix to cut MKV but I haven't heard anyone say how to do it and I can't see any way to do it myself which is why I posted my way of doing it. Same goes with MyMP4Box GUI. People say you can cut MP4 with it but I can't see any way to do it even though, like Yamb, it is a frontend for MP4box.

    MKVmerge is the part of mkvtoolnix that is supposed to work. If you can figure it out, maybe you could post the answer.

    Good luck finding a simple program to do it without paying for it. Avidemux is the only free program that comes close but as you can see, it's not perfect and causes sync issues.

    Both MKVmerge and MyMP4Box GUI seem to only split files by size or duration. Not from place to place.
    Quote Quote  
  7. Member
    Join Date
    Dec 2009
    Location
    United States
    Search Comp PM
    I extracted all the files from the mkv, muxed them using mymp4box GUI and what do you know. Same exact audio sync problem accept this time it's in an mp4 container. The audio and subtitles synced perfectly but not the audio/video.
    Last edited by Eva-Unit01; 23rd Aug 2010 at 08:30.
    Quote Quote  
  8. Member
    Join Date
    Nov 2002
    Location
    United States
    Search Comp PM
    You're sure the original MKV is not out of sync? Can you post a media Info text of the file?

    You don't need to demux. Just drag the MKV into Yamb. Make sure the framerate is set the same as the MKV.
    Quote Quote  
  9. Member
    Join Date
    Dec 2009
    Location
    United States
    Search Comp PM
    Originally Posted by DarrellS View Post
    You're sure the original MKV is not out of sync?
    Yes. The audio/video are in perfect sync when I watch the file in media player classic homecinema.

    Originally Posted by DarrellS View Post
    Can you post a media Info text of the file?
    Are there any programs that come with mediainfo or an equivalent function, I'd rather not DL it seperately?

    Originally Posted by DarrellS View Post
    You don't need to demux. Just drag the MKV into Yamb. Make sure the framerate is set the same as the MKV.
    I am using my mp4box gui, not yamb. I don't intend to use yamb as it has a substantially poor rating on this site and apparently doesn't split files as is claimed.




    I found out that the video is somehow at 29.97 fps even though there are no combing artifacts. Either the file info is wrong or the encoder deinterlaced instead of IVTC. The video is animation so it should have been inverse telecined.

    EDIT:
    I changed the fps settings accordingly to 29.97 (in box mymp4boxgui and mkvmergegui) and STILL everyresulting file suffers the same audio/video being out of sync problem.

    I have waited several posts now and tried almost every conceivable method to fix the problem but the problem is still occurring. This leads me to believe that either:

    1. The current MKV support for windows is not enough to accomplish the purpose stated in my OP post.

    or

    2. Some individual is in fact remotely hacking my computer and these otherwise nonexistant problems are happening intentionally.

    So if the one or two people who have posted in this thread so far cannot help, I suggest they either give solid, conclusive advice or kindly stop wasting my time and allow for someone else to reply, if that would even make much of a difference.
    Last edited by Eva-Unit01; 23rd Aug 2010 at 14:47. Reason: Lack of helpful/useful/effective advice.
    Quote Quote  
  10. Member
    Join Date
    Dec 2009
    Location
    United States
    Search Comp PM
    OK. I have fixed the problem completely. Here is how to definitively cut MKV files using MKVtoolnix/MKVmergeGUI.

    1. Open up MKVmergeGUI.
    2. Add the mkv file you want to cut.
    3. Make sure that only the tracks you want in the finished files are checked.
    4. Go to the "Global" tab and check "enable splitting".
    5. To make cuts at specific times, select the timecode bubble and type in the desired times, using a comma and no spaces in between times. So to cut at 5:50 and 7:03 you type 00:05:50,00:07:03. Note, the splits occur 1 sec. or so after the time codes you type.
    Quote Quote  
  11. Interesting. Thanks for that.
    Quote Quote  
  12. Member
    Join Date
    Dec 2009
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    Interesting. Thanks for that.
    What? You didn't know?
    Quote Quote  
  13. Wait, so how do I remux without getting an out of sync issue?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!