mpv-rs
safe libmpv bindings for Rust.
mpv is a media player based on MPlayer and mplayer2. It supports a wide variety of video file formats, audio and video codecs, and subtitle types.
The crate is a safe libmpv API binding in Rust. For more info about mpv, see here.
Installing
the mpv package is needed for this to run.
Linux
On linux, you can ask your package manager to install it for you.
Arch
$ sudo pacman -S mpv
Debian-based systems
$ sudo apt-get install libmpv1
Windows
libmpv can be found here for windows. You need to copy the library into your rust binaries folder for it to be linked properly.
Contributing
Any contribution is welcome, as well as any code review !
What is left to implement
Events :
- ClientMessage
Formats :
- Node
- NodeList
- NodeMap
- ByteArray
MpvHandler impls :
- get_time_us
- resume / suspend core (not pause/unpause !)
- load_config_file
- detach_destroy (if only I knew what this was for ?)
- client_name
- set_wakeup_callback
- get_wakeup_pipe
- request_log_messages
- request_event
MpvHandlerWithGl impls :
- raw_opengl_ctx() : return the raw opengl context
- report_flip
- set_update_callback (partly implemented via update_available)
Submitting an issue
An question concerning the mpv-rs API is welcome in the issues.
If your mpv crashes, please make sure it's coming from this API and not from the mpv player itself.
License
mpv is globally licensed under GPLv2+ (see here), but this crate is licensed under the zlib license.
Relicensing is possible if it can be properly justified for whatever reason.