Hi!
-unicode instead -utf8 worked better for me.
BTW, I found a problem with SRT subtitles using milliseconds precision. SSA format does not support millisecond, and players go crazy if you use them. Therefore, the script should remove them.
Here are the necessary changes. Change the function generate_ssa_dialogs() for the following one:
Code:
generate_ssa_dialogs(){
sed -e "/ --> /s/,/./g" "${sub[1]}-temp" | tr -d "\r" | awk 'BEGIN{ORS="";print " "} / --> /,/^$/ {ORS=" ";print} /^$/{print "\n"}' | sed -e "s/ --> /,/g" -e "s/^ \([^ ]*\) \(.*\)/Dialogue: Marked=0,\1,lang1style,Cher,0000,0000,0000,,\2/" -e "s/,00:/,0:/g" -e "s/\([:,]\)0\([0-9]\)/\1\2/g" -e "s/\([0-9]\)\(.\)\([0-9]\)\([0-9]\)0\(,\)/\1\2\3\4\5/g" >>"$output"
sed -e "/ --> /s/,/./g" "${sub[2]}-temp" | tr -d "\r" | awk 'BEGIN{ORS="";print " "} / --> /,/^$/ {ORS=" ";print} /^$/{print "\n"}' | sed -e "s/ --> /,/g" -e "s/^ \([^ ]*\) \(.*\)/Dialogue: Marked=0,\1,lang2style,Cher,0000,0000,0000,,\2/" -e "s/,00:/,0:/g" -e "s/^ *//g" -e "s/\([:,]\)0\([0-9]\)/\1\2/g" -e "s/\([0-9]\)\(.\)\([0-9]\)\([0-9]\)0\(,\)/\1\2\3\4\5/g" >>"$output"
}
Thanks for that awesome script!
Bookmarks