VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Member
    Join Date
    Apr 2011
    Location
    Ann Arbor
    Search Comp PM
    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?
    Quote Quote  
  2. VH Wanderer Ai Haibara's Avatar
    Join Date
    Jan 2006
    Location
    Somewhere on VideoHelp...
    Search Comp PM
    You could always try installing the Linux version of Aegisub, load the .ass in that, make edits/corrections if necessary, then export to a .srt.
    If cameras add ten pounds, why would people want to eat them?
    Quote Quote  
  3. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by p014k View Post
    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?
    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
    Quote Quote  
  4. Member
    Join Date
    Apr 2011
    Location
    Ann Arbor
    Search Comp PM
    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.
    Quote Quote  
  5. Member
    Join Date
    Oct 2010
    Location
    England
    Search Comp PM
    Originally Posted by p014k View Post
    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.
    Ah, this sort of thing happens to all of us at some time
    Quote Quote  
  6. Member
    Join Date
    Apr 2011
    Location
    Ann Arbor
    Search Comp PM
    Originally Posted by intracube View Post
    Originally Posted by p014k View Post
    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.
    Ah, this sort of thing happens to all of us at some time
    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*
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!