Relocate MOOV alternative for Matroska files & optimizing MKVs for streaming
See original GitHub issueThere’s a tool called mkvpropedit that can rewrite the new statistics for an MKV file, which is great since most of the time the metadata stuff like bitrate and track size don’t show after conversion, for example the command is like this:
mkvpropedit --add-track-statistics-tags <file/path>
it goes from this (no size and bitrate info):
Audio #1
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : A_AAC-2
Duration : 23 min 15 s
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Title : 5.1 Channel / 5.1 Channel
Writing library : Lavc58.134.100 libfdk_aac
Language : English
Default : Yes
Forced : No
to this with the mkvpropedit command:
Audio #1
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : A_AAC-2
Duration : 23 min 15 s
Bit rate : 406 kb/s
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 67.5 MiB (4%)
Title : 5.1 Channel / 5.1 Channel
Writing library : Lavc58.134.100 libfdk_aac
Language : English
Default : Yes
Forced : No
This may seem too much for just a few extra headers, but it would be really great to have it as an option to check my settings/or when I’d like to deploy it into my servers and check everything is going nicely, this is already done when relocate moov is enabled, so it would be cool to have on MKVs
One more thing, there’s a tool called mkclean that basically optimizes the MKVs for streaming, adding it as an option would be amazing, I think it might be possible as an post-process command or something but I think it would be cool to have it baked into the tool
Just an important thing to some, it will re-write the cues, some might not want that for other reasons, so I recommend adding this as an opt-in option
Note: I haven’t really tested/compared if there is an ffmpeg command that can basically do one/both (or if it does it already), I searched but most results talk about other things or unrelated stuff, so one of these features could be already be possible by ffmpeg, I don’t really know
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
That warning is normal for MKVs, QTFS not supported but other ffmpeg parameters are applied, the QTFS pass is still attempted just because it fails gracefully if it’s the wrong format
3a6ae9e3591f764b99512c5f9aa5fd6d5b94eb1d
Silence that warning and moved to debug level logging to reduce confusion and explicitly don’t attempt on MKVs now
Oh that looks great, I haven’t really tried ffmpeg’s index thing so I can’t tell much about it, but it’s awesome to see it integrated 😃, sadly I can’t check if it works correctly currently, but it’s probably good to go