Why does remuxing (w/o removing anything) change file size?

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
NickNewb
Posts: 12
Joined: Fri Oct 24, 2014 6:50 pm

Why does remuxing (w/o removing anything) change file size?

Post by NickNewb »

So I have a blu-ray that I ripped to mkv using MakeMKV and its file size was 12,066,915,621 bytes. It has 4 audio tracks, 3 of which are commentaries. I opened this .mkv file using mkvmergeGUI and took the 3rd track and moved it up so it's now the 2nd track. That's it. Then I clicked 'remux.'

My new file size is 12,057,623,542 bytes, so about 9MB smaller. I didn't remove anything, I just reordered the audio tracks.

So just for science, I decided to take this smaller file, open it up in mkvmergeGUI, and switch the tracks back and remux again.

Now I end up with an even smaller file, although the change wasn't as much. This new file is 12,057,617,754 bytes, so about 5kB smaller.

Well, of course I had to go another step further and switch the tracks back again and remux again and now I end up with a file...that's bigger(!) by only 36 bytes. It's 12,057,617,790 bytes.

What is going on here? From what I understand, remuxing is not re-encoding anything, so my audio/video experience is not suffering, right? Is mkvmerge just adding and deleting some metadata or something? If so and anyone knows, just for my own curiosity's sake, what metadata is being messed with here?
foxmulder2
Posts: 3
Joined: Sun Dec 06, 2015 5:08 pm

Re: Why does remuxing (w/o removing anything) change file si

Post by foxmulder2 »

mkvmerge automatically compresses (lossless!) subtitles using zlib. I don't know how much of a difference that makes, but I'd guess 9MB sounds plausible.
Apart from that, I know mkvmerge adds tags for the tracks containing information about them, so that could change the file size a tiny bit.

I have no explanation for the changes as they occurred for you though. But I am sure that mkvmerge doesn't touch your tracks themselves at all, they are exactly the same after remuxing. Obviously you can test that yourself, by extracting the tracks prior and after the process and comparing them.
If I had to guess, I'd say the minor changes come from something insignificant within the metadata, as you suspected. But I don't know anything about that stuff.
TopHat
Posts: 8
Joined: Tue Feb 02, 2016 12:58 am

Re: Why does remuxing (w/o removing anything) change file si

Post by TopHat »

I have had the same experience and am wondering the same thing!

In my case I extracted a DVD with MakeMKV. I then found that I wanted to rename one of the subtitle tracks for easy identification during playback. Rather than re-rip the DVD, I used MakeMKV to open the MKV file and renamed the track in question. The remuxed output from MakeMKV turned out to be ever so slightly smaller...seems very strange!
McStarfighter
Posts: 15
Joined: Sun Feb 01, 2015 7:45 pm

Re: Why does remuxing (w/o removing anything) change file si

Post by McStarfighter »

For the future: The buzzword is "MKV compression" ...
necrosis
Posts: 30
Joined: Sun Jul 21, 2013 4:11 am

Re: Why does remuxing (w/o removing anything) change file si

Post by necrosis »

TopHat wrote:I have had the same experience and am wondering the same thing!

In my case I extracted a DVD with MakeMKV. I then found that I wanted to rename one of the subtitle tracks for easy identification during playback. Rather than re-rip the DVD, I used MakeMKV to open the MKV file and renamed the track in question. The remuxed output from MakeMKV turned out to be ever so slightly smaller...seems very strange!
If you are just changing the name of a subtitle file there should be no reason to remux the file. Should just take like half a second.
Post Reply