If it helps someone, I made a script to create a MKV container out of the recorded files and setting the subtitles with correct flags (no recoding necessary, super fast).
The script browses through all files in a directory and combines MP4 video/audio with the subtitles and setting the parameters right.
I am storing all episodes of one season in a separate folder, using the following naming template:
Code:
%p/%n/Season %s/%n_S%sE%e_%t
and select to store all subtitles as separate file (SRT format)
I have a linux PC, but it should also work with the Linux subsystem in Windows by installing the MKV Tools:
Code:
sudo apt-get install mkvtoolnix
Then create a script, e.g.
The insert the following code:
Code:
#!/bin/bash
# NOTE : Quote it else use array to avoid problems #
FILES="*.mp4"
mp4ext=".mp4"
outext=".mkv"
forcedsrt=".de.forced.srt"
standardsrt=".de.srt"
for f in $FILES
do
filename=$(basename -- "$f")
filename="${filename%.*}"
output="$@$filename$outext"
#check if forced subtitles exist
if [ -f "$filename$forcedsrt" ]
then
#check if standard subtitles exist
if [ -f "$filename$standardsrt" ]
then
echo "found $filename with forced and standard subtitles"
mkvmerge -o "$output" "$filename$mp4ext" --forced-track "0:yes" --default-track "0:yes" --language "0:deu" "$filename$forcedsrt" --language "0:deu" "$filename$standardsrt"
else
echo "found $filename with forced subtitles"
mkvmerge -o "$output" "$filename$mp4ext" --forced-track "0:yes" --default-track "0:yes" --language "0:deu" "$filename$forcedsrt"
fi
else
#check if standard subtitles exist
if [ -f "$filename$standardsrt" ]
then
echo "found $filename with standard subtitles"
mkvmerge -o "$output" "$filename$mp4ext" --language "0:deu" "$filename$standardsrt"
else
echo "found $filename with no subtitles"
mkvmerge -o "$output" "$filename$mp4ext"
fi
fi
done
If the language is not german, then you have to update the "de" and "deu" thingis to "en" and "eng"...
You can use the script then with:
Code:
./makevideo.sh [output directory]
The script makes it super easy to process a whole season in one step and storing it in the right directory.
Disclaimer: The scripts works for me - but I cannot guarantee that it works for you. So be prepared that your video is not useable, your filesystem gets erased or your cat getting pregnant...