Python library for adding srt subtitles into QMediaPlayer
Project description
pyqt-subtitles 1.2
Python library for adding srt subtitles into QMediaPlayer
Installing
pip install git+https://github.com/nchistov/pyqt-subtitles.git@1.2
Simple example
import sys
from PyQt6 import QtWidgets, QtMultimedia, QtMultimediaWidgets, QtCore
from subtitles import PyQtSubtitles
app = QtWidgets.QApplication(sys.argv)
# Creating simple video player
media_player = QtMultimedia.QMediaPlayer()
video = QtMultimediaWidgets.QVideoWidget()
media_player.setVideoOutput(video)
media_player.setSource(QtCore.QUrl('path/to/your/video_file'))
media_player.play()
# Using pyqt-subtitles library
subs = PyQtSubtitles(media_player, ['path/to/your/file.srt'])
subs.set_current_track(0)
video.show()
sys.exit(app.exec())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyqt_subtitles-1.2.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyqt_subtitles-1.2.tar.gz.
File metadata
- Download URL: pyqt_subtitles-1.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25a6ac7cc0bdc2000fceac6de6c607f9e456eae1f089b8deb836bc21bc0efd88
|
|
| MD5 |
f996604ecbf325d0d6733faa899f0ac2
|
|
| BLAKE2b-256 |
6929c58b590ec2d51b7787c455893fd726318cacccaf5e2e214a092882c121eb
|
File details
Details for the file pyqt_subtitles-1.2-py2.py3-none-any.whl.
File metadata
- Download URL: pyqt_subtitles-1.2-py2.py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
964a6b5c90d72d69ae109bc5fbae99a0897499cf0534586381432a8aba0d09c9
|
|
| MD5 |
4a8623334feeb299b5152f616ba02f83
|
|
| BLAKE2b-256 |
b10e6dab76b5db12cdfd00280b5cfdd73c06905db3b4014da89765f246689ba9
|