cvplayer
cvplayer is a video player written in python that provides easy video playback using ffpyplayer and OpenCV
Installation
pip install cvplayer
there are two ways to use cvplayer, either through
-
starting interactive (direct) playback of a video from the command-line:
cvplay filaname
simply starts the video in a different window where it's playback can be controlledby using keymaps
the default keymaps for controlling the video playback are - -
scripts (getting a VideoPlayer instance and doing whatever you want to)
scripted access
cvplayer provides the VideoPlayer class which is the main wrapper around ffpyplayer's MediaPlayer.
Initializing a VideoPlayer instance will start playing the video according to the options specified. The Playback can be controlled from within the script as well as using keymaps.
the VideoPlayer class initiates playback and provide methods to control/access the state of the player.
Here's and example to play a video
from cvplayer import VideoPlayer
player = VideoPlayer(filename)
while player.state != 'eof':
print(player.get_pts())
time.sleep(1)
parameters for a VideoPlayer instance:
| parameter | type | Description |
|---|---|---|
| filename | str | The filename of the media |
| paused | bool | If True, the player will be in a paused state after creation, otherwise it will immediately start playing. Defaults to False |
| fullscreen | bool | If True, the video playback will be in fullscreen mode immediately after it's creation. Defaults to True |
| key_controls | bool | If True, the video playback can be controlled using specified keymaps. Defaults to True |
| skip_interval | int | Specify the numebr of seconds to move ahead or beind when navigating the video using the keymaps |
| volume | float | The default volume. A value between 0.0 - 1.0. Defaults to 1.0 |
| mute | bool | If True, the player will be muted by default after creation. Defaults to False |
| t | int | Play only t seconds of the audio/video. Defaults to the full audio/video. Defaults to the full audio/video |
| ss | int | Seek to pos ss into the file when starting. Defaults to the beginning of the file |
| blocking | bool | If True, the playback will block the current thread (the one it's being run from) until the playback ends. Defaults to False |
| playback | bool | If False, only the player will be initialized and no video/audio will be played, only audio can be played by unmuting the player. Useful for just reading the frames form a video to display them using something else |
Metadata
Release files for cvplayer 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cvplayer-1.2.0.tar.gz | 6.3 kB | Without provenance | Details for cvplayer-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cvplayer-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for cvplayer-1.2.0-py3-none-any.whl |
Total release size: 13.2 kB
Release files / cvplayer-1.2.0.tar.gz
| Download URL | cvplayer-1.2.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5e5a45b2d6db7b67d48cc0ceafa32c16139c6d047148ba7cba4eaa34edd3b05
|
|
BLAKE2b-256 checksum How to use checksums |
047cab310a14b4c1295e25c095173f32d7c85c10dc0e8f622e7945b1e4f03468
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
|
Release files / cvplayer-1.2.0-py3-none-any.whl
| Download URL | cvplayer-1.2.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a93d6d2ebe5f35ec9e8dbb7b53ba75ba1f6af4477733f83a1209d55ae20f9cbe
|
|
BLAKE2b-256 checksum How to use checksums |
103773f1fe7c0a5d84d2af178b6914609c401a2675b9cbf40282399d6a71a297
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5
|
Security for cvplayer 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.