Use MPV in your C# apps
MPVSharp - main package, requires
libmpv to be installed on the user system or provided together with your application (works on Windows and Linux).
How to use
There are 2 namespaces:
Nickvision.MPVSharp.Internalprovides objects and methods that closely follow libmpv C API. You can find functions from
MPVClient.csand functions from
Nickvision.MPVSharpgives you another objects that work on top of
Internalcounterpart, but provides you with various helpers and convenience functions. They are easier to use, but the API is slightly different than in
Internal, so you will probably want to read docs for
Client classto find what methods you can use.
Look at the examples to get the basic idea how to use MPVSharp.
There are comments in the code, but they are mostly an adaptation of some parts of comments from libmpv, which is very well documented:
GirCore example playing Charge - Blender open movie, licensed under CC BY 4.0
- Simple - basic program playing your file/link. If the file is video, a window will be created by MPV itself.
- GirCore - GTK4 application playing a video from youtube. Made with GirCore. Requires GTK4 to be installed.
- OpenGL - OpenTK application playing a video from youtube.
- .NET 7
Code of Conduct
This project follows the GNOME Code of Conduct.