PDA

View Full Version : Massive shrink of a h.264 stream when muxxing with mkvtoolnix


NanoBot
16th August 2009, 17:32
Hi,

yesterday, I made a recording from ZDF HD in 1280 x 720p50, the movie is "The Andromeda Strain". After trimming it with TSPacketEdit und demuxxing it with TSMuxxer, I got a h.264 file sized about 10,4 GByte and a mp2 file sized 228MByte. Until here, everything works like it should.

Now I muxxed those two files into a mkv file using mmg, and the astonishing and also pleasing result was, that the resulting file has a size of only 4,2 GByte. Nevertheless, the mkv contains the whole movie, no parts are missing. Because at first I can't believe that, I also demuxxed the h.264 stream from this mkv, resulting in a filesize of 3,87BGyte. I analysed the mkv with Avinaptic, which shows, that the h.264 stream has a constant DRF of 26, regardless of the frametype. My best guess is that the h.264 encoder used to encode this stream inserted some kind of stuffing bytes to achieve a constant bitrate. So my question is:

Is the h.264 import module of mmg able to detect such stuffing bytes and to remove them ? Cause this is the only possibility I can imagine which would explain this massive shrink in size during the muxxing process into a mkv file.

C.U. NanoBot

Selur
17th August 2009, 17:42
Cause this is the only possibility I can imagine which would explain this massive shrink in size during the muxxing process into a mkv file.
Transportstream overhead can be quite huge,...
see: http://forum.gleitz.info/showthread.php?t=39874 or search the forum here for m2ts/ts overhead,...
-> I would not be surprised if one muxed a 3 hr movie from m2ts to mkv and shrank the file size by 90% doing it *gig* (Transportstream is evil!)

sneaker_ger
17th August 2009, 18:28
But since he demuxed the streams the overhead shouldn't have anything to do with the TS overhead, should it?

Selur
20th August 2009, 21:20
You are right, I totally overread that sentence,...