Welcome to the Subtitle Renamer & Mover tool! This handy tool is designed to help you organize your media files, especially when you're adding content to Plex Media Server. Plex requires subtitles to be in a specific format: the subtitle files must be in the same folder as the video files, and they need to be named exactly like the corresponding episode file, with the addition of a language code (e.g., .en.srt
for English subtitles).
If you have a collection of media files where the subtitles are located in a separate subfolder and are not named correctly, this tool will make your life much easier by automatically renaming and moving the subtitle files to the correct location. If the script encounters a subtitle file with an unrecognized language code, it will automatically default to English (.en.srt
).
- Renames Subtitles: It renames subtitle files so they match the corresponding episode file name, followed by the correct language code. If the language code is unrecognized, it defaults to English (
.en.srt
). - Moves Subtitles: It moves the renamed subtitle files from their subfolder to the main folder where the video files are located.
- Supports Multiple Languages: It automatically detects and renames subtitles in many different languages.
- Python: You’ll need to have Python installed on your computer to run this tool. You can download it from the official Python website.
-
Download the Script: Save the script file as
subtitle_renamer.py
on your computer. -
Prepare Your Files:
- Make sure your media files are organized by seasons in separate folders (e.g.,
Season 1
,Season 2
, etc.). - Inside each season folder, you should have a
Subs
folder where the subtitle files are stored, with separate folders for each episode's subtitles.
- Make sure your media files are organized by seasons in separate folders (e.g.,
-
Install Python:
- If you don’t already have Python installed, download and install it from here.
- Ensure Python is added to your system’s PATH during installation.
-
Run the Script:
- Open a terminal (Command Prompt on Windows, Terminal on Mac, or Linux).
- Navigate to the directory where you saved the script using the
cd
command. For example:cd path\to\your\script
- Run the script by typing:
python subtitle_renamer.py
- A small window will open with a "Select Folder" button.
-
Select Your Media Folder:
- Click the "Select Folder" button.
- Navigate to the main folder where your media files are stored (the one containing all the season folders).
- Click "OK" to start the process.
-
Let the Tool Work:
- The tool will automatically rename and move the subtitle files for you.
- Once it’s done, you’ll see a confirmation message.
-
Check Your Files:
- Verify that the subtitles have been moved and renamed correctly in each season folder.
- Your media files are now ready to be added to Plex with correctly formatted subtitles!
Let’s say you have the following structure:
Show Name
│
├── Season 1
│ ├── Show.S01E01.mp4
│ ├── Show.S01E02.mp4
│ └── Subs
│ ├── Show.S01E01
│ │ └── 2_eng.srt
│ └── Show.S01E02
│ └── 2_fra.srt
After running the script, it will be reorganized to:
Show Name
│
├── Season 1
│ ├── Show.S01E01.mp4
│ ├── Show.S01E01.en.srt
│ ├── Show.S01E02.mp4
│ ├── Show.S01E02.fr.srt
│ └── Subs (optional: this can be deleted after processing)
Note: If a subtitle file does not follow the expected naming convention (e.g., missing or incorrect language code), the script will rename it to default to English (
.en.srt
).
This tool supports a wide range of languages. Here are some examples of the supported language codes:
- English:
.en.srt
- French:
.fr.srt
- Spanish:
.es.srt
- German:
.de.srt
- Chinese:
.zh.srt
- Japanese:
.ja.srt
- Korean:
.ko.srt
- Russian:
.ru.srt
- Arabic:
.ar.srt
- Portuguese:
.pt.srt
And many more! The script automatically detects the language based on the file name and renames it accordingly. If the language code is not recognized, it defaults to English.
- Python Not Found: If you get an error that Python isn’t recognized, make sure it’s properly installed and added to your PATH.
- Incorrect File Names: If your subtitle files don’t follow the expected naming convention or lack a language code, the script will default to renaming these subtitles as English (
.en.srt
). If this is not desired, consider renaming the files manually before running the script. - Folders Not Selected: If nothing happens after you select the folder, make sure you selected the correct main folder that contains all the season folders.
If you’re comfortable with coding and want to contribute to this project, feel free to make improvements or add new features! You can edit the Python script directly and add additional language support or new functionalities.
This tool is provided as-is without any warranties. Use it at your own risk. (MIT License)
Thank you for using the Subtitle Renamer & Mover tool! We hope it makes managing your media library with Plex a little easier. Enjoy your well-organized subtitles! 😊