VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Hi everybody,

    I'm using MKVtoolnix (latest version : 21) under Windows 7 x64 SP1.

    I have a number of mkv files (E1... En) with x265 video and english audio, and a number of mkv files (F1... Fn) with the same video (encoded in x264) and french audio.
    Basically I just want to :
    - Extract the french audio from F1... Fn (F1.mka ... Fn.mka)
    - Mux these extracted audio files into E1.mkv ... En.mkv
    - Get rid of F1.mkv ... Fn.mkv

    The extraction process with MKVtoolnix GUI always completes successfully (no warnings, no errors) : MKVtoolnix gives me a number of .mka files containing the french audio.
    But the muxing process with MKVtoolnix GUI only works about 50% of the time : the rest of the time, I get several "warnings" (from a handful to several hundred). These warnings are always of the same kind. Here's an example for video E1.mkv, trying to mux with previously extracted audio F1.mka :

    --- Warnings emitted by job 'Multiplexing to file "E1 (1).mkv" in directory "E:\VIDEO\E1"' started on 2018-03-09 03:41:31 ---

    E:\VIDEO\E1\F1.mka: Error in the Matroska file structure at position 44926. Resyncing to the next level 1 element.
    The last timestamp processed before the error was encountered was 00:00:00.301995008.
    Resyncing successful at position 57192.
    The first cluster timestamp after the resync is 00:00:00.781991616.

    'E:\VIDEO\E1\F1.mka' track 0: This audio track contains 8682 bytes of invalid data which were skipped before timestamp 00:00:00.142000000. The audio/video synchronization may have been lost.

    'E:\VIDEO\E1\F1.mka' track 0: This audio track contains 278 bytes of invalid data which were skipped before timestamp 00:00:00.814000000. The audio/video synchronization may have been lost.

    E:\VIDEO\E1\F1.mka: Error in the Matroska file structure at position 16788231. Resyncing to the next level 1 element.
    The last timestamp processed before the error was encountered was 00:04:59.053998656.
    Resyncing successful at position 16815425.
    The first cluster timestamp after the resync is 00:04:59.982008256.
    There are never errors, only warnings. However, the muxed file E1 (1).mkv isn't correctly muxed :
    - The original english audio track plays just fine,
    - But the muxed french audio track has glitches and silences which may last for several minutes ! So basically it's unplayable.

    Opening F1.mka with Audacity / ffmpeg shows that there are no glitches nor silences. Those were generated by the muxing process.

    My question may seem stupid, but... what can I do ?
    - On one hand, I have E1... En videos with perfect audio
    - On the other hand, I have F1... Fn videos with perfect audio
    ... but I can't seem to get this muxing job done ! It only works about 50% of the time !! This is really driving me nuts.

    Thanks in advane for your help.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Use mkvExtract (or similar tool) to extract the audio from the MKA file.
    Here's one that's popular:

    https://www.videohelp.com/software/gMKVExtractGUI

    Then add the audio to the MKV
    Quote Quote  
  3. WOW. It worked !!! At least on the first file I tried. Thank you so much davexnet ! Now I can resume my work !

    But wait. Does that mean that MKVtoolnix GUI is somehow buggy when used to extract audio tracks, while gMKVExtractGUI isn't ???
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    The MKA is similar to MKV but audio only.
    The MKA is not the audio, only the container.

    I've never heard of being able to add an MKA as one of the elements to an MKV using mkvtoolnix
    The audio must be extracted first
    Quote Quote  
  5. You can actually add the whole french video file as input and just deselect the video.
    Quote Quote  
  6. davexnet, I understand that mka is only the container. But when selecting only one single audio track, why can't MKVtoolnix GUI produce a container-less audio file like gMKVExtractGUI does ? (e.g. F1.aac instead of F1.mka)

    blud7, that's a clever trick ! I'll try it, it may save me a lot of time
    Quote Quote  
  7. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    As a test I loaded an mkv in MKVtoolnix then added another mkv as an additional input file.
    Then I deleted the video from the additional; file.

    The new audio from the added MKV muxed successfully. Why it didn't work for you with the mka, I don't know.
    Something new for me, I didn't know about this. Thanks blud7
    Quote Quote  
  8. Originally Posted by Jose Hidalgo View Post
    davexnet, I understand that mka is only the container. But when selecting only one single audio track, why can't MKVtoolnix GUI produce a container-less audio file like gMKVExtractGUI does ? (e.g. F1.aac instead of F1.mka)
    The MKVToolnix author simply hasn't bothered to implement extraction in the GUI (but the command-line tools support it).
    Quote Quote  
  9. Originally Posted by davexnet View Post
    As a test I loaded an mkv in MKVtoolnix then added another mkv as an additional input file.
    Then I deleted the video from the additional; file.

    The new audio from the added MKV muxed successfully. Why it didn't work for you with the mka, I don't know.
    Something new for me, I didn't know about this. Thanks blud7
    Yes, this is how it is supposed to work. Using tools like gMKVExtractGUI should not be necessary.


    The error messages OP is getting usually only happen with broken files or broken hardware. That could mean the source files are broken or there is a hardware problem with his PC causing the issues during the conversions. If you repeat the operations do you always get the exact same errors? Then probably broken files. If you get at different bytes positions each time it's probably hardware problem. It could also be a bug in mkvtoolnix but it is impossible to say without the files. You could ask the author by uploading to his ftp and opening a ticket.
    https://mkvtoolnix.download/bugreports.html
    Quote Quote  
  10. I can confirm that blud7 method seems to work perfectly in my case too. Which BTW tends to prove that I don't have "broken files" or "broken hardware".

    I think sneaker is right. It's probably a lack of implementation from the MKVtoolnix GUI author. I guess MKVtoolnix GUI in its current version has a flaw when trying to mux audio tracks from different sources :
    - Use blud7 method and it will work perfectly
    - But use MKVtoolnix GUI to extract audio first, and you may end up with warnings and corrupted audio !

    Don't you think this should be reported ?
    Quote Quote  
  11. Yes. You should report it. Then author can confirm if bug or not.
    Quote Quote  



Similar Threads

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