Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th April 2023, 12:48   #1  |  Link
hwh
Registered User
 
Join Date: Mar 2020
Posts: 6
What is mkvtoolnix doing?

Hi, sorry if this is a stupid question, but I am sure people here know.

I have some MKVs created by OBS. For some reason I picked up this software a couple of years ago, maybe to have a look at some issue with an MKV I had. I noticed it generated a much smaller file than the source.

In other words I "multiplexed" an MKV file with nothing to create an identical MKV file that is like 50MB smaller. I don't know why. And since it's meant to be lossless and acceptable for editors and uploading and so on, I don't want to do something weird to the file to make it unusable.

I also experimented with a very similar file which was remuxed to MP4. Running this MP4 through mkvtoolnix again yields a file about 50MB smaller. I can't find anything wrong with these smaller files but I am suspicious and don't really want my files in MKV anyway. I just don't see why the MKV -> MKV process does anything.

If I remux the MKV mkvtoolnix made back to MP4, it only gains 3MB. So, I just want to know what the hell it's doing to my files that isn't video related. Apparently some kind of bloat is being removed. But is it innocuous?
hwh is offline   Reply With Quote
Old 21st April 2023, 15:13   #2  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
Quote:
Originally Posted by hwh View Post
Apparently some kind of bloat is being removed.
Exactly.

Quote:
Originally Posted by hwh View Post
But is it innocuous?
Yes, it is removing (or not re-adding) redundant metadata type information. Nothing important for playback is lost.

Edit:MKV was designed to be efficient, I like how simple and functional it is compared to other file formats.
__________________
madVR options explained

Last edited by Asmodian; 21st April 2023 at 15:15.
Asmodian is offline   Reply With Quote
Old 22nd April 2023, 01:23   #3  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
mkv has lossless compression build in just like a "zip".
this can result in massive file size difference between mp4 and the much more superior mkv container.

this is an optional feature so you can also disable it.
if obs doesn't use it that would be it.
this is similarly powerful as a lossless codec on LPCM audio.
huhn is offline   Reply With Quote
Old 22nd April 2023, 22:20   #4  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
Quote:
Originally Posted by huhn View Post
mkv has lossless compression build in just like a "zip".
Isn't that only used for subtitles?
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 22nd April 2023, 23:44   #5  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,340
Quote:
Originally Posted by Asmodian View Post
Isn't that only used for subtitles?
Usually, yes. You technically can apply it to everything, but its pointless. Compressed streams do not benefit from it.

And its also rather generic zlib or bz2 compression (both are options). For the example on lossless PCM audio - any FLAC stream is going to be significantly smaller, because FLAC knows what audio is and how to compress it, rather then just trying to compress the bytes.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 26th April 2023, 09:51   #6  |  Link
hwh
Registered User
 
Join Date: Mar 2020
Posts: 6
Ok guys, thanks.

I still don't get it. Deleting all keyframes? It's kind of a minor thing (the file size difference) but smaller files are easier to work with, so I will probably run them through mkvtoolnix as a final step.

I don't really know what the program is for, some kind of splitting, appending and metadata editor. Like whaaa?
hwh is offline   Reply With Quote
Old 26th April 2023, 20:19   #7  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,406
It is definitely not deleting all the keyframes! (?!)

The program is for muxing video+audio+subtitles+chapters into Matroska files. What do you mean by "for" if not that?
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 30th April 2023, 02:04   #8  |  Link
hwh
Registered User
 
Join Date: Mar 2020
Posts: 6
Quote:
Originally Posted by Asmodian View Post
It is definitely not deleting all the keyframes! (?!)

The program is for muxing video+audio+subtitles+chapters into Matroska files. What do you mean by "for" if not that?
Ok, I didn't know. Even within different MKVs there apparently can be a lot of invisible overhead.
hwh is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.