VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker or buy PlayOn and record Netflix! :)
+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    May 2014
    Location: Location
    Search PM
    Howdy folks,
    I decided it's time for a new camcorder, seeing as the old one I have works with VHS cassettes.
    So, I bought a Panasonic HC-v720 (specs) which records AVCHD. I use the highest quality settings and the resulting files are *.mts with BDAV container, AVC video codec and 2ch AC-3 audio codec (5.1 is optional but I don't need it).
    I don't like this container and I want to change it to MP4 losslessly, I.E. with no video re-encoding, only audio re-encoding to AAC.
    I googled and read for hours looking for a simple, fast and free, one program solution to do what I wanted but most of the threads are outdated and talking about demuxing, re-encoding audio and muxing, which is something I want to avoid if possible.
    I did come across a utility named MKVtoMP4 which seemed to do exactly what I wanted but I got suspicious... How can I tell if the resulting file has the same video stream, or a stream re-encoded with the same parameters as the old one?
    So I theorized that if I demux (with tsMuxeR) the source MTS file and the MP4 file after the MKV2MP4 conversion, both of the resulting video files should be identical (same size, CRC32, MD5, etc) if it was indeed lossless video conversion after MKV2MP4.
    This did not happen, the 2 files were off by a few bytes, so I tried something else: I demuxed the source file with tsMuxeR, then I used MeGUI's MP4 muxer to mux the *.264 video file with the AC-3 audio file and then demuxed the resulting MP4 file with tsMuxeR. Again, the two *.264 video streams were off by a few bytes.

    My questions:
    1. Does MKVtoMP4 re-encodes the video? If yes, Is there a simple free program that can change the container without re-encoding?
    2. Was my theory about identical files after demuxing wrong? why are the files different in size if they are the same video stream?
    3. I have a question on a different issue but I'll ask when we solve the current issue.

    Thanks in advance.

    Some images:

    Source MTS from camcorder:
    Click image for larger version

Name:	0001.png
Views:	1348
Size:	60.7 KB
ID:	25325

    After MKV2MP4:
    Click image for larger version

Name:	0002.png
Views:	1300
Size:	57.7 KB
ID:	25328

    tsMuxeR settings:
    Click image for larger version

Name:	0005.png
Views:	1526
Size:	98.4 KB
ID:	25329
    Quote Quote  
  2. Originally Posted by Lossless Lion View Post
    1. Does MKVtoMP4 re-encodes the video?
    It does not. It will reencode the audio if it's not suitable for the MP4 container. It may lose or add some metadata -- that would explain why your demuxed streams are different.
    Quote Quote  
  3. Member
    Join Date
    May 2014
    Location: Location
    Search PM
    Thanks jagabo.
    Do you know of a simple tool that can edit the metadata? I would like to try to remove it and check.
    Quote Quote  
  4. I'm pretty sure MKVtoMP4 doesn't even have the ability to reencode the video. You can ask the author in this thread:
    Quote Quote  
  5. If you mux and demux you will lose the sequence headers. This doesn't affect the video quality , but will may alter the filesizes and thus results in file verification software (checksums, md5's)

    If you only care about the visual quality and not the metadata, accesssory streams (AVCHD has other things like time/date/ sometimes GPS info), you need to check and compare the decoded streams , not the compressed streams which may have different metadata, headers (ie. decode to raw YUV and do some SSIM or PSNR tests, or do per frame MD5 testing) . Those raw YUV streams will be bit for bit identical in terms of checksums, md5's etc
    Quote Quote