I'm trying to make automatic conversion of media files (video, audio, subtitles)
I use ffmpeg mainly.
I would subtitles convert to UTF-8 WebVTT files but I'm facing problem how to convert non UTF-8 encodings.
ffmpeg says:
[srt @ 0x559e9f111dc0] Invalid UTF-8 in decoded subtitles text; maybe missing -sub_charenc option
Error while decoding stream #0:8: Invalid data found when processing input
What to do when I don't know encoding at advance? (Should I use some other program? If so would you suggest some technique?)
Input is any media file - MKV, MP4, ... with bundled subtitle(s)
EDIT1:
full command with error:
ffmpeg -i input.mkv -c:s srt -map 0:s:3 3.srt
this pass OK:
ffmpeg -sub_charenc CP1250 -i input.mkv -c:s srt -map 0:s:3 3.srt