If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Romanian subtitles

TeHashXTeHashX Posts: 36Members ✭✭

   Hi, I have a Samsung UE40ES6100 TV and PMS running on Odroid-C1, it's all fine but romanian subtitles not working well, the next two characters won't show "ț&ș", subtitles are encoded utf-8 and working well on any other media player but on Plex in Samsung Hub don't.

Should I change some file on my server?

Thanks

Best Answer

  • TeHashXTeHashX Posts: 36Members ✭✭
    Accepted Answer
    Thanks all again, SRT2UTF-8 it's all I need and working great.
«1

Answers

  • OrcaOrca Plex for Samsung Developer Posts: 7,564Members, Plex Pass, Plex Ninja Plex Ninja

    You might want to get the 2.002 Beta and set the subtitles to "Arial". The newer subtitle font in 2.001 seems to be missing support for some languages.

    Have you checked if your answer might be in the User Manual?
    My Samsung environment:

    2010 BD-C5500 Blu-Ray,
    2011 UE46D7000 LED-TV,

    2012 BD-ES6000 Blu-Ray,

    2014 UE55HU8500L UHD LED TV

    If you enjoy this free app, you can buy me a beer by making a Donation

  • TeHashXTeHashX Posts: 36Members ✭✭
    Orca wrote on May 4 2015, 12:46 AM: »

    You might want to get the 2.002 Beta and set the subtitles to "Arial". The newer subtitle font in 2.001 seems to be missing support for some languages.

    Thanks for the beta but is the same, should be an option to choose character encoding to central european or east european like on any other player.
  • shocker-liveshocker-live Posts: 83Members, Plex Pass Plex Pass
    edited May 2015

    Just modify the subtitle in "The Movie Name.ro.srt" and it will work ;)

    Playing romanian subtitles all day long for one year without any issues.

    PMS latest PlexPass version running on CentOS latest version :)

  • TeHashXTeHashX Posts: 36Members ✭✭
    shocker-live wrote on May 4 2015, 6:19 AM: »

    Just modify the subtitle in "The Movie Name.ro.srt" and it's will work ;)
    Playing romanian subtitles all day long for one year without any issues.

    I can't rename every time every single subtitle, character encoding option will solve this issue.
  • shocker-liveshocker-live Posts: 83Members, Plex Pass Plex Pass

    Just create a script to modify all the subtitles and it will work.

    Long time ago I've tried the fix with character encoding the be spread on all devices but without success.

    PMS latest PlexPass version running on CentOS latest version :)

  • TeHashXTeHashX Posts: 36Members ✭✭

    That is not a simple solution, every media player has an option for character encoding but not plex and is strange because is the best media server ever.

  • iq2luciq2luc Posts: 19Members, Plex Pass Plex Pass
    edited May 2015

    Hi TheHashX,

    I also play romanian subs on Plex client for Samsung SmartTV since 2013 without any issues (and a lot of other clients too).

    Also, if the Plex server and clients are UTF-8 compliant and use UTF-8 exclusively, there is no actual (technical) meaning for a "character set / code page option". Love or hate Unicode :-) but UTF-8 can encode it all.

    So, the first thing I would check: is my subtitle file UTF-8 encoded? Secondly: if the original (source) subtitle was ASCII -- did I properly convert it to UTF-8 (taking the character set / code page into consideration) or it was a "dirty" re-encoding to UTF-8 without properly taking into consideration the character set?

    From my personal experience with romanian subs, I can tell you, unfortunately, almost all the subs you get from websites like titrari.ro / subs.ro / opensubtitles.org etc. are ASCII based encoded using ISO-8859-2 (or Windows 1250) character set. This is bad because: 1. the proper character set for Romanian ASCII encoding should actually be ISO-8859-16 not ISO-8859-2 and 2. ideally they should be UTF-8 encoded, not ASCII. So you need to take this into account when using such subs in Plex -- they should be converted to UTF-8 (taking into consideration the character set / code page of the source file), not just re-encoded as UTF-8.

    If you're on a Linux based system, you could prepare a simple conversion script around: iconv -f ISO-8859-16 -t UTF-8 bad_ascii_sub.srt > good_utf8_sub.ro.srt and all your library would be updated in a matter of seconds. I guess on Windows you could do something similar (or use Notepad++).

    Regarding the subtitle naming scheme, shocker-live advice is a good one too, see https://support.plex.tv/hc/en-us/articles/200471133-Adding-Local-Subtitles-to-Your-Media-- External Subtitle Files section for more details on this topic.

    Thanks,

    Luc

  • TeHashXTeHashX Posts: 36Members ✭✭
    Thanks, some script to automatically rename and convert subtitles?
  • iq2luciq2luc Posts: 19Members, Plex Pass Plex Pass

    Hi TheHashX,

    I think I could help you and write a bash script to automatically convert all subs in your movie library, but I need more info from you:

    1. Do you follow the movie library naming scheme recommended by Plex? (https://support.plex.tv/hc/en-us/articles/200381023-Naming-Movie-files)
    2. All your subs are named like Movie_name.srt or are there any other naming schemes used? If so - give me some examples.
    3. All your subs are ASCII encoded, or are there some mixed ASCII and UTF-8 encoded subs?
    4. Please attach here a sample sub file in ASCII based encoding (if you have such files) and also a sample for UTF-8 file (preferable from the ones you said they didn't work properly for you) - you can put them both in a compressed file so we can save some space :-)

    Thanks,

    Luc

  • TeHashXTeHashX Posts: 36Members ✭✭
    iq2luc wrote on May 4 2015, 11:14 AM: »

    Hi TheHashX,

    I think I could help you and write a bash script to automatically convert all subs in your movie library, but I need more info from you:

    1. Do you follow the movie library naming scheme recommended by Plex? (https://support.plex.tv/hc/en-us/articles/200381023-Naming-Movie-files)
    2. All your subs are named like Movie_name.srt or are there any other naming schemes used? If so - give me some examples.
    3. All your subs are ASCII encoded, or are there some mixed ASCII and UTF-8 encoded subs?
    4. Please attach here a sample sub file in ASCII based encoding (if you have such files) and also a sample for UTF-8 file (preferable from the ones you said they didn't work properly for you) - you can put them both in a compressed file so we can save some space :-)

    Thanks,

    Luc

    1. Yes

    2. Yes, exactly as the movie, only extension is .srt

    3. Subs are downloaded from titrari.ro / subs.ro / opensubtitles.org and are not converted manually

    While downloading movies with transmissionbt, I download subtitles in the same directory as movie file and rename to movie name, when downloading finished it's ready to be watched with any other dlna server: Serviio, Minidlna, Twonky... but with plex dlna, no video file is played on my ue40es6100 tv, for that I installed Plex on SmartHub.

    4. https://www.dropbox.com/s/7n34k9vy3sgrzil/not-ok.srt?dl=0

    Thanks

  • TeHashXTeHashX Posts: 36Members ✭✭

    I tried a lot of combinations and if I append .ron to movie and subtitle file, all video files working fine with correct characters.

    1 - I need a script to rename files to movie.ron.avi & movie.ron.srt

    or

    2 - Modify plex configuration (if possible) to treat all files as romanian, I'm not interesting on other languages.

  • shocker-liveshocker-live Posts: 83Members, Plex Pass Plex Pass
    edited May 2015

    Here you go:

    #!/bin/sh
    find "/path/to/your/movie/folder" -type f | \
     (while read file ; do
            if [[ "$file" == *.srt* ]]; then
                    if [[ "$file" != *.ro.srt* ]]; then
                            mv "$file" "`dirname "$file"`/`basename "$file" .srt`.ro.srt"
                    fi
            fi
    done);

    PMS latest PlexPass version running on CentOS latest version :)

  • iq2luciq2luc Posts: 19Members, Plex Pass Plex Pass
    edited May 2015

    OK, got it, I will prepare a script for you later on or tomorrow (sorry I'm not home right now and I don't have the needed time to do it).

    I quickly checked the file you uploaded, and it is indeed ASCII encoded, again such files should be converted to UTF-8 using ISO-8859-16 as input, i.e.: iconv -f ISO-8859-16 -t UTF-8 orig_sub.srt > conv_sub.ro.srt to properly get valid romanian diacritics.

    That way we will get the correct Unicode code points for romanian diacritics (with comma: șȘțȚ) instead of the wrong ones. Setting input to ISO-8859-2 would give us wrong diacritic symbols (with cedilla: şŞţŢ).

    I think I understand now why most people get "wrong characters" when re-encoding such files from ASCII to UTF-8 -- most text editors will just assume ISO-8859-1 for input, and so -- the resulting UTF-8 file will have the code points for ºþ... and so on, instead of șț... (well, I placed here some glyphs to visually simplify things, but the actual code points are just numerical values, in the end it depends on the font how the glyph looks like). If the user is not aware of these things -- they can assume the problem is on the decoder side (which would be wrong judgement).

    This is a "problem" for all ASCII encoded files (not only the romanian related character set), so the solution will apply to non-romanians too (who have diacritics in their alphabet), one should only take care selecting the proper character set for the input file when doing ASCII to UTF-8 conversion.

    Thanks,

    Luc

  • shocker-liveshocker-live Posts: 83Members, Plex Pass Plex Pass
    edited May 2015

    What Luc is writing is 100% correct. Converting all subtitles was my first option at the beginning but some subtitles had some incorrect characters from time to time (don't know if at that time was due server or client), but renaming the subtitles did the trick.

    Since then everything is running fine with all the clients that I've tested: Web, Roku 3, Roku Streaming Stick, aTV, Chromecast, iOS, Android, PlayStation, XboX, LG App, windows/mac clients, Amazon fire tv and Raspberry Pi 2.

    Luc solution will work as well and in order to be 100% sure you can implement the encoding in the script when you will do the renaming part :P

    New example script:

    #!/bin/sh
    find "/path/to/your/movies" -type f | \
     (while read file ; do
            if [[ "$file" == *.srt* ]]; then
                    if [[ "$file" != *.ro.srt* ]]; then
                            /usr/bin/iconv -f ISO-8859-16 -t UTF-8 "$file" > "`dirname "$file"`/`basename "$file" .srt`.ro.srt"
                    fi
            fi
    done);
    
    Make sure that your iconv is located at /usr/bin/iconv. You can search for it like this:
    root~# whereis iconv
    iconv: /usr/bin/iconv /usr/include/iconv.h
    
     

    Cheers,

    Alex

    PMS latest PlexPass version running on CentOS latest version :)

  • TeHashXTeHashX Posts: 36Members ✭✭
    shocker-live wrote on May 4 2015, 1:19 PM: »

    Here you go:

    #!/bin/sh
    find "/path/to/your/movie/folder" -type f | \
     (while read file ; do
            if [[ "$file" == *.srt* ]]; then
                    if [[ "$file" != *.ro.srt* ]]; then
                            mv "$file" "`dirname "$file"`/`basename "$file" .srt`.ro.srt"
                    fi
            fi
    done);

    Thanks but I need to rename video files too: avi, mp4, mkv.. because if I rename only subtitle file, will not work on other servers who need video and subtitle file to be the same.

  • iq2luciq2luc Posts: 19Members, Plex Pass Plex Pass

    Hi Alex,

    I would personally recommend converting all of them to UTF-8, although I'm not really a Unicode fan :-) there is nothing better yet.

    One would always get proper UTF-8 output if correct character set is selected for the ASCII input file.

    While on my side everything is automated (grab movie, grab subtitle, convert as needed, normalize file names & move to Plex library when certain parameters are met etc.), regarding the script for mister TheHashX, I was thinking giving him something a little bit more elaborate compared to your proposition :-P one which would be safe and generic enough to be used by others in a similar situation (dry-run mode by default, avoid risky actions which could touch movie files, backup options, select-able character set for input / output, auto-detect input encoding to avoid garbage output, regular expression based renaming rules, recursive / non-recursive option, etc.). If none of these are needed -- by all means I recommend to TheHashX using your little script (just add the proper ASCII - UTF-8 conversion, at least).

    I'm also a romanian but usually in my library (besides romanian subs) I always have English subs too, all UTF-8 encoded of course. :-)

    Thanks,

    Luc

  • shocker-liveshocker-live Posts: 83Members, Plex Pass Plex Pass
    edited May 2015
    TeHashX wrote on May 4 2015, 1:54 PM: »

    Thanks but I need to rename video files too: avi, mp4, mkv.. because if I rename only subtitle file, will not work on other servers who need video and subtitle file to be the same.

    With most of the players will work, just give it a try :)

    If not than replace srt with avi, mp4, mkv and replicate the procedure

    e.g.

    #!/bin/sh
    find "/path/to/your/movie/folder" -type f | \
     (while read file ; do
            if [[ "$file" == *.mkv* ]]; then
                    if [[ "$file" != *.ro.mkv* ]]; then
                            mv "$file" "`dirname "$file"`/`basename "$file" .mkv`.ro.mkv"
                    fi
            fi
    done);
    

    Before renaming everything give your player a chance to prove that is smart enough :).

    For me it's working with VLC on OSX.

    PMS latest PlexPass version running on CentOS latest version :)

  • iq2luciq2luc Posts: 19Members, Plex Pass Plex Pass
    edited May 2015
    TeHashX wrote on May 4 2015, 1:54 PM: »

    Thanks but I need to rename video files too: avi, mp4, mkv.. because if I rename only subtitle file, will not work on other servers who need video and subtitle file to be the same.

    This doesn't look like a "pretty" workaround for sure :-) what about modifying Alex's script a little bit, instead of the mv line, you could iconv the original sub file and then cp it changing the name accordingly (.ro.srt)?

    That would give you two subtitle files for each movie, but at least you won't touch the movie file at all (and the subtitle files are very small anyway).

    Thanks,

    Luc

  • shocker-liveshocker-live Posts: 83Members, Plex Pass Plex Pass
    edited May 2015
    iq2luc wrote on May 4 2015, 1:55 PM: »

    Hi Alex,

    I would personally recommend converting all of them to UTF-8, although I'm not really a Unicode fan :-) there is nothing better yet.

    One would always get proper UTF-8 output if correct character set is selected for the ASCII input file.

    While on my side everything is automated (grab movie, grab subtitle, convert as needed, normalize file names & move to Plex library when certain parameters are met etc.), regarding the script for mister TheHashX, I was thinking giving him something a little bit more elaborate compared to your proposition :-P one which would be safe and generic enough to be used by others in a similar situation (dry-run mode by default, avoid risky actions which could touch movie files, backup options, select-able character set for input / output, auto-detect input encoding to avoid garbage output, regular expression based renaming rules, recursive / non-recursive option, etc.). If none of these are needed -- by all means I recommend to TheHashX using your little script (just add the proper ASCII - UTF-8 conversion, at least).

    I'm also a romanian but usually in my library (besides romanian subs) I always have English subs too, all UTF-8 encoded of course. :-)

    Thanks,

    Luc

    Indeed I agree with you and my previous post was adjusted with iconv instead of mv :)

    Still for my solution as it's working for a year without any issue I will not touch that function from the global script.

    I have multiple languages as well for the movies but for the rest I'm using the opensubtitle API to fetch them and for the RO ones I'm using the subs dot ro API in order to automate everything.

    In my scenario running that script will adjust everything in ~ 2sec for a 180 TB storage server that is based on ZFS with one 512 ssd as arc and one for cache.

    [root@mandingo ~]# time /root/check_srt.sh
    real    0m2.936s
    user    0m1.533s
    sys     0m1.647s
    

    Cheers,

    Alex

    PMS latest PlexPass version running on CentOS latest version :)

  • iq2luciq2luc Posts: 19Members, Plex Pass Plex Pass

    By the way, you may take a look at this interesting project: https://github.com/ukdtom/SRT2UTF-8.bundle

    If the input encoding will be made select-able (auto-detection will mostly fail in your particular case TheHashX) then this project could simplify the lives of people (who are / should not be interested in technical details, but rather have the damn subtitle work the way they expect). :-)

    Thanks,

    Luc

«1
Sign In or Register to comment.