Linux Tips

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

After locating those files which use header compression, your next step is use mkvmerge or other tool to return MkV headers to normal.

Back to top