Giter Site home page Giter Site logo

mpvnet-player / mpv.net Goto Github PK

View Code? Open in Web Editor NEW
3.0K 45.0 151.0 37.11 MB

๐ŸŽž mpv.net is a media player for Windows with a modern GUI.

License: GNU General Public License v2.0

C# 98.94% PowerShell 0.85% Inno Setup 0.21%
video-player audio-player libmpv media-player mpv ffmpeg winforms wpf dotnet mediainfo javascript lua command-line terminal video gui windows music-player yt-dlp

mpv.net's Introduction

GitHub closed pull requests GitHub closed issues GitHub All Releases GitHub tag (latest by date) GitHub stars

๐ŸŽž mpv.net

mpv.net is a media player for Windows with a modern GUI.

The player is based on the popular mpv media player. mpv.net is designed to be mpv compatible, almost all mpv features are available, this means the official mpv manual applies to mpv.net, differences are documented in the mpv.net manual.

Graphical User Interface

Modern GUI with customizable color themes.

Command Line Interface

mpv.net supports mpvs command line interface.

High quality video output

Video output that is capable of many features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more.

On Screen Controller

Play controls with a modern flat design.

GPU video decoding

Leverages the FFmpeg hwaccel APIs to support DXVA2 video decoding acceleration.

Based on libmpv

mpv.net is based on libmpv which offers a straightforward C API that was designed from the ground up to make mpv usable as a library and facilitate easy integration into other applications. mpv is like VLC not based on DirectShow or Media Foundation.

Table of contents

Features that mpv and mpv.net have in common

  • Lua and JavaScript Scripting (awesome-mpv lists a large collection of available user scripts)
  • Simple config files that are easy to read and edit
  • JSON IPC to control the player with a external programs
  • On Screen Controller (OSC, play control buttons) with modern flat design
  • Command Line Interface
  • Started from a terminal, status, error and debug output is printed on the terminal
  • DXVA2 video decoding acceleration
  • Video output capable of features loved by videophiles, such as video scaling with popular high quality algorithms, color management, frame timing, interpolation, HDR, and more
  • Browser extensions to start mpv.net from the browser
  • Fast seek performance
  • Fast startup performance
  • Usable as video player, audio player and image viewer with a wide range of supported formats
  • Built-in decoders, no external codecs have to be installed
  • Build-in media streaming (requires yt-dlp being installed)
  • External audio and subtitle files can be loaded manually or automatically
  • Screenshot feature
  • Internationalization using gettext and transifex

Features exclusive to mpv.net

  • Very high degree of mpv compatibility, almost all mpv features are available
  • Modern graphical user interface with customizable color themes
  • Customizable context menu
  • Searchable config editor
  • Searchable input (shorcut keys) editor
  • Global keyboard shortcuts
  • Extension API for .NET languages (C#, VB.NET and F#)
  • Files can be enqueued from File Explorer

Support section of the manual.

Download section of the manual.

The mpv.net documentation.

Screenshots

Main Window

Main Window

Context Menu

Context Menu

Config Editor

Searchable config editor as alternative to edit the conf file manually.

Terminal

mpv.net's People

Contributors

andywowws avatar arnesacnussem avatar dyphire avatar fantasquex avatar floppyd avatar hooke007 avatar karankad avatar naomi010sentzke avatar nkh0472 avatar sakhezech avatar soredake avatar stax76 avatar torben2000 avatar transifex-integration[bot] avatar witchilich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpv.net's Issues

Feature Request: Allow only one instance

First of all thank you for a wonderful application. The only thing I feel I'm missing at the moment is an easy way reuse the already open instance. So that when you open a new file from Explorer it opens in the already started instance, either by replacing the currently open/playing file or by queuing it up.

How to compile?

I am unable to use the setup scripts to build the program, and building it in visual studio 2019 gives me a missing dll error.

Chocolatey for mpv.net

Hi, stax

This is not really an issue with the player itself, but more of a request. If it is not too much trouble, would you be able to also make an mpv.net chocolatey package as another alternate mean to install your player? Could be really useful for those who prefer to use something akin to package managers (from linux distros) on Windows. I edited the OG mpv chocolatey package with the info from the mpv.net project and attached it below. Feel free to check it out, edit the files.

mpv.net.4.7.1.zip

Use exclusive mpv.conf in %appdata% to not mess with mpv's config file

Every time I launch mpv.net it messes with my standard mpv configs, if you renamed mpv.net's config file or moved it another directory this issue wouldn't happen.
Ex:
mpv.conf before launching mpv.net:

#High quality video rendering 
profile=gpu-hq
deband=no

#Do not hide OSC behind taskbar
autofit-larger=88%

#Loop
loop
#loop-playlist

#Interpolation
#video-sync=display-resample
#interpolation=yes
#tscale=box
#tscale-window=sphinx
#tscale-radius=1.0
#tscale-clamp=0.0

#Play external audio
audio-file-auto = fuzzy

#Don't scale OSC
#script-opts = osc-vidscale=no

#Disable OSC for thumbnails
osc=no

mpv.conf after launching mpv.net:

#video-sync = display-resample
#interpolation = yes
#tscale = box
#tscale-window = sphinx
#tscale-radius = 1.0
#tscale-clamp = 0.0
#script-opts = osc-vidscale=no
profile = gpu-hq
autofit-larger = 88%
audio-file-auto = fuzzy
osc = no

small error in changelist (about multiselect)

Dear Stax, the feature you added in 4.6:
"when multiple files are selected in Windows File Explorer and enter is
pressed, the files are opened as selected, the order is random though
because Explorer starts multiple mpv.net processes concurrently"

it's not with Enter, but Ctrl+Enter, right ?
Thanks for all the nice improvements, as usual :-)

Autofit empty value behavior. Autofit-larger implementation needed.

Current behavior: An empty autofit value defaults to a window size of 50% of the monitor size. No option available for the window to automatically open at the video's native resolution, and no option to prevent the native resolution window option from extending past the monitor's edges.

Expected behavior: If no value is set in autofit, MPV.net should automatically size the window to the video's native resolution size. Autofit-larger or similar implementation is also required to prevent the native resolution window size from extending past the monitor's edge (if the video's native resolution is larger than the monitor's resolution). Must take into account borders being on or off.

Issue with 4.2.0.0 installer?

The new installer for 4.2 apparently fails to associate files at the end of the installation. I updated last night and at the end I chose Associate video files and after that the installer closes and leaves a mpv.net instance that stays idle and I have to kill via task manager. After that, I can open and associate files through mpv.net menu.

Tried it a bunch of times and it does the same every time. Doesn't happen with 4.1 installer.

Using Windows 10 1903 x64 and x64 mpv.net installer.

issue with MBTN Input

I use MBTN back and forward for "playlist-next/prev , not sure if its in error in one of my configs but the player freezes up

Can't get the multimedia keys to work... any clue?

Dear Stax, Sorry for the multiple threads, but every one is a different subject.

I could not get any multimedia keys to work (they work with WMP, Foobar2000 but not mpv).

These lines that you put in the input.conf don't work for me:
PLAY cycle pause
PAUSE cycle pause
PLAYPAUSE cycle pause
STOP quit
FORWARD seek 60
REWIND seek -60

MediaLoaded event delays when loading multiple files

If I'm opening up 20 audio files at the same time, the first 8 files open right away, then each additional file gets the MediaLoaded event fired one per second, so it takes 12 seconds until the players are properly initiated. However, the file position shows they all started playing right away, but MediaLoaded is delaying.

What could be causing such a delay? Playback is working but it's screwing up the UI.

subtitle cycle back

hi,

is it possible to cycle back the subtitles?

now i can only switch to next one with kp8.

Cannot force default display to open in

I am running a dual monitor and mpv.net will always default to opening in the second display, no matter the value I put under Config > Screen. I inputted 0, 1, 2 and it will always open in the second monitor.

When I go full screen after moving the video to the primary display, and revert back to windowed, it moves the player back to the second display.

Vanilla mpv does not have this issue.

Request: Portable installation?

I'd like something that runs from a single folder. No installation. No start menu entries. Or perhaps just a "portable mode" in the installer that creates the folder with everything in it and upgrades that folder on subsequent installs?

Issue with mpv.net when opened from staxrip

Dear Stax, this is an issue I posted in the Staxrip issue page, and Revan asked me to post it here:

in older staxrip like 1.7.0.6, when I open preview window and press E to preview in mp.vnet, the preview showed video and played the audio track also.

Now with recent Staxrip, the preview only plays video, no audio.
It was good to have audio, very useful. So is it a mpv problem?

mpvnet.base

Would it be possible to extract the libmpv wrapper code into core library. I am planning to use the library in non-GUI fashion.

Small key binding correction (small remark)

Hi Stax76, in the key bindings you have the line:
[ multiply speed 0.9 #menu: Speed > -10%

Where it should be :
[ multiply speed 1/1.1 #menu: Speed > -10%

With this syntax, if you increase-decrease-increase... speed as many times, you can always get back to the exact value of 1.00

small correction to the menu

Dear Stax, First thank you for the huge work done on right click menu. I was struggling to find the commands without success, and you gave them all.
Please correct this:
Shift+BS set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 #menu: Alt+Backspace ; Pan && Scan > Reset

#menu says Alt+Backspace, it's Shift (silly bug;))

How to play a given file after startup

Please tell me how to start playing a particular *.mp4 file after compilation in Visual Studio? Where and how to specify the file (mp4) with playback options I need to play an encrypted file with the key --demuxer-lavf-o=decryption_key...my_key.. to have the player start playing my file right away ? If you call mpvnet.exe from the command line with parameters, everything works fine and decrypts, but it is necessary from the program code to call playback.

Feature Request: Assign hotkeys from scripts/addons

I'm not to keen on having to edit conf for an addon (prefer functionality self contained in script or addon).
For a couple scripts or addons I'd like to create I want them to get fired when a keydown event is triggered. For such it would be useful to be able to assign hotkeys for the script (and if that hotkey is used in program, the script hotkey would win).
Another possibility would be exposing keydown event where addon could take advantage of it and if so desired pass the action back to base.
Last thought on how to go about what I'm after may require me better understanding how to add to and trigger events and assign hotkeys to the built in contextmenu. Perhaps a new csharp script or addon example showing how to do this for a new menu entry and assigning it's hotkey and how to track it's firing as I don't see context menu itemclicked as option in the addon api (may just not know where to look).

Make mpv.net appear in the permanent OPENWITH LIST on Win10 (solution)

Dear Stax,
In Windows 10, unlike Windows 7, mpv.net will not appear permanently in the open with list (right click), no matter what you do. The solution is an entry in the registry.

SNAG-0002

Solution:

[HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\Shell\MuiCache]

"C:\Program Files\mpv.net\mpvnet.exe.FriendlyAppName"="mpv.net media player"
"C:\Program Files\mpv.net\mpvnet.exe.ApplicationCompany"="mpv.net Dev Team"

Currently, the last line is missing. Just by adding it (i.e setting the ApplicationCompany), mpv.net will remain permanently in the openwith list.

This is useful for people that do no want mpv to be their main player.

mpv.net opens first file in folder

mpv.net randomly opens first file in folder (sorted in ascending order by name) despite user clicking on some other file. Most of the time it opens files fine, sometimes you get the first file, not sure what causes this.

Doesn't happen if file is dragged into already open player

Regression: autofit not working anymore

Hi Stax, when start-size is set to previous", the window initial size when opening a video is not using autofit setting anymore. It is using 50%! it seems like a regression.

Add VapourSynth Support

Could you compile the releases with the "--enable-vapoursynth" flag? I'd love to run some deinterlacing scripts in real time with mpv.net, as well as SVP.

On a separate note, selecting a script to load via the GUI would be amazing.

Autofit and remember-height interaction bug and incorrect behavior

Current behavior: If Remember-height: No is selected, the window will first size the window to the Autofit: N% value, then it will again resize to the native video resolution. This causes the video to load slower, and causes the window to quickly resize twice before the video begins to play, leading to a jarring visual effect I've seen many complain about when discussing the mpv.net video player.

Expected behavior: If Remember-height: No is selected, the native video resolution should be the first and only size of the window, unless the window size is greater than the monitor resolution. If the window size is greater than the monitor resolution, it should size the window to the maximum resolution of the monitor. You can look to MPC-HC for an example of how this is implemented.

Additional suggestion: Remember-height and autofit settings should probably be renamed and reorganized to a toggle between these two options: "Always use video resolution as window size" and "Always set the window size to: N%." I've seen many people not understanding what Remember-height does and not understanding what it's supposed to do, given its interaction with Autofit. It doesn't make much sense for both of them to activate at the same time.

mpv.net Portable should NOT create an user/appdata/roaming settings folder at all

I think the Portable version of mpv.net should not make a settings folder in appdata/roaming. A portable version should have everything contained in one folder, so you don't leave your settings on a Windows machine, or so you can move settings, binaries, etc from machine to machine all in one folder.

Anybody else think this makes sense? I think it's fine for the installer to create an appdata/roaming settings folder, but the Portable version should keep the settings, exe, etc all in one folder.

Default menu items are broken in 3.4

Starting from a clean install of 3.4.0.0 downloaded from https://github.com/stax76/mpv.net/releases/tag/3.4 ==> mpv.net-setup-x64-3.4.0.0.exe

When clicking Preferences (or P hotkey):

[Window Title]
mpv.net

[Main Instruction]
No command 'show-prefs' found.

[Content]
Available commands are:

cycle-audio
execute-mpv-command
load-audio
load-sub
manage-file-associations
open-conf-folder
open-files
open-url
shell-execute
show-about
show-command-palette
show-conf-editor
show-history
show-info
show-input-editor

How to bind these commands can be seen in the default input bindings and menu definition.

[OK]

[Footer]
Copy Message Contact Support

When clicking Keys (or K hotkey):

... as above but ....
[Main Instruction]
No command 'show-keys' found.

When clicking Tools > Config Folder:

... as above but ....
[Main Instruction]
No command 'open-config-folder' found.

When clicking Tools > History:

... as above but ....
[Main Instruction]
No command 'history' found.

Behaviour when opening (multiple) files from windows explorer

Hi Stax,
After playing a lot with mpv.net, I really find it totally fulfilling (and don't miss at all the older players I used before ;-), and I guess I would have two last requests if possible:

Request 1: multiselection from explorer

Actual behavior:
When selecting 1 file and press enter or double click, mpv.net opens and sets folder as playlist
When selecting multiple files and press enter, mpv.net opens and sets folder as playlist

Wished behavior (if possible):
When selecting 1 file and press enter or double click, mpv.net opens and sets folder as playlist <-OK!
When selecting multiple files and press enter, mpv.net opens and sets selected files as playlist

Request 2: folder sorting
Shouldn't be explected that if mpv.net is started from a folder of media that is sorted in a certain way (by name, by size, by date etc), then the playlist is set as the folder with the same sorting order?

And again, thanks for the great work!!

Single Instance = EXCELLENT, but QUEUE mode not as it should be

First, thank you very much for implementing the single instance mode, which I have been waiting for a long time, and now will allow me get rid of WMP forever :-)

However, I tried the Queue mode, and the files are queued ok, but at the end of the current list, which happens to be the full alphabetic list of files of the folder of the first file opened.
Does that make sense? I think that in QUEUE mode, when you open your first file (before appending), it should only create a playlist with that file only, not the whole folder!

Thanks again for the great work

Some feature requests:

First of all, thank you for the project, i like mpv, but it kinda lacked the simple menu, so thanks for that.
It's good that mpvnet uses mpv settings, but it won't it cause an issue if you has the same input.conf and use some scripts for mpv that do stuff that mpv-net already can, but the keys are already binded?
(oh, and your https://github.com/stax76/mpvnet/blob/master/mpvnet/Resources/input_conf.txt overrides default binding for o, that is show-progress (it's duped by P, so no big deal, but maybe Ctrl+o like in https://github.com/rossy/mpv-open-file-dialog ?)). Oh, and also binding s to stop by default is a bad idea as it's binded to screenshot by default in mpv.
So, my first request would be fixing that problem.
Second request - mpvnet can't use youtube-dl, so you can't watch youtube/twitch/whatever with mpvnet, but can with mpv.
Third request - maybe being able to rebind menu from RMB to some other key?

as ActiveX Control

Hi,
m newbie here.....
I am using axwindows media player control for video playback in my forms, may i use this as an activex control to play videos in my form ?...

Thanks

font size script creating error

Hi Stax,

this script to set right click menu font is now creating an error, it was working in 4.6.0.0.
I tried to read the in the commits but i'm not good at this :( i couldn't find the reason.
Here is the script:

using System;
using System.Drawing;
using mpvnet;
class Script
{
public Script()
{
var form = MainForm.Instance;
form.Invoke(new Action(() => form.ContextMenu.Font = new Font("Segoe UI", 12)));
}
}

use of direct3d not recommended

Dear Stax, a few days ago, you were discussing that hwdec=yes, vo=direct3d is what you use.
But, i made several tests, and i found that vo=direct3d does not allow the colormatrix information to be applied.
When you use vo=direct3d, the video will always be decoded as bt.601, even if you change it, mpv accepts the command, the display will show colors that match the bt.601.
(means : magentas very strong, greens not good)

I found that the proper way to handle that is:
vo=gpu,
hwdec=no

hwdec=no because if set to yes, i get crashes when seeking.
the comma after gpu is for compatibility with older mpv.net that work with your last staxrip 1.7.0.6 that i still use.

mpv.net 4.0.0.0 gives an ArgumentException error when minimized to taskbar

First error message:

ArgumentException

Parameter is not valid.

System.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at mpvnet.mp.ShowLogo() in C:\Users\frank\Daten\Projekte\CS\mpv.net\mpv.net\mpv\mp.cs:line 662
   at mpvnet.MainForm.OnResize(EventArgs e) in C:\Users\frank\Daten\Projekte\CS\mpv.net\mpv.net\WinForms\MainForm.cs:line 557
   at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
   at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   at System.Windows.Forms.Control.UpdateBounds()
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at mpvnet.MainForm.WndProc(Message& m) in C:\Users\frank\Daten\Projekte\CS\mpv.net\mpv.net\WinForms\MainForm.cs:line 452
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Second error message:

System.Runtime.InteropServices.ExternalException (0x800401D0): Requested Clipboard operation did not succeed.
   at System.Windows.Forms.Clipboard.ThrowIfFailed(Int32 hr)
   at System.Windows.Forms.Clipboard.SetDataObject(Object data, Boolean copy, Int32 retryTimes, Int32 retryDelay)
   at System.Windows.Forms.Clipboard.SetText(String text, TextDataFormat format)
   at TaskDialog`1.<DialogProc>b__92_0() in C:\Users\frank\Daten\Projekte\CS\mpv.net\mpv.net\Native\TaskDialog.cs:line 418
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Screenshot_2

Won't play any video files

Trying out your player I manage to get it to start. The right-click context menu shows up and I can click "Open Files" and choose a file. But then nothing happens. No error and the player window just stays black.

The same files play perfectly fine using mpv.exe from https://mpv.srsfckn.biz/

mpv.net should make its own "mpv.net" appdata folder so as not to mess with regular mpv settings

I use mpv and tried out mpv.net. When I used mpv again, I noticed it took the mpv.net settings instead of my own because they both use the same mpv appdata folder in AppData/Roaming. This shouldn't really happen because mpv.net isn't really mpv anymore. At this point, it is a separate project and should have it's own settings.

Can we have mpv.net create its own "mpv.net" appdata folder going forward since it is a completely different project? This will let us use both if we want to, or let us test mpv.net without messing with existing settings, and make it clearer which settings go with which player.

script for right click menu font size not working anymore

Dear Stax76,
With older mpvnet like v2.0.0.0 we could still use this script to set font size of
the right-click menu:


using System;
using System.Drawing;
using mpvnet;
class Script
{
public Script()
{
var form = MainForm.Instance;
form.Invoke(new Action(() => form.CMS.Font = new Font("Segoe UI", 11)));
}
}

Now this is not working anymore, I get an error at mpvnet launch "error CS1061: 'mpvnet.MainForm' does not contain a definition for 'CMS'".

Is there a way I can change the menu font size now?
Thanks!

Can't assign scroll left/right from mouse wheel buttons

I tried to assign my scroll left/right middle wheel buttons (logitech g502, you press the wheel sideways) to the jump 7 sec feature, but it won't recognize my input (its like im not pressing anything at all) is there a fix for this? Thanks.

image

Hide Titlebar

Hi, great work so far. One issue I've run into is that border = no seems to be ignored in mpv.conf, and any inputs assigned to cycle border also don't have any effect.

It's been a few years since I made any .net C# apps, but I think the setting is this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; I could be very wrong, though.

Thanks for all your hard work on this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.