about summary refs log tree commit diff stats
path: root/crates/libmpv2/README.md
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-23 12:57:19 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-23 12:58:02 +0200
commit0ae5018c33cc4bfe27583c9902472b499f4bd269 (patch)
treeafc2fbfcb126215f47afbc32e555d203d4d6d88c /crates/libmpv2/README.md
parentchore(yt_dlp/progress_hook): Also consider the `total_bytes_estimate` field (diff)
downloadyt-0ae5018c33cc4bfe27583c9902472b499f4bd269.tar.gz
yt-0ae5018c33cc4bfe27583c9902472b499f4bd269.zip
refactor(libmpv2): Move to the `crates` directory
Diffstat (limited to 'crates/libmpv2/README.md')
-rw-r--r--crates/libmpv2/README.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/crates/libmpv2/README.md b/crates/libmpv2/README.md
new file mode 100644
index 0000000..6929354
--- /dev/null
+++ b/crates/libmpv2/README.md
@@ -0,0 +1,47 @@
+<!--
+yt - A fully featured command line YouTube client
+
+Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+SPDX-License-Identifier: GPL-3.0-or-later
+
+This file is part of Yt.
+
+You should have received a copy of the License along with this program.
+If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+-->
+
+Credits go to @anlumo for the rendering implementation and @sirno for updating
+the API to support libmpv version 2.0.
+
+# libmpv2-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 2.0 (mpv version 0.35.0) 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](https://mpv.srsfckn.biz/) 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/jellyfish.mp4`, where x is any
+of:
+
+- `events`: event enumeration
+- `protocol`: implementation of custom `filereader://` protocol that… reads
+  files
+- `opengl`: openGL rendering onto SDL2 window
+
+# Contributing
+
+All pull requests/issues welcome.