Last active
April 21, 2017 13:14
-
-
Save tobadia/f6ee00b9979e6f3eb13538321b2dd20f to your computer and use it in GitHub Desktop.
mkvtoolnix: remove 'header compression' for mkvmerge on old releases (>= 4.2.0 and below 6.x ?)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The mkvtoolnix version that can be used on ARMv5 devices is an old 4.2.0-1 release. | |
# In this release, default is to switch on 'header compression' | |
# The solution is to take all tracks from a compressed file and have the corresponding headers uncompressed with the `--compression -1:none` (-1 is a wildcard for 'all tracks') | |
# This flag must be used for each input file, e.g. | |
mkvmerge -o "output.mkv" --compression -1:none "input1.mp4" --compression -1:none "input2.ac3" ... | |
# So, for adding subs.srt in an already existing mkv: | |
mkvmerge -o "output.mkv" --compression -1:none "input1.mkv" --language 0:eng --track-name 0:English subs.srt | |
# To know current charset | |
file -I *.srt | |
# If charset change is needed | |
iconf -f fromcode -t tocode in.srt > out.srt | |
# Batch add srt files, assuming same filename for file and episode (+bonus: using mp4 -> mkv) | |
for i in `ls *.mp4`; do mkvmerge -o mkv/${i:0:${#i}-3}mkv --compression -1:none $i --language 0:eng --track-name 0:English Subs/${i:0:${#i}-3}srt; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment