VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Member
    Join Date
    Jun 2009
    Location
    United States
    Search Comp PM
    I have many .mts files from my camcorder that are short clips. I was wanting to merge them into one .mts file. I realized I could do this easily with MKVToolNix.

    The problem is when I try to add a .mts file (i mistakenly forgot to select it earlier) to the new all-in-one .mts file I just created. MKVToolNix gives me an error that the audio formats are different. It's like MKVToolNix changes the audio, though I thought it doesn't re-encode.

    The biggest difference I noticed is the Audio ID and Audio Codec are different for each.

    The resulting file's audio is as follows:

    Audio for merged short clips using MKVToolNix

    ID : 2
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Format settings, Endianness : Big
    Codec ID : A_AC3
    Duration : 21mn 41s
    Bit rate mode : Constant
    Bit rate : 256 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Delay relative to video : -33ms
    Stream size : 39.7 MiB (3%)
    Default : Yes
    Forced : No


    Audio for original short clips:

    ID : 4352 (0x1100)
    Menu ID : 1 (0x1)
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Format settings, Endianness : Big
    Codec ID : 129
    Duration : 1mn 12s
    Bit rate mode : Constant
    Bit rate : 256 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Delay relative to video : -33ms
    Stream size : 2.21 MiB (0%)

    Doing a search on Google, I couldn't find the significance of the two different formats and why they couldn't be appended together.

    Any suggestions?
    Quote Quote  
  2. I'd guess (because I couldn't find any info I was confident I understood) that MKVToolNix is rewriting the codec ID or something similar when muxing. When you later attempt to append another M2TS segment it sees it as not containing the same audio. Therefore if you remux the additional M2TS part with MKVToolNixGUI and attempt to append the new MKV instead, it should be successful. That's just a theory though, and could be a load of nonsense....
    Quote Quote  
  3. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    What happens if you start afresh and redo all of the files you need in the compilation including the one you forgot initially? Could a setting in your Camcorder has changed? MKVMerge GUI doesn't re-encode video or audio so not sure what's happening here. https://mkvtoolnix.download/doc/mkvmerge.html
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  4. Member
    Join Date
    Jun 2009
    Location
    United States
    Search Comp PM
    Originally Posted by hello_hello View Post
    I'd guess (because I couldn't find any info I was confident I understood) that MKVToolNix is rewriting the codec ID or something similar when muxing. When you later attempt to append another M2TS segment it sees it as not containing the same audio. Therefore if you remux the additional M2TS part with MKVToolNixGUI and attempt to append the new MKV instead, it should be successful. That's just a theory though, and could be a load of nonsense....
    Your right, it works when I append two video files that have already been appended using MKVToolNix. So, it's obvious some reencoding or something that changes the audio format is transpiring during the remux process.
    Quote Quote  
  5. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    I would suggest you post a full MediaInfo report of the original mts files that you are muxing into a MKV container - once again MKV Tools does not re-encode Audio or Video so the problem is elsewhere. If it was capable of re-encoding the whole process would take much longer in time and you would be able to convert from one audio format to another which of course it cannot. All it does is wrap the video and audio and subtitles and chapters etc in a MKV container.
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  6. The codec ID has changed. At least according to the MediaInfo info in the first post. I've no idea if that's something MKVToolNix did or if it's just the way MediaInfo is interpreting it.

    I'm not saying the audio itself has changed or been re-encoded, but something may have changed when remuxing as MKV.
    Quote Quote  
  7. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    maybe there is a difference in the 2 source mts files - a MediaInfo report of both file would help to track down what is happening.
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  8. As a quick experiment I tried remuxing an MKV as an M2TS file with TS muxer. The codec ID for the AC3 changed from 129 to A_AC3, according to MediaInfo. I tried appending the MKV to the M2TS file and when I did the AVC video wouldn't append. That's probably expected behaviour, but the AC3 appended fine on it's own, so I didn't manage to prove anything there.
    Quote Quote  
  9. Member
    Join Date
    Jun 2009
    Location
    United States
    Search Comp PM
    I have attached the two logs from MediaInfo: One is the original straight from my camcorder (Original.m2ts). The other is the remuxed version from MKVToolNix (Remuxed.m2ts).

    MKVToolNix seems to always default to the .mkv extension for output, so I always try to change it so it matches the original file extension; .m2ts in this instance. I notice the file size for the remux file is smaller than the original. Shouldn't they be the same size if nothing is being changed?

    Original file size: 767 MB
    Remuxed file size: 728 MB
    Image Attached Files
    Quote Quote  
  10. Matroska has less overhead than m2ts. Mkvmerge will also remove any filler NALUs, if present.
    Quote Quote  
  11. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    Originally Posted by hello_hello View Post
    As a quick experiment I tried remuxing an MKV as an M2TS file with TS muxer. The codec ID for the AC3 changed from 129 to A_AC3, according to MediaInfo. I tried appending the MKV to the M2TS file and when I did the AVC video wouldn't append. That's probably expected behaviour, but the AC3 appended fine on it's own, so I didn't manage to prove anything there.
    From the author of Popcorn AudioConverter who was answering a similar question - A_AC3 is AC3. The "A_" prefix simply means "Audio Codec".
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  12. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    MKVToolNix seems to always default to the .mkv extension for output, so I always try to change it so it matches the original file extension; .m2ts in this instance. I notice the file size for the remux file is smaller than the original. Shouldn't they be the same size if nothing is being changed?
    As Homer might remark "duh!" That's because MKVToolNix is a program for putting video/audio components into a MKV CONTAINER not a m2ts container! So it is a pointless exercise changing the suffix from mkv to m2ts and signifies nothing! Regarding size as sneaker said "Matroska has less overhead than m2ts. Mkvmerge will also remove any filler NALUs, if present."

    Maybe keep all your components as m2ts and do all the appending in https://www.videohelp.com/software/tsMuxeR the resulting file will have the same output suffix naturally. Then use MKVMerge to put in a MKV container.
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  13. Originally Posted by netmask56 View Post
    From the author of Popcorn AudioConverter who was answering a similar question - A_AC3 is AC3. The "A_" prefix simply means "Audio Codec".
    Cheers. What about AC3 in a TS or M2tS file though? Do you know why MediaInfo just displays "129" as the codec? Or is that just the way the codec ID is written to the container and nothing to do with the problem here?
    Quote Quote  
  14. Member
    Join Date
    Jun 2009
    Location
    United States
    Search Comp PM
    Originally Posted by netmask56 View Post
    MKVToolNix seems to always default to the .mkv extension for output, so I always try to change it so it matches the original file extension; .m2ts in this instance. I notice the file size for the remux file is smaller than the original. Shouldn't they be the same size if nothing is being changed?
    As Homer might remark "duh!" That's because MKVToolNix is a program for putting video/audio components into a MKV CONTAINER not a m2ts container! So it is a pointless exercise changing the suffix from mkv to m2ts and signifies nothing! Regarding size as sneaker said "Matroska has less overhead than m2ts. Mkvmerge will also remove any filler NALUs, if present."

    Maybe keep all your components as m2ts and do all the appending in https://www.videohelp.com/software/tsMuxeR the resulting file will have the same output suffix naturally. Then use MKVMerge to put in a MKV container.
    Thank you for confirming the obvious for me I thought that was probably the case after further testing, but it's nice to know for certain. I haven't used TsMuxer in a while that I forgot all about it. Thanks for the reminder and the clarification!
    Quote Quote  



Similar Threads

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