• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Subtitles Problem

     
    • 0 Vote(s) - 0 Average

    Subtitles Problem

    Subtitles Problem
    adymaster
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2023 Jun
    Reputation: 0
    Country:Romania
    #1
    2023-06-30, 04:26 PM
    I have a problem with the subtitles. In stead of diacritics appear (?), Romania Country.  

    Haw I can Solve that?

    Thanks


    Attached Files Thumbnail(s)
       
    skribe
    Offline

    Community Moderator

    Posts: 147
    Threads: 0
    Joined: 2023 Jun
    Reputation: 5
    #2
    2023-06-30, 09:23 PM (This post was last modified: 2023-07-01, 02:31 AM by skribe. Edited 1 time in total.)
    (2023-06-30, 04:26 PM)adymaster Wrote: I have a problem with the subtitles. In stead of diacritics appear (?), Romania Country.  

    Haw I can Solve that?

    Thanks

    This is often indicative of fonts that are missing the requisite characters. If it's transcoding, this might be solved by ensuring that the required fonts are available on the server machine, and if it's direct play, they may need to be installed on the client device.
    adymaster
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2023 Jun
    Reputation: 0
    Country:Romania
    #3
    2023-07-01, 11:31 AM
    skribe dateline='[url=tel:1688160185' Wrote: 1688160185[/url]']
    adymaster dateline='[url=tel:1688142374' Wrote: 1688142374[/url]']
    I have a problem with the subtitles. In stead of diacritics appear (?), Romania Country.  

    Haw I can Solve that?

    Thanks

    This is often indicative of fonts that are missing the requisite characters. If it's transcoding, this might be solved by ensuring that the required fonts are available on the server machine, and if it's direct play, they may need to be installed on the client device.


    Thanks,
    I run server on my Laptop, Intel® Core™ i5-2430M, 2.40GHz, 8GB, 500GB, nVidia GeForce GT 540M 2GB
    Is not so performant, I watch on a LG C2.
    Can you tell me please what is the best solution step by step.
    I can t find haw to solve withe subtitle.
    Thanks
    skribe
    Offline

    Community Moderator

    Posts: 147
    Threads: 0
    Joined: 2023 Jun
    Reputation: 5
    #4
    2023-07-02, 09:06 PM (This post was last modified: 2023-07-02, 09:07 PM by skribe. Edited 1 time in total.)
    I'm afraid that I have very little personal experience with subtitles. I would imagine that there isn't a way to add fonts to a TV app client. You may need, instead, to install them on the server device and force subtitle burn-in. The burn-in setting is a user setting in the client I believe, and the relevant server setting is the "fallback fonts" section under the playback section of your dashboard.

    Just make sure to install a font that has complete support for all of the special characters utilized by whatever language you're trying to play.
    Yababakets
    Offline

    Junior Member

    Posts: 17
    Threads: 1
    Joined: 2023 Dec
    Reputation: 2
    #5
    2024-08-17, 08:11 AM (This post was last modified: 2024-08-17, 08:23 AM by Yababakets. Edited 3 times in total.)
    (2023-06-30, 04:26 PM)adymaster Wrote: I have a problem with the subtitles. In stead of diacritics appear (?), Romania Country.  

    Haw I can Solve that?

    Thanks

    Hi, based on the previous posts, the issue you're encountering with the question mark (?) replacing diacritics (Ăă, Ââ, Îî, Șș, Țț) isn't related to fonts, clients, or similar factors. The problem arises because the subtitle's character encoding is set to Central European ISO-8859-2 (which covers Albanian , Bosnian , Croatian , Czech , Finnish , German , Hungarian , Polish , Romanian , Rotokas , Serbian , Slovak , Slovene ,Upper Sorbian , Lower Sorbian , Turkmen ) , whereas Jellyfin prefers Unicode UTF-8.


    To resolve this, you can try the following methods:

    1. Use Gaupol (a subtitle editor):
      • Install Gaupol on your system. You can download the Windows version from here.
      • Open the subtitle file using the Central European (ISO-8859-2) character encoding.
      • Save the file with the Unicode ( UTF-8 ) character encoding.
    2. Use an online converter:
      • Visit an online encoding converter like FreeFormatter.
      • Upload your subtitle file and convert it from ISO-8859-2 to UTF-8.
      • Download the converted file. Note that this method might not successfully convert all characters.

    If you have a large number of subtitles, converting them individually could take a significant amount of time. Instead, you can create a Python script to automate the process. Here's how:
    •  Open a text file and add the following code:
    Code:
    import os
    import codecs

    # Function to check if a file is UTF-8 encoded
    def is_utf8(file_path):
        try:
            with open(file_path, 'r', encoding='UTF-8') as f:
                f.read()
            return True
        except UnicodeDecodeError:
            return False

    # Function to convert ISO-8859-2 to UTF-8
    def convert_encoding(file_path):
        with codecs.open(file_path, 'r', encoding='ISO-8859-2') as f:
            content = f.read()
        with codecs.open(file_path, 'w', encoding='UTF-8') as f:
            f.write(content)

    # Function to process directory
    def process_directory(directory):
        for root, dirs, files in os.walk(directory):
            for file in files:
                if file.endswith(('.sub', '.srt')):
                    file_path = os.path.join(root, file)
                    if not is_utf8(file_path):
                        convert_encoding(file_path)
                        print(f"Converted: {file_path}")
                    else:
                        print(f"Skipping: {file_path} (already UTF-8)")

    # Main function
    def main():
        directory = r"C:\your\path"  # Replace with the path to your folder containing the subtitles
        process_directory(directory)

    if __name__ == "__main__":
        main()
     
    • Save the file as iso2utf.py
    • Replace "C:\your\path" with your path
    • Ensure you have the latest version of Python installed to run the script.

    You can run the script in Command Prompt (Windows) or Terminal (macOS/Linux). Alternatively, you can open it in Visual Studio Code and run it from there.

    This script will automate the process of checking and converting subtitle files (formats .sub and .srt) from ISO-8859-2 to UTF-8 encoding.
    1
    Nemessis
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2024 Dec
    Reputation: 0
    #6
    2024-12-27, 05:34 PM
    Tested and works, thank you @Yababakets!

    In case you have Linux, just edit the path to your media files, example:
    directory = r"/mnt/linux_share/jellyMedia"
    biolan
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Jan
    Reputation: 0
    #7
    2025-01-02, 04:25 AM
    (2023-07-02, 09:06 PM)skribe Wrote: I'm afraid that I have very little personal experience with subtitles. I would imagine that there isn't a way to add fonts to a TV app client. You may need, instead, to install them on the server device and force subtitle burn-in. The burn-in setting is a user setting in the client I believe, and the relevant server setting is the "fallback fonts" section under the playback section of your dashboard.

    Just make sure to install a font that has complete support for all of the special characters utilized by whatever language you're trying to play.

    Hi,

    I've used the python script made by Yababakets with success and thank you for the explanation.

    Here i modified the code to be able to specify the directory as an argument.

    Code:
    import os
    import codecs
    import argparse


    def is_utf8(file_path):
        try:
            with open(file_path, 'r', encoding='UTF-8') as f:
                f.read()
            return True
        except UnicodeDecodeError:
            return False


    def convert_encoding(file_path):
        with codecs.open(file_path, 'r', 'ISO-8859-2') as f:
            content = f.read()
        with codecs.open(file_path, 'w', 'UTF-8') as f:
            f.write(content)


    def process_directory(directory):
        for root, _, files in os.walk(directory):
            for file in files:
                if file.endswith(('.sub', '.srt')):
                    file_path = os.path.join(root, file)
                    if not is_utf8(file_path):
                        convert_encoding(file_path)
                        print(f"Converted: {file_path}")
                    else:
                        print(f"Skipping: {file_path} (already UTF-8)")


    if __name__ == "__main__":
        parser = argparse.ArgumentParser(description="Convert subtitle files (.sub, .srt) to UTF-8.")
        parser.add_argument("directory", type=str, help="Path to the directory containing subtitle files.")
        args = parser.parse_args()

        if os.path.isdir(args.directory):
            process_directory(args.directory)
        else:
            print(f"Error: {args.directory} is not a valid directory.")

    Usage 
    Code:
    python iso2utf.py /media/movies/final
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode