Header Compression in MKV files

server-linux-tips

#1

Header Compression in MKV files

If you encounter any issues with header compression in MKV files, this little script will tell you which files in the current directory are using it.

IFS=$'

'
for infile in find . -name "*.mkv"
do
uses_compression=$(mkvinfo "$infile" | grep "header removal")
if [ -n "$uses_compression" ]; then
echo $infile
fi
done`

Obviously the script can be expanded and mkvmerge invoked to remux without header compression.
PMS has gotten much better at detecting this but may not catch all cases (AFAIK)/


#2