To help me with that, I created the workaround script below:
Code: Select all
#!/bin/bash
input_file=$(realpath "$1")
mv -f "$input_file" "${input_file}.temp"
ffmpeg -i "${input_file}.temp" -map 0 -c:v copy -c:a copy -c:s srt "$input_file"
rm -f "${input_file}.temp"
Code: Select all
find . -iname '*.mkv' -exec bash subtitle-converter.sh {} \;
I would like to execute something similar after each NZBGet download, but the script would need to be smarter and take into consideration stuff like:
- Download is a single file or a folder with multiple files
- Media file doesn't have subtitle stream so skip this file
- Media file already has SRT subtitle stream so skip this file
Can someone help?