Lightweight and dynamic MPlayer wrapper with a Pythonic API
Project description
mplayer.py at a glance
>>> p = mplayer.Player()
>>> p.loadfile('/path/to/file.mkv')
>>> p.time_pos = 40
>>> print p.length
News
Version 0.7.2 Released! (March 28, 2019)
I will no longer update the PyPi releases. Just install it via pip like so:
$ pip install git+https://github.com/baudm/mplayer.py.git@0.7.2
- Don't pause upon initially loading file (Fixes #32)
Version 0.7.1 Released! (May 8, 2017)
You can download it here: http://pypi.python.org/pypi/mplayer.py/0.7.1
- Various MPlayer2 fixes
- Fix subprocess.mswindows error in python3.5+
- Add a gevent-friendly Player subclass.
Version 0.7.0 Released! (September 8, 2011)
You can download it here: http://pypi.python.org/pypi/mplayer.py/0.7.0
- Expose ALL commands except
get_*
and*_property
commands and those which have the same name as their corresponding property. - Better
QPlayerView
andGtkPlayerView
widgets; thePlayer
objects are now directly accessible via theplayer
property. - Getting output from MPlayer is now thread-safe (a
Queue
is now used) - Data can now be obtained asynchronously from
Player
objects (via subscribers/callbacks) - Improved generation of properties (using
functools.partial
objects) - Added type checking to generated methods and properties
- Added value checking to generated properties
- Abstracted MPlayer type handling away from the core (see
mtypes
module) - Python 2.x unicode and str fixes
Don't forget to read the CHANGES file.
Switched to git (September 7, 2011)
The code of mplayer.py (formerly PyMPlayer/python-mplayer) is now hosted at GitHub.
NOTE: Issues and wiki are still hosted here at Google Code.
Since python-mplayer is a very verbose and long name, let's just call it mplayer.py :)
Version 0.6.0 Released! (March 3, 2011)
You can download it here: http://pypi.python.org/pypi/PyMPlayer/
- Support for MPlayer property access (
get_property
,set_property
,step_property
) with automatic type conversion via standard Python properties (new-style classes) - Drop methods which have the same functionality as their corresponding properties (for cleaner API)
- No more exposed
command()
andquery()
methods; use the higher-level methods and properties instead - Improved code generation; generated methods execute faster than in 0.5.0
- Introspection now happens on module load, not on instantiation
- MPlayer is now spawned automatically (See
autospawn
parameter) - Setting of command prefix globally (i.e. per class) and per method execution is supported
- Full support for Windows (for
get_
commands)
Don't forget to read the CHANGES file.
What is mplayer.py?
Initially known as PyMPlayer (http://pypi.python.org/pypi/PyMPlayer/ renamed to avoid confusion with other projects), mplayer.py provides several Pythonic interfaces to MPlayer. These are implemented as the following classes (see Introspection for more info):
- Player provides a clean, Pythonic interface to MPlayer.
- AsyncPlayer is a Player subclass with asyncore integration (POSIX only).
- GPlayer is a Player subclass with GTK/GObject integration.
- QtPlayer is a Player subclass with Qt integration (same usage as AsyncPlayer)
- GtkPlayerView provides a basic (as of now) PyGTK widget that embeds MPlayer.
- QPlayerView provides a PyQt4 widget similar to GtkPlayerView in functionality.
Show your appreciation by saying thanks or by donating a small amount.
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
Built Distribution
File details
Details for the file mplayer.py-0.7.2.tar.gz
.
File metadata
- Download URL: mplayer.py-0.7.2.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 902c7a74da2824c790d66267a9fa3c6bb62abd6aea8096c1035e17b1efacc8a6 |
|
MD5 | 765d636366086f67839cb4a0a5a5ec4d |
|
BLAKE2b-256 | 9933514e6ff73473300612bfb27b0ee97e47f030fc72bfe7ead0bc669b68437a |
Provenance
File details
Details for the file mplayer.py-0.7.2-py3-none-any.whl
.
File metadata
- Download URL: mplayer.py-0.7.2-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ba4f64bcc10df1a544188401b7d7e643e764bf29c90b367b62b62ea71d4691f |
|
MD5 | 020769656c95acf3a826abc28e9371b7 |
|
BLAKE2b-256 | 944d7a35f1b9e7cf1a8f384958d3edd8adeecd3a146a92e12a5dc42d1a895874 |