Here are some comparison from the Apple adaptive streaming sample page. I don't how they compare to real life files, maybe they are improperly muxed but the results are always in the favor of Matroska even when large padding and tags are left in the file.
Advanced Stream
The lowest bitrate video is 530kbps according to the manifest and 369 kbps according to MediaInfo. Then I remuxed it with mkvmerge. Then go through mkclean and here are the results:- 27 672 619 original fMP4 with H264
- 27 449 794 mkvmerge with default options (we win already)
- 27 447 068 mkclean with default options
- 27 439 197 mkclean with --live
- 27 357 090 mkclean with --remux --optimize
- 27 349 220 mkclean with --remux --optimize --live
Advanced Stream HEVC
Here Matroska doesn't have the advantage of using Header Compression as with H264, which saves 3 bytes per frame as they are always the same. The 145 kbps is also closer to the limit of everyday files.- 11 492 052 original fMP4 with HEVC
- 11 410 786 mkvmerge with default options (we win already)
- 11 407 257 mkclean with default options
- 11 371 266 mkclean with --remux --optimize
Advanced Stream H264
This is the same as above but in H264 format, so we get to use header compression.- 10 663 861 original fMP4 with H264
- 10 558 115 mkvmerge with default options (we win already)
- 10 554 002 mkclean with default options
- 10 498 886 mkclean with --remux --optimize
1 comment:
Your comparison is interesting. You could have added the size differences between the 2 types of files as percentages, this makes it easier to grasp the difference. If I am correct, the best Matroska option is 1.17%, 1.05% and 1.55% smaller than the MP4 option.
Also usually overhead of container files decrease with file duration (because they have larger header), and get more stable with long duration files. How long are those files?
Also, how did you produce the MP4? Did you try to optimize them (e.g. NALU prefix lengths, removal of sample groups)?
Finally, are the features offered by the optimized MKV and MP4 equivalent?
Post a Comment