Subtitle merging tool
Project description
Submerger
Watching movies in a foreign language with dual subtitles is a good way to learn that language. However, most of the subtitles are in a single language. This project aims to overcome that barrier by providing the functionality to create dual subtitles by merging two separate subtitle files.
System requirements
Python >= 3.10
Install
pip install submerger
Install for development
You have to include $HOME/.local/bin
to your $PATH
. Simply add export PATH="$HOME/.local/bin:$PATH"
to .bashrc
.
pip install --prefix=$(python -m site --user-base) --editable .
NOTE: --prefix=$(python3 -m site --user-base)
is a workaround for a known setuptools
issue
Usage
Merge two .srt files
submerge --subtitles subtitle1.srt subtitle2.srt --output dualsub.srt
Create a dual subtitles by extracting embedded subtitles from a video file
submerge --video video.mkv --language eng ger --output dualsub.srt
Merge subtitles for all videos in a directory
submerge --global --language eng ger --directory path/to/series
Check for available subtitles
ffprobe -loglevel error -print_format json video.mkv -print_format json -show_entries "stream=index:stream_tags=language" -select_streams s
Testing
Run unit tests
python scripts/run_tests.py --unit
Run integration tests
python scripts/run_tests.py --integration
Run lint tests
python scripts/run_tests.py --lint
Or run periodically with watch
watch python scripts/run_tests.py --all
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
submerger-1.0.4.tar.gz
(21.4 kB
view hashes)
Built Distributions
submerger-1.0.4-py3.11.egg
(25.5 kB
view hashes)
submerger-1.0.4-py3-none-any.whl
(23.2 kB
view hashes)
Close
Hashes for submerger-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e07dd33032fb62fad62cd8d5e57a0df5b18fcbcc481f1fa7196b94f8cf992f4f |
|
MD5 | 5eab4b9b56a33e3bba7aa8a0052fa7ae |
|
BLAKE2b-256 | 2d2d8acabccff854cf2a3f0a0b7924ea2fac38fef354e5bd1818217248789456 |