Skip to content
Ali Bakhshi edited this page Mar 3, 2025 · 1 revision

Welcome to the PeSuT wiki!

PeSuT: Persian Subtitle Translator for VLC

Overview

PeSuT is a VLC media player extension that automatically translates English subtitles into Persian (Farsi). This extension simplifies the process of enjoying multimedia content with translated subtitles by utilizing Google Translate.

Features

  • Automatic translation of English subtitles to Persian (Farsi).
  • Seamless integration with VLC Media Player.
  • Supports common subtitle formats (.srt).
  • Works in the background to avoid performance issues.

Installation Guide

Step 1: Download PeSuT.lua

Ensure you have the latest version of PeSuT.lua.

Step 2: Locate VLC Extensions Directory

Depending on your operating system, locate the VLC extensions directory:

  • Windows (All Users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
  • Windows (Current User): %APPDATA%\VLC\lua\extensions\
  • Linux (All Users): /usr/share/vlc/lua/extensions/
  • Linux (Current User): ~/.local/share/vlc/lua/extensions/
  • macOS (All Users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/

Note: Create the extensions directory if it does not exist.

Step 3: Install the Extension

  1. Copy the PeSuT.lua file into the appropriate VLC extensions folder.
  2. Restart VLC Media Player.

Usage Instructions

Step 1: Ensure Subtitles Match the Movie Name

Ensure that the English subtitle file (.srt) shares the same filename as the movie file.

Step 2: Activate PeSuT

  1. Open VLC Media Player.
  2. Navigate to View > مترجم زیرنویس فارسی (Persian Subtitle Translator).
  3. Select the PeSuT extension.

Step 3: Run the Translation

  1. Play the movie with its corresponding subtitle.
  2. Enable the extension to start translation.
  3. Close VLC to allow the translation process to complete in the background.

Tip: Monitor the subtitle file with the -fa.srt extension. Once its size stops increasing, the translation is complete.

Step 4: Watch with Translated Subtitles

  1. Reopen VLC Media Player.
  2. Select the translated subtitle (e.g., movie-fa.srt).

Troubleshooting

  1. Extension Not Showing

    • Ensure the PeSuT.lua file is in the correct VLC extensions directory.
    • Restart VLC Media Player.
  2. Subtitle Not Translating

    • Verify that the English subtitle file exists and has the same name as the movie.
    • Check if the translated -fa.srt file is being generated.
  3. Incomplete Translations

    • Google Translate limits input length to 5000 characters; ensure your subtitle is within this range.

Customization

  1. Change Source and Target Languages Modify these variables in PeSuT.lua:

    SOURCE_LANG = "en"  -- Source language
    TARGET_LANG = "fa"  -- Target language
  2. Adjust On-Screen Display (OSD) Customize OSD message duration and position:

    osd_duration = 15   -- Message display duration (in seconds)
    osd_position = "top-left" -- Message position

Contribution

We welcome contributions to improve PeSuT. To contribute:

  1. Fork the repository on GitHub.
  2. Create a feature branch.
  3. Submit a pull request.

License

PeSuT is released under the MIT License.

Acknowledgments

Special thanks to VLC and Google Translate for providing essential resources.


Author: Ali Bakhshi
Version: 1.0