#media #mpv #playback #audio-video #audio-playback

libmpv

Libmpv abstraction that's easy to use and can play next to all codecs and containers

5 stable releases

2.0.1 Sep 29, 2020
2.0.0 Jul 26, 2020
1.1.0 Jul 15, 2020
1.0.1 Jun 26, 2020

#151 in Video

Download history 94/week @ 2024-07-19 105/week @ 2024-07-26 98/week @ 2024-08-02 97/week @ 2024-08-09 105/week @ 2024-08-16 77/week @ 2024-08-23 101/week @ 2024-08-30 91/week @ 2024-09-06 86/week @ 2024-09-13 101/week @ 2024-09-20 89/week @ 2024-09-27 86/week @ 2024-10-04 49/week @ 2024-10-11 44/week @ 2024-10-18 56/week @ 2024-10-25 42/week @ 2024-11-01

193 downloads per month
Used in 4 crates (3 directly)

LGPL-2.1

1MB
5K SLoC

libmpv-rs

A libmpv abstraction written in rust that's easy to use and provides the ability to read next to all video and audio codecs.

Dependencies

Rust version >= 1.30. Libmpv version 1.101 (mpv version 0.29.1) is the minimum required version.

For ease of building, you can use the build_libmpv feature that is used to link against. Especially useful to cross compile to windows. The MPV_SOURCE environment variable needs to be set to a directory containing the mpv source you want to build against. For windows targets this is expected to be already built, with a directory named MPV_SOURCE/64 or /32 containing build artifacts for 64-bit and 32-bit targets respectively. On unix this is expected to be a copy of the mpv-build repo.

Examples

To run an example, execute cargo run [--release] --example x -- test-data/speech_12kbps_mb.wav, where x is any of:

  • events: event enumeration
  • protocol: implementation of custom filereader:// protocol that… reads files

Contributing

All pull requests/issues welcome.

Dependencies