Hello,
I've seen many .ass to .srt threads on here, but I haven't seen a solution for the particular problem I'm having.
I'm on a linux machine and I'm using ass2srt.pl a popular perl script to convert .ass to .srt. It has worked like a charm in the past until today. I am trying to convert a .ass file and it gives me this error "utf8 "\xAA" does not map to Unicode at ass2srt.pl line 98. This error floods my terminal with increasing line numbers and different 2 character combinations after the \x. The problem sees to be that there are non-utf8 characters. Is there a way, in linux, to convert this file to .srt or perhaps to convert the .ass to a utf-8 .ass file first?
+ Reply to Thread
Results 1 to 6 of 6
-
-
First, you might want to confirm that the file isn't UTF-8 by opening a terminal, finding the directory with your .ass file, and typing:
file subtitle.ass
(where subtitle.ass is the file you're having problems with). You should see something like:
subtitle.ass: ISO-8859 text, with no line terminators
To convert the file, you can use iconv:
iconv --from-code=ISO-8859-1 --to-code=UTF-8 subtitle.ass > subtitle_converted.ass
You can see a list of supported character sets by using the '-l' option:
iconv -l -
Thank you for the help. It is good to know I can convert to utf-8 for future reference, however I made a silly mistake. Whilst extracting the .ass sub file from the .mkv container I accidentally extracted track 3 (audio) instead of track 1 (subs), that's why it wasn't working. Usually track 3 is the subs file and my script broke because of it. I fixed my script to search for the sub track instead of assuming it's the third one.
-
-
Indeed. I actually used the 'file subtitle.ass' command, which I was previously unaware of, to find out that the file I was trying to convert was indeed an audio MPEG, Joint Stereo, etc. file. Without that command I would've tried to convert an audio file into .srt *facepalm*
Similar Threads
-
Converting UTF8 subs to srt/smi/sub?
By Agrippa in forum SubtitleReplies: 7Last Post: 5th Jun 2013, 18:57 -
Convert .ass to .srt help
By Kyo in forum SubtitleReplies: 30Last Post: 21st Jul 2011, 03:47 -
Batch Converting ASS to SRT
By sickonsin in forum SubtitleReplies: 5Last Post: 30th Apr 2011, 17:12 -
Converting .ass to .srt help please
By iKhoa in forum SubtitleReplies: 6Last Post: 2nd Jul 2010, 12:56 -
ass to srt ?
By t_jay17 in forum SubtitleReplies: 3Last Post: 10th Oct 2007, 13:47