Skip to content

Simple wrapper for smplayer that adds clickable subtitle functionality for online word searching, similar to that of PotPlayer.

Notifications You must be signed in to change notification settings

kpliuta/smplayer-sub-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SMPlayer Subtitle Searcher

License: MIT

A simple Python wrapper for SMPlayer that adds clickable subtitle functionality for online dictionary searching, similar to the feature in PotPlayer.

This application embeds an SMPlayer instance into a custom Qt window. Below the video, it displays the current subtitles in a text box. You can select any word or phrase from the subtitles to instantly look it up in an online dictionary using your web browser.

Showcase

289844264-8e07b440-2d49-453b-a133-0e54d201c791 289844294-7a5f9111-43aa-45e9-992b-5cfa90852359

Requirements

This project is designed for Linux and has several dependencies.

System Dependencies

You must have the following command-line tools installed and available in your system's PATH.

Python Dependencies

The project uses Python ~3.13 and the dependencies are managed by Poetry.

Installation

  1. Clone the repository:

    git clone https://github.com/kpliuta/smplayer-sub-search.git
    cd smplayer-sub-search
  2. Install project dependencies using Poetry:

    poetry install

    This will create a virtual environment and install PySide6.

Usage

Run the application from the project's root directory using Poetry:

poetry run smplayer-sub-search

This will launch the application window with SMPlayer embedded. You can then open a video file using the SMPlayer controls (File -> Open or Ctrl+O). When subtitles are displayed, they will appear in the text box at the bottom.

Configuration

To change the default web browser or the dictionary URL, you need to edit the global variables at the top of the smplayer_sub_search.py script.

  • Browser: Change the BROWSER_BIN variable to your browser's executable.

    BROWSER_BIN = 'google-chrome-stable'
  • Dictionary URL: Change the DICT_URL variable. The {query} placeholder will be replaced with the text you select.

    DICT_URL = 'https://context.reverso.net/translation/spanish-english/{query}'

License

This project is licensed under the MIT License.

About

Simple wrapper for smplayer that adds clickable subtitle functionality for online word searching, similar to that of PotPlayer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages