View Full Version : mpv.net media player
Pages :
1
[
2]
3
4
5
6
7
8
9
10
11
12
13
14
15
stax76
14th March 2019, 05:44
Version 1.1 has support for Python scripting using IronPython, for testing I migrated the seek-show-position.js script to Python, the API is identical to the Lua/JavaScript API, certainly not fully implemented but assigning to events, executing commands and accessing properties are all shown in the seek-show-position.py script. Since IronPython is .NET based it can also use the APIs which the two included .NET addons use. Personally I think Python is much nicer than Lua and JavaScript, Python scripts can be located in the startup dir in the script folder or in mpv's script folder in the appdata folder. The script is shown below, feel free to ask anything about mpv/mpv.net, .NET addons or Lua/JavaScript/Python scripting. I'm not having any further plans for the player right now since it does everything what I use.
# when seeking displays position and
# duration like so: 70:00 / 80:00
# which is different from mpv which
# uses 01:10:00 / 01:20:00
import math
def seek():
mp.commandv('show-text',
format(mp.get_property_number("time-pos")) + " / " + format(mp.get_property_number("duration")))
def format(f):
sec = round(f)
if sec < 0:
sec = 0
pos_min_floor = math.floor(sec / 60)
sec_rest = sec - pos_min_floor * 60
return add_zero(pos_min_floor) + ":" + add_zero(sec_rest)
def add_zero(val):
val = round(val)
return "" + str(int(val)) if (val > 9) else "0" + str(int(val))
#mp.Seek += seek
mp.register_event("seek", seek)
stax76
18th March 2019, 14:42
1.2
a thread synchonisation bug which caused the shutdown to be delayed or frozen was fixed, it also caused the Shutdown event not to fire which caused the rating plugin not to work
https://github.com/stax76/mpv.net/releases
stax76
19th March 2019, 10:39
1.3
besides Lua/JavaScript/C#/Python there is now PowerShell supported as fifth scripting language
in case there isn't yet a mpv.conf file mpv.net creates the file with certain default settings that were previously set on every mpv.net start. This was changed to provide transparency on which settings mpv.net uses. These default settings can be seen here: https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/mpv.conf.txt
https://github.com/stax76/mpv.net/releases
https://github.com/stax76/mpv.net#powershell-scripting
stax76
20th March 2019, 18:43
1.4
the last thread sync fix wasn't working well, the delayed shutdown should be gone for good now
libmpv updated
https://github.com/stax76/mpv.net/releases
stax76
21st March 2019, 15:41
In the mpv SDK docs of Lua/JS I'm not sure I understand the following:
mp.get_property_bool(name [,def])
Similar to mp.get_property, but return the property value as Boolean.
Returns a Boolean on success, or def, error on error.
Does def here stand for a default value? I understand it as follows:
If the property is not available it returns the default value and if the property is not available and no default value was provided it returns an error.
stax76
21st March 2019, 18:38
1.5
the info command supports now info for music files instead of showing an exception on music files
added support for WM_APPCOMMAND API to support media keyboards
fixed Alt key input not working
mpv.net API methods renamed to match the names used in the Lua/JS API
https://github.com/stax76/mpv.net/releases
ashlar42
21st March 2019, 18:53
It would be nice if configuration was doable through a GUI. MPV documentation is... complex. You state so in the OP, I know, but I'm used to madVR, where the GUI allows pretty in-depth configuration.
stax76
21st March 2019, 19:44
it's difficult because:
it should modify mpv.conf to be mpv compatible
it should be searchable/filterable
most difficult is I never make a easy decision on which programming language and UI toolkit to use, I don't like always using the same languages and toolkits.
BetA13
21st March 2019, 22:57
is there a list somewhere on wich settings i can use or are avaiable?
i find it hard to configure it, but i want to learn more of course..
also, is it possible to select the monitor that should be used? i have som eproblems with multimonitor config..
Thanks for this project, really liking the minimalism of it.. even doh its kinda hard to configure..
cheers
stax76
22nd March 2019, 02:29
mpv.net has hardly documentation, only a few words at the start page:
https://github.com/stax76/mpv.net
mpv.net supports many mpv features without difference, mpv is mostly documented here:
https://mpv.io/manual/master
also, is it possible to select the monitor that should be used? i have som eproblems with multimonitor config..
maybe this:
https://mpv.io/manual/master/#options-screen
window related features however must be implemented in mpv.net, I should be able to add support for it.
BetA13
22nd March 2019, 13:45
maybe this:
https://mpv.io/manual/master/#options-screen
window related features however must be implemented in mpv.net, I should be able to add support for it.
Thanks for the reply.
I did looked over the manual and tested:
screen=1
and
screen=Default|1
screen=<1>
none of it worked for me, it still starts on the first monitor.
im really looking forward to your implementation, it should make the player way more accessable for other users also that arent used to editing the config file..
Thanks for the work you put into this Project :)
edit:
this is my cfg atm..
vo=gpu
hwdec=dxva2-copy
profile=opengl-hq
video-sync=display-resample
#interpolation=yes
#tscale=sinc
opengl-backend=dxinterop
screen=1
stax76
23rd March 2019, 03:55
@BetA13
it was much more tricky then I thought, I hope at least it works now.
### 1.6
- a crash caused by WM_APPCOMMAND (multimedia keyboards) commands was fixed
- support for the 'screen' property was added, it should work both from mpv.conf (screen = 1) and from command line (--screen=1)
- per monitor DPI awareness and better multi monitor support was added
https://github.com/stax76/mpv.net/releases
BetA13
23rd March 2019, 16:21
Thank you very much :)
will test as soon as i get back home..
cheers
BetA13
24th March 2019, 14:48
Took me a bit longer, but i did test it.
Im happy :) works like a charm, it starts on the right monitor now, and no more frame drops etc.. all stable now..
Thank you very much for the quick fixing.
hubblec4
25th March 2019, 10:36
I guess you are not interested in Matroska support(simple basic support works),or?
stax76
25th March 2019, 10:46
There is now a mpv.conf editor, I hope you like it and it don't has bugs.
https://github.com/stax76/mpv.net/releases
I guess you are not interested in Matroska support(simple basic support works),or?
MKV support is probably not bad, do you miss anything?
hubblec4
26th March 2019, 00:45
....do you miss anything?
Yes, just about everything Matroska has to offer.
I had looked into mpv's code and saw it supports ordered editions/chapters and your mpv.net player plays it, but there is no option to change the edition.
Nested chapters are not supported and the chapter menu is not so good.
This should be a standard for Matroska players(splitter) like LAV Splitter.
I don't know exactly if Matroska Hard-Linking is supported by mpv.
Native Matroska Menu which is supported in VLC.
Video rotation via Tags AND with the ProjectionPoseRoll (https://github.com/Matroska-Org/matroska-specification/issues/269) element.
Matroska DVD VobButton files for in-screen click events.
TRACKSETEX which comes with the HAALI Splitter.
And the new Interactive_movie_support (https://wiki.videolan.org/SoC_2019/#Interactive_movie_support).
I think this is enough for first time but there are more.
stax76
27th March 2019, 02:43
@hubblec4
VLC is fine, though seeking could be faster.
### 1.9
- improved settings editor
- all info and error messages are shown now on the main window thread having the main window as parent
https://github.com/stax76/mpv.net/releases
https://raw.githubusercontent.com/stax76/mpv.net/master/screenshots/mpvSettingsEditor.png
stax76
27th March 2019, 15:39
I had looked into mpv's code and saw it supports ordered editions/chapters and your mpv.net player plays it, but there is no option to change the edition.
Searching in the manual for settings I possibly can add to my mpv.conf GUI editor I found the following:
https://mpv.io/manual/master/#options-edition
Is that what you meant? This is something that could be integrated in mpv.net if there is interest, if VLC has a related feature can you tell me where it is located in the VLC menu or settings?
hubblec4
27th March 2019, 20:18
Yes this is it. Now I see the default value "auto" is used and mpv.net plays the default edition.
VLC: Playback->Title, there you have the option to change the edition. I helped Steve Lohmme to fix the playback issue but there is still an issue when you change the edition.
It plays fine but the timeline jumps often to the end, also after selecting a chapter. The issue ticket on VLC-dev is still open and nobody has answered anymore.
Best edition selection is in LAV Splitter tray-icon.
Grimsdyke
27th March 2019, 20:21
Is it possible with mpv to make a playlist with specific parts of a file ? Not by chapters but by timings like 00:00 => 01:30, 04:05 => 11:20, etc. Thx
hubblec4
27th March 2019, 20:30
I found this: --ordered-chapters-files=<playlist-file>
and it sounds very interesting. Normal Matroska behavior of loading segmented files, works only in the main directory but with this option a menu structure could be possible.
hubblec4
27th March 2019, 20:32
Is it possible with mpv to make a playlist with specific parts of a file ? Not by chapters but by timings like 00:00 => 01:30, 04:05 => 11:20, etc. Thx
This is a perfect task for Matroska. Use ordered chapters and then you can have multiple editions with different parts of the mkv.
BetA13
27th March 2019, 23:25
cant use the settings editor..
when i try to start it an error pops up:
https://i.imgur.com/TSXlxHN.png
when i say yes, it takes me to the download site of Net framework v.4.7.2 wich i do have installed...
is version 4.8 even out?
Im using windows 7 64bit by the way..
Greetz
stax76
28th March 2019, 00:37
I forgot it was using 4.8 and changed it now to 4.7.2.
### Changelog
### 2.0
- setting track-auto-selection added to settings editor (<https://mpv.io/manual/master/#options-track-auto-selection>)
- setting loop-playlist added to settings editor (<https://mpv.io/manual/master/#options-loop-playlist>)
- setting audio-file-auto added to settings editor (<https://mpv.io/manual/master/#options-audio-file-auto>)
- setting video-sync added to settings editor (<https://mpv.io/manual/master/#options-video-sync>)
- command execute-mpv-command added to menu: Tools > Enter a mpv command for execution
- added youtube-dl.exe, please note this will only work when a certain Visual C++ runtime is installed
- added drag & drop support to drag & drop a youtube URL on mpv.net
- added support to open a youtube URL from command line
- added support for opening a URL from the menu: Open > Open URL
https://github.com/stax76/mpv.net/releases
BetA13
28th March 2019, 15:16
hehe, ok.
Well, up we date....
My name is BeTa, so please lemme Test some more...
just joking^^ Thanks for the fast Updates mate!!
Cheers...
edit:
Works as intended... :)
stax76
28th March 2019, 17:32
You can probably test a key binding editor soon but first I try to understand the entire code, there are parts I googled and copied without really understanding it.
ashlar42
28th March 2019, 17:47
There is now a mpv.conf editor, I hope you like it and it don't has bugs.
https://github.com/stax76/mpv.net/releasesGreat! It would nice (and I think useful for the grand majority of users) to have scaling options easily accessible.
stax76
30th March 2019, 06:08
Great! It would nice (and I think useful for the grand majority of users) to have scaling options easily accessible.
Do you have scaling options in your mpv.conf file?
Everything is defined in the mpvConfEdit.toml file in case somebody understands toml or wants to learn it.
Changelog
2.1 (2019-03-30)
new input editor added, default key binding is here: https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L89
Screenshot: https://raw.githubusercontent.com/stax76/mpv.net/master/screenshots/mpvInputEdit.png
Download: https://github.com/stax76/mpv.net/releases
ashlar42
30th March 2019, 14:23
Do you have scaling options in your mpv.conf file?
Everything is defined in the mpvConfEdit.toml file in cNope, I am currently not using mpv. Specifically because configuring it is quite frankly a nightmare for me.
Having a simple, configurable, "double click and play", player for Windows would be great, as an alternative to MPC-HC. :)
But maybe it's not your objective, I don't know.
stax76
30th March 2019, 16:24
I found it difficult too, even with 15 years coding experience and I hope I could make it at least a little bit more accessible.
My goal with mpv.net is adding a few features I need for myself and help people a little bit if I can.
Other than that generally I like learning new languages, toolkits and frameworks etc., for mpv.net I've learned quite a bit about C# and WPF and found it quite nice after mastering difficulties I had before. Next on my table is C++, Rust, TypeScript, Python and F#.
BetA13
31st March 2019, 23:02
one little thing i noticed while testing.
open player, drops youtube link on it, video plays fine, all good BUT it does not go Fullscreen anymore. neither with "F", nor mouse double klick or via menue.
Only happens with youtube videos, normal movies/files are fine and fullscreen works via double klick.
not shure why that is, if you need more info, lemme know and ill get back to you ;)
Greetz
edit:
is there a way to make the player "ask" me what format/resolution etc. i want when loading a youtube link?
or do i have to set that up somewhere?
Thanks
stax76
1st April 2019, 04:28
open player, drops youtube link on it, video plays fine, all good BUT it does not go Fullscreen anymore. neither with "F", nor mouse double klick or via menue.
Only happens with youtube videos, normal movies/files are fine and fullscreen works via double klick.
I was able to fix it.
For youtube it should be possible to put options to the mpv.conf file.
https://mpv.io/manual/master/#options-ytdl-format
I hope it's OK, apparently it uses the best quality for default.
For the next release I've built an installer.
stax76
1st April 2019, 12:10
### 2.2
- messages boxes had always the info icon even if a different icon (error, warning, question) was intended
- instead of silently do nothing on unknown commands there is now a error message listing available commands and showing the location of the default bindings, this helps when commands are removed or renamed
- there was a problem fixed that made the cursor hidden when it should be visible
- dragging a youtube URL on mpv.net would break certain input related features
- there is now an installer with file extension registration (limited on Win 10) available
- WM_APPCOMMAND media keys were not working in the input (shortcut) editor and there were no defaults for prev and next defined
https://github.com/stax76/mpv.net/releases
BetA13
1st April 2019, 17:03
nice update..
Thanks for the great support :)
updating now...
ill report back later^^
edit:
Fullscreen with youtube videos still borked..
stax76
1st April 2019, 18:18
Oh sorry, I had made a change and tested it 2-3 times and it was OK. Tried it now again and yes it's still broken. Potentially it's gonna be difficult to fix because probably it requires deep win32 knowledge, I'll give it a try, there is a tool called spy++ useful for this kind of issue.
What is very simple to do is to check the clipboard for a YouTube URL when the mpv.net window gets focus/activation and show a message box then confirming to play the URL.
stax76
1st April 2019, 19:09
There was a simple bug where code was executed that should only run for files and not for URL's, this caused an exception and unfortunately there was a second problem, the exception handling not working properly.
stax76
4th April 2019, 18:29
### 2.3 (2019-04-04)
- dragging a youtube URL on mpv.net would still break something, it should work now
- when the main window gets focus/activation it will check the clibboard for a YouTube video and ask to play it
- libmpv updated
- changing to normal size from fullscreen resulted in a too large window in some circumstances
- some default key bindings and menu structure have changed and the input.conf file has a description added on top <https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt>
- the file association code was completely rewriten, it's now contained within mpvnet.exe instead of a separate application and it adds a few more keys
- various new info added to the wiki: <https://github.com/stax76/mpv.net/wiki>
- On Top feature was implemented using mpv's native property 'ontop', default bindings at: <https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt>
https://github.com/stax76/mpv.net/releases
BetA13
4th April 2019, 22:16
Thank you, its fixed now :)
gonna read a bit trough your Wiki now...
Cheers ;)
stax76
6th April 2019, 15:15
2.4 (2019-04-06)
new options added to the conf GUI editor: gpu-context, gpu-api, scale, cscale,
dscale, dither-depth, correct-downscaling, sigmoid-upscaling, deband
the conf edit GUI has a 'Apply' feature added to write the conf to mpv.conf
without the need to close the conf edit GUI
the input edit GUI shows a message box when a duplicate is detected and it has
a new feature to reduce the filter scope to eather of input, menu or command and
the editor writes always the same help on top of input.conf as it is found in the defaults
the conf edit GUI was often starting out of working area bounds and is now starting with center screen
the startup size was reduced and a issue was fixed that when the screen property
was defined for a screen that isn't connected the startup size wasn't applied
added feature to load external audio and subtitle files in the menu under:
Open > Load external audio|subtitle files (default binding at:
input.conf (https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt))
previously the conf edit GUI removed settings from the conf file if the setting
was set to the default, the new behavior is not to remove anything
the autofit mpv property was partly implemented, you can use 'autofit = 50%' in mpv.conf or
'--autofit=50%' on the command line, WxH isn't implemented and only percent values are accepted.
There is a new wiki page explaining the mpv.net limitations compared to the original mpv:
Limitations (https://github.com/stax76/mpv.net/wiki/Limitations)
go to download page (https://github.com/stax76/mpv.net/releases)
ashlar42
7th April 2019, 21:47
Nice improvements.
stax76
7th April 2019, 22:11
Unfortunately the latest release has a bug causing the conf editor not to save the settings in certain situations, I've noticed it today.
stax76
8th April 2019, 03:29
2.5 (2019-04-08)
in case the input conf don't contain a menu definition mpv.net creates the default menu instead no menu like before
all message boxes were migrated to use the TaskDialog API
an improvement in the previous release unfortunately introduced a bug
causing the conf editor not to save settings
go to download page (https://github.com/stax76/mpv.net/releases)
stax76
8th April 2019, 15:09
Anybody using Wox launcher here?
https://postimg.cc/kR41XjQM
stax76
8th April 2019, 21:13
First release of my Wox launcher plugin to control mpv.
https://github.com/stax76/wox-mpv-plugin
BetA13
8th April 2019, 22:52
im having a tiny little bit trouble reading the Configurator :)
Same happens if i try an Dark theme, or any other Theme for that matter ^^
https://i.imgur.com/qNj1cwA.png
*Danke für die neuen Updates ;)
Cheers
stax76
9th April 2019, 04:04
I hope this release is more stable then the previous two.
2.6
on Win 7 controls in the conf editor were using a difficult too read too light color
context menu renderer changed to look like Win 10 design, except colors are still system theme colors
go to download page (https://github.com/stax76/mpv.net/releases)
stax76
10th April 2019, 16:08
Please someone confirms that the last release 2.6 actually starts on Win 7, I'm too lazy to set up a test environment. The last release has a manifest added which is a potential source of incompatibility.
BetA13
10th April 2019, 16:43
one second, im at it..
edit:
First start took around 3 seconds.
second start took under 1 second, all is fine at my end..
works just fine for me :)
Windows 7 64bit Pro
edit2:
The Configurator is also fine now :)
https://i.imgur.com/jGWxwuz.png
THANK YOU !!! :)
stax76
10th April 2019, 20:06
Thanks for testing! I get a white background, is your black background a windows setting or maybe changed by a 3rd party app?
The elements that previously had a too light color on Win 7 are now hard coded as Dark Slate Gray on systems prior Win 10, on Win 10 it uses the system theme/accent color. Hard coding it was easier than getting the system theme color, I had used a new method that didn't work on Win 7 but there is an old method that still could be implemented and probably works on Win 7, this old method is used in StaxRip.
This is how things look on Win 10 using Dark mode and Orange accent:
https://postimg.cc/JsVmB6QM
The screenshot also shows how radio buttons look in the settings dialog of Win 10 using dark mode.
mpv.net might support dark mode or color themes soon, I started experimenting with it today.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.