View Full Version : mpv.net media player
Pages :
1
2
3
4
5
6
7
8
[
9]
10
11
12
13
14
15
chros
2nd June 2021, 13:47
Don't judge it based on MMFR, it's a shitty grade, can peak around 9000 nits and the mastering monitor was 4000 :) Some special treatment was applied in madvr exactly beacuse of this, but it can screw up other things.
brad86
2nd June 2021, 14:19
Don't judge it based on MMFR, it's a shitty grade, can peak around 9000 nits and the mastering monitor was 4000 :) Some special treatment was applied in madvr exactly beacuse of this, but it can screw up other things.
Thanks for the explanation. Indeed, outside of Mad Max mpv has been handling HDR material really well. Blade Runner 2047 and the recent Speed UHD look fantastic.
therube
2nd June 2021, 16:11
MPV.NET 5.4.9.0
Some really nice additions/fixes are in 5.4.9.0:
MANY of which i had come across this weekend & was going to suggest changes for.
well done. thank you.
---
DONE (basically) in 5.4.9.0
[would be nice to have command-line option to not display Setup dialog on the start
of a new Profile] :-)
DONE (basically) in 5.4.9.0
[if you use MPV_HOME,
HKEY_CURRENT_USER\Software\mpv.net\recent
still gets updated
so 1 Profile may see Recent files from an entirely different Profile depending on
how/if/when a particular Profile may have been exited] :-)
DONE (basically) in 5.4.9.0 (simply by using /portable_config/)
(if it were me, i'd prefer settings in a simple .ini file, with the Windows Registry not used at all...)
---
RFE: user.conf:
a place to hold user set preferences
such that if placed into portable_config
they override existing mpv.conf/input.conf/mpvnet.conf settings
(might be some facility there already? i need to look further...)
---
history.txt:
is there a minimum file size (or some other determining factor) for which history.txt
is not updated for particular file(s)?
- like if i throw (drag & drop) a directory of files into mpv.net, files ranging
in length between 0:10 to 1.34.23
no. it is not length or size alone?
is % of file played a factor?
or how the player is Quit? Or...?
- as it is, something ? either causes a file to turn up in history.txt, or not?
---
typos in manual.md:
< To disable the border property:
< `--no-boder` or `--border=no`
> To disable the border property:
> `--no-border` or `--border=no`
< ### Tools > Command Palette
< Shows the command palette window which allows to quickly find and execute commands and key shortcuts.
> ### Tools > F1 (Command Palette)
> Shows the command palette window which allows to quickly find and execute commands and key shortcuts.
---
Ctrl+p faults. Win7 x64, MPV.NET 5.4.9.0 (portable, using portable_config)
---------------------------
mpv.net
---------------------------
System.IO.FileLoadException: Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) File name: 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A) The Zone of the assembly that failed was: MyComputer at mpvnet.PowerShell.InvokeAndReturnString(String code, String varName, Object varValue) at mpvnet.mpvHelp.GetProfiles() in D:\Projekte\CS\mpv.net\src\Misc\Help.cs:line 88 at mpvnet.Commands.Execute(String id, String[] args) in D:\Projekte\CS\mpv.net\src\Misc\Commands.cs:line 49 at mpvnet.CorePlayer.<>c__DisplayClass290_0.<EventLoop>b__2() in D:\Projekte\CS\mpv.net\src\Misc\CorePlayer.cs:line 389 at mpvnet.App.<>c__DisplayClass72_0.<RunTask>b__0() in D:\Projekte\CS\mpv.net\src\Misc\App.cs:line 110
---------------------------
OK
---------------------------
View Show Commands, faults, similarly.
View Show Decoders, faults, similarly.
---
changes made through Input Editor are apt to have changed whitespace
compared to a "default" copy of input.conf
- (& until you realize that) it makes comparison between an "original"
& a modified copy a touch harder
#'s at the top of the file are not indented 1-char
otherwise, there are general spacing differences throughout
(& to top it off, when opened in Vim, if the very first [non-blank] line in the file is a
left justified #... it nicely colorizes all the #'s [including #menu items], heh.
[actually i don't really know the criteria that Vim uses to determine what it does, but...)
---
> OSC visibility -> always
> how to set that as default?
> which .conf file does it go in
> & what is the name/syntax of the particular variable ?
mpv.conf
append (or set)
script-opts = [...whatever...],osc-visibility=always
---
MPV_HOME:
am i correct that %MPV_HOME% is no longer used/needed ?
---
history.txt:
what is the 3rd column?
you have; date | time | ? | path+name
---
when (mpv.net &) a playlist is closed & you reopen mpv.net, & it resumes playback where it left off,
am i correct in understanding that it is that set of GUID files in /watch_later/
that determine which file to restart playback with?
(& in that regard, /i/ would find --write-filename-in-watch-later-config of interest)
(i have a huge playlist, & at some point i realized it restarted from the beginning.
between /watch_later/ & history.txt [& --playlist-start=#] i'm pretty sure i got myself
back on track, err, playlist, correctly)
---
/Setup/:
in Portable (or otherwise, I suppose), is /Setup/ redundant?
in that Tools | Setup... looks to offer the same functionality (from the GUI)
(i suppose "redundant" in the sense that if you weren't scripting, or were not interested
in the underpinnings... IOW, my intent is to make a "portable" of Portable, & for my
needs, if /Setup/ isn't needed, i'll simply leave it out
---
fwiw (my), go_mpv.bat:
set MPV_HOME=%cd%
if exist portable_config goto skipMD:
md %MPV_HOME%\portable_config
:skipMD
if exist mpvnet.exe goto runmpv:
\bin\ln -r C:\WLIB\PLAYERS\MPV.NET_SOURCE .
:runmpv
cmd /c start "" mpvnet.exe --write-filename-in-watch-later-config
set MPV_HOME=
exit
(ln is hermann schinagl's link command.
As is, you can't call, i don't think, mpvnet.exe from a "foreign" directory (like C:\WLIB\PLAYERS\MPV.NET_SOURCE)
& have it store it's Profile, elsewhere (like in the current directory, . , in my example. [it would be nice...]
- though setting up a hardlink looks to work just fine.
Within C:\WLIB\PLAYERS\MPV.NET_SOURCE, i have /portable_config/, & within that, mpvnet.conf with: process-instance = multi
[i just need to be careful that i don't actually modify/delete any of these files, in particular in
/portable_config/ - because they hardlinks & changes in 1 place will change them, everyhere [linked].
i guess that's not really a good way to do it, for mpvconf.net, & i'll probably create it, directly
- not linked, in my batch file...
> if exist mpvnet.exe goto runmpv:
> \bin\ln -c C:\WLIB\PLAYERS\MPV.NET_SOURCE\portable_config .\portable_config
> \bin\ln -r C:\WLIB\PLAYERS\MPV.NET_SOURCE .
-c is a copy, copy /portable_config/ contents are copied
& the MPV.NET program parts itself are hardlinked)
therube
7th June 2021, 16:22
Playlist Fails To Advance Automatically
- this appears to be an issue with mpv itself, not necessarily mpv.net
behavior diff between 5490 & 5480
where, at times, sometimes, 5490
fails to begin playback of the next file in the playlist
(either by drag & drop or by playlist, m3u, pls...)
ordering may be pertinent?
active inaction by the user is important in seeing this
(iow, you don't want to be moving the mouse within the Player's space...)
both mpv.com/mpv.exe & mpvnet fail (with failing versions)
on a fail version, mpv.com, mpv.exe, mpvnet.com, mpvnet.exe all fail similarly,
with GUI or not, with Console display or not.
mpv 032 works
mpvnet 5480 (uses dll.032) works
mpv 033 fails
mpvnet 5490 (uses dll.033) fails (both dll 033.046 & 033.107 [& also 033.178] fail)
modifing the files (my test files) by copying or transcoding, still fails.
ffmpeg -i xxx.mp3 -c copy out.mp3
(a simple COPY sometimes "rights" an issue) - no change
ffmpeg -i xxx.mp3 copy out.mp3
(actually TRANSCODING [re-encoding]) - no change
playing with any number of (mpv) command-line options (not that i particularly knew what they did,
or what a particular parameter to it might do?) - no change
disabling "thumbnail" display --no-audio-display - no change
the order of the files in the "playlist" can affect things
like in order to fail, you must play 1 then 2. where if you played 2 then 1, it (might) work.
similarly you do NOT want to be interacting with the Player. drag the files in (or give it
the playlist, or whatever), & then either move away from Player, or simply do nothing (i.e.
don't move mouse or do any key actions).
on a fail, where playback pauses, you don't need to necessarily do anything to the Player
to cause playback to resume. you could alt+TAB away, then right back, & playback will
start. you can move your magic wand (mouse cursor) OVER the Player window, & that too
is sufficient to start playback. (iow, you don't actually even have to 'click' into the
Player.)
/sometimes/, a fail works, & a works fails.
but must often, results are consistent. a fail fails, & a works works.
using 'portable_config', fresh except for 'process-instance = multi', matters not
in mpv (with time set to display), on a "fail" (i.e., where the next file in sequence
does not automatically play) there is a clock-like icon that shows beside the time
indicator. not sure what that signifies?
using 5490 with 5480's (mpv-1.dll) 0.32.dll, works.
sometimes, i've seen, 'Audio device underrun detected.' with that combo
though every so often i'll see that in any particular version
anyone else seeing this?
ideas? possible work around?
(as is, for my "audio" Profile, i'm using mpv.net 5490 & mpv-1.dll (0.32) from 5480.)
(for me, this definitely exits with audio files. i've not paid particular attention to video files, so not sure there?)
(Win7 x64, mpv 033, mpv.net 5490)
(this does not occur with all files, only some, or at least with some combination or maybe it is some ordering of files.)
TRIPLE is the playlist, the other 3 files contain mp3's (george, also has a few screenshots) that match up with the playlist.
Throw it all into a single directory, drag the playlist into mpv.net, & see if it plays 1 2 3 or if it plays 1 pauses 2 3.
mpv bug report, Playlist fails to automatically play next file in sequence - sometimes. #8904 (https://github.com/mpv-player/mpv/issues/8904).
.
therube
11th June 2021, 16:44
If a player window border is near to a screen border and the window size changes, the player windows sticks to that near screen border location. Furthermore, the `remember-window-position` option remembers a near screen border position instead of remembering the window center position.
I find that very useful.
Though I'll note that there is a potential "flash" of the player window every time a new video clip is loaded.
Maybe ? it is that the player is resetting to W H from settings.xml, or, maybe something with that 1.2 --minimum-aspect-ratio?
And you'll get that flash even with same sized consecutive clips.
(oh, really babbling now...)
Maybe, something like --frames=0, could be used to gather the frame size of the next video in the playlist, & if that next frame size = current_frame_size, avoid the resize (flash)?
Are you using --snap-window here, or did you use your own function?
therube
11th June 2021, 16:51
https://forum.doom9.org/showthread.php?p=1936654#post1936654
If you speed up the playback of a file (the, ']' key), the time remaining display displays the time left to play the file - at the current speed, rather then the remaining time left position in the file.
Like if you have a 10:minute file, you start playback, time remaining shows -10:00..-9.59..., you then set playback speed to 2x (2.00), at that point, the time remaining count(down) takes the speed factor into consideration, so it displays something like -4.55..-4.54...
There seems to be two settings, in that regard:
playtime-remaining & time-remaining (which is scaled by the current speed)
What I saw seemed to imply that playtime-remaining is what "should" be displayed, but what (seems to be) displayed is time-remaining?
Is there a setting or override that one could set to change the behavior so that playtime-remaining displayed instead of time-remaining?
therube
11th June 2021, 16:57
The boxvideo setting sounds interesting.
How does one, or can one implement it in some way?
Something like:
B cycle boxvideo
I tried that in input.conf, but it doesn't fly.
I like to have OSC always.
Though sometimes, OSC gets in the way of something I might want to see, like if subs were at the very bottom.
Now, I could (& do) cycle OSC through DEL (key), but I figured that if I could cycle boxvideo, that would be even better.
stax76
23rd June 2021, 06:47
The boxvideo setting sounds interesting.
How does one, or can one implement it in some way?
It's not possible to change OSC options at runtime. You can change it at load time in mpv.conf:
script-opts = osc-scalewindowed=1.5,osc-hidetimeout=2000,osc-boxvideo=yes
I tried osc-boxvideo=yes, and it generally doesn't seem to work.
Is there a setting or override that one could set to change the behavior so that playtime-remaining displayed instead of time-remaining?
The OSC has a timetotal setting:
https://mpv.io/manual/master/#on-screen-controller-timetotal
But I think your issue requires fixing the built-in script OSC.lua.
Though I'll note that there is a potential "flash" of the player window every time a new video clip is loaded.
Maybe ? it is that the player is resetting to W H from settings.xml, or, maybe something with that 1.2 --minimum-aspect-ratio?
And you'll get that flash even with same sized consecutive clips.
It's not reproducible here, maybe you can try to record it.
https://www.screencastify.com
Are you using --snap-window here, or did you use your own function?
Anything window related requires a dedicated implementation in mpv.net because mpv.net uses an own window implementation.
Playlist Fails To Advance Automatically
- this appears to be an issue with mpv itself, not necessarily mpv.net
I use keep-open=always, so wouldn't notice.
---------
There is a new Beta version available, I could not address all open requests on the issue tracker but at least a few:
5.4.9.1
- Fix exception using named pipes.
- The mpv window property keepaspect-window was implemented.
- Everything search removed to keep the core player lightweight, it might come back as user script or extension.
- The command palette is integrated into the main window.
- Playlist is shown with the command palette and not using the OSD.
- New media info command: `Ctrl+m script-message mpv.net show-media-info #menu: View > Show Media Info`
- Context menu font render quality fix.
- Context menu and `cycle-audio` command supports external audio and subtitle tracks.
- Fix window size not being saved.
- libmpv shinchiro 2021-06-20
I hope it's useful and stable.
Unrelated things I worked on recently are:
https://stax76.github.io/frankskare
https://github.com/stax76/pwgen
brad86
25th June 2021, 08:15
Having an issue with Windows Media Video files. Seems to only affect those encoded with the advanced profile.
https://i.ibb.co/mbZSMyS/Untitled.png
If I change from NVDEC to CUDA, the image works fine, but performance is slightly higher, and I need that for downsampling 4K HDR videos. Seeking is also broken with most WMV files I tried.
pirlouy
25th June 2021, 20:48
There's a good chance it's not a mpv.net bug but mpv in general.
But as always, you should upload (a sample of) the video to confirm the problem is not linked to your config.
brad86
27th June 2021, 10:56
There's a good chance it's not a mpv.net bug but mpv in general.
But as always, you should upload (a sample of) the video to confirm the problem is not linked to your config.
It's not linked to my config, as it happens on freshly generated default config once NVDEC is selected as the decoder. CUDA works fine, but I wish to use NVDEC as the requirements aren't as high for my machine. Switching between then every time I want to watch a wmv file will be a nuisance.
I'm not uploading a sample video, as it is rather pointless considering anyone can just play an advanced profile wmv and get the same issue themselves.
therube
2nd July 2021, 15:52
considering anyone can just play an advanced profile wmv and get the same issue themselves
That assumes one knows what an "advanced profile wmv" is?
As it is, I don't, but I do have some wmv's that don't "play" in mpv.
Took a look at a couple, & the particular files showed 2 video tracks (2 & 3 as it was), & mpv was defaulting to play 2. 2, I'm not quite sure what it is, but I gather it is "bogus" (size was not large enough for it to be anything but, bogus). If I changed to 3, it then played in mpv. (Other players just played the file without having to manually select 3.)
Anyhow...
therube
2nd July 2021, 15:55
5491 Portable
Win7 x64
---
C, Show Commands, generates a fault
---------------------------
mpv.net
---------------------------
System.IO.FileLoadException: Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) File name: 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A) The Zone of the assembly that failed was: MyComputer at mpvnet.PowerShell.InvokeAndReturnString(String code, String varName, Object varValue) at mpvnet.Commands.ShowCommands() in D:\Projects\CS\mpv.net\src\Misc\Commands.cs:line 327 at mpvnet.Commands.Execute(String id, String[] args) in D:\Projects\CS\mpv.net\src\Misc\Commands.cs:line 38 at mpvnet.CorePlayer.<>c__DisplayClass294_0.<EventLoop>b__2() in D:\Projects\CS\mpv.net\src\Misc\CorePlayer.cs:line 404 at mpvnet.App.<>c__DisplayClass75_0.<RunTask>b__0() in D:\Projects\CS\mpv.net\src\Misc\App.cs:line 112
---------------------------
OK
---------------------------
show decoders generates a fault
---------------------------
mpv.net
---------------------------
System.IO.FileLoadException: Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) File name: 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A) The Zone of the assembly that failed was: MyComputer at mpvnet.PowerShell.InvokeAndReturnString(String code, String varName, Object varValue) at mpvnet.mpvHelp.GetDecoders() in D:\Projects\CS\mpv.net\src\Misc\Help.cs:line 143 at mpvnet.Commands.Execute(String id, String[] args) in D:\Projects\CS\mpv.net\src\Misc\Commands.cs:line 40 at mpvnet.CorePlayer.<>c__DisplayClass294_0.<EventLoop>b__2() in D:\Projects\CS\mpv.net\src\Misc\CorePlayer.cs:line 404 at mpvnet.App.<>c__DisplayClass75_0.<RunTask>b__0() in D:\Projects\CS\mpv.net\src\Misc\App.cs:line 112
---------------------------
OK
---------------------------
show playlist (F8), which I assume you exit via ESC ?, when you exit via ESC, generates a fault
---------------------------
mpv.net
---------------------------
System.NullReferenceException: Object reference not set to an instance of an object. at System.Windows.Forms.Integration.ElementHost.ProcessCmdKey(Message& msg, Keys keyData) at System.Windows.Forms.Control.PreProcessMessage(Message& msg) at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg) at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
---------------------------
OK
---------------------------
show profiles generates a fault
---------------------------
mpv.net
---------------------------
System.IO.FileLoadException: Could not load file or assembly 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) File name: 'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ---> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A) The Zone of the assembly that failed was: MyComputer at mpvnet.PowerShell.InvokeAndReturnString(String code, String varName, Object varValue) at mpvnet.mpvHelp.GetProfiles() in D:\Projects\CS\mpv.net\src\Misc\Help.cs:line 131 at mpvnet.Commands.Execute(String id, String[] args) in D:\Projects\CS\mpv.net\src\Misc\Commands.cs:line 48 at mpvnet.CorePlayer.<>c__DisplayClass294_0.<EventLoop>b__2() in D:\Projects\CS\mpv.net\src\Misc\CorePlayer.cs:line 404 at mpvnet.App.<>c__DisplayClass75_0.<RunTask>b__0() in D:\Projects\CS\mpv.net\src\Misc\App.cs:line 112
---------------------------
OK
---------------------------
ESC from F1 generates a fault
---------------------------
mpv.net
---------------------------
System.NullReferenceException: Object reference not set to an instance of an object. at System.Windows.Forms.Integration.ElementHost.ProcessCmdKey(Message& msg, Keys keyData) at System.Windows.Forms.Control.PreProcessMessage(Message& msg) at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg) at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
---------------------------
OK
---------------------------
therube
2nd July 2021, 15:59
5491 beta
Ctrl+M is nice :-).
Ctrl+M & various other commands generate temporary files in %TMP%
& get cleaned up when mpv.net exits. I guess that's OK.
---
A playlist of 80 K files, while time consuming & resource intensive to load,
does load in F8 successfully, without crashing (which is good ;-)
scrolling through the list, or searching is speedy
(close, ESC, then F8 again, is again, time consuming & resouce intensive)
(F8 in 5490 looks to load a little quicker, but its presence is only
momentary - though it does provide some relative position context)
---
"flickering"
- see video
in this example all the file aspect ratios are /relatively/ the same.
with a more diverse set of files, more diverse a/r's, "flickering" is even more apparent
so if you have a playlist, & F12 through it, the player window is apt to jump around quite a bit
as it goes from 1 video to the next
- in the video, i F12 through it, then Home'd to start it again, F12'ing yet again
(note that even on consecutive videos with the same aspect ration, you still get flicker.
does not seem to happen with audio only files. [perhaps it might if an album cover gets loaded?])
https://drive.google.com/file/d/1JzsV-bmKiGEEy2ocvtisyHvGA4cto0YC/view?usp=sharing
atsukasa
4th July 2021, 06:53
How do I change start-size to always open a video similar to vanillia mpv?
Changing it to other options like video looks similar on widescreen videos like 1920x1080 though not exactly the same fit.
But if I play a vertical format like 1080x1920, there are black bars on a small squarish rectangle window.
While on vanilla mpv, only the vertical video is shown without black bars and fits nearly my full 1080p monitor vertical screen.
I also noticed sometimes when I open a video from file explorer, the player will flash a purple vanilla mpv drag files to play here icon for 1s before the video starts. It happens more often if window-maximized is enabled.
brad86
8th July 2021, 15:55
I know this has been asked numerous times the past year-or-so, but is there really not going to be a basic remember playback position implementation come to light ?
The current one saves setting, windows state, volume, and other annoyances that a lot of users don't want.
therube
8th July 2021, 18:26
if I play a vertical format like 1080x1920, there are black bars
If I had to guess, I'd say:
Config - Screen - Start Size -> video
But that doesn't seem to do it.
And that may have to do with mpv.net itself being a GUI & that the GUI would only diminish so much in size (relative to video aspect ratio)?
Messing around with autofit(s) didn't get me anywhere either.
NanoBot
10th July 2021, 15:46
Hi everybody,
is it possible to assign a specific audio renderer to be used in mpv.net ? E.g. I would like to use the "Sanear Audio Renderer" because it allows me to switch the output device and wasapi exclusive mode during playback.
cvrkuth
14th July 2021, 17:04
Hello guys,
I want to use a simple script "clock.lua" which constantly shows the current time on the lower-left corner of the video screen.
However, I can't bind a key (in MPV work).
Could you provide me some help?
Regards
stax76
18th July 2021, 13:29
"flickering"
- see video
in this example all the file aspect ratios are /relatively/ the same.
with a more diverse set of files, more diverse a/r's, "flickering" is even more apparent
so if you have a playlist, & F12 through it, the player window is apt to jump around quite a bit
as it goes from 1 video to the next
- in the video, i F12 through it, then Home'd to start it again, F12'ing yet again
(note that even on consecutive videos with the same aspect ration, you still get flicker.
does not seem to happen with audio only files. [perhaps it might if an album cover gets loaded?])
I'm not able to reproduce it. Maybe it's related to your files or to your OS setup, your Window chrome looks uncommon. Or maybe it's GPU related.
But if I play a vertical format like 1080x1920, there are black bars on a small squarish rectangle window.
While on vanilla mpv, only the vertical video is shown without black bars and fits nearly my full 1080p monitor vertical screen.
It works that way by design, it can be configured in the conf editor:
screen/minimum-aspect-ratio=0.1
I also noticed sometimes when I open a video from file explorer, the player will flash a purple vanilla mpv drag files to play here icon for 1s before the video starts. It happens more often if window-maximized is enabled.
The vanilla icon is baked into the vanilla osc.lua, a better solution would require modifying osc.lua, it is somehow difficult to fix.
I know this has been asked numerous times the past year-or-so, but is there really not going to be a basic remember playback position implementation come to light ?
In the default input.conf of mpv.net there is:
Q quit-watch-later #menu: Exit Watch Later
https://mpv.io/manual/master/#command-interface-quit-watch-later
If that is not what you want, you can try to find a user script and make a feature request on the mpv and mpv.net issue trackers.
is it possible to assign a specific audio renderer to be used in mpv.net ? E.g. I would like to use the "Sanear Audio Renderer" because it allows me to switch the output device and wasapi exclusive mode during playback.
I don't know much about this topic, the documentation is here:
https://mpv.io/manual/master/#options-audio-device
I want to use a simple script "clock.lua" which constantly shows the current time on the lower-left corner of the video screen.
However, I can't bind a key (in MPV work).
Could you provide me some help?
If your key binding is in the script, it will not work by design or missing libmpv functionality, but you can create a binding in input.conf
It can now be found in the manual:
https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#scripting-limitations-lua-and-javascript
brad86
18th July 2021, 16:47
If that is not what you want, you can try to find a user script and make a feature request on the mpv and mpv.net issue trackers.
It is not. This is the default action that myself and many others have mentioned often in the issue tracker. This method remembers screen size/state, current volume levels, and many other settings for that individual video. Most of us just want a simple playback position remembered, with none of the other stuff.
stax76
18th July 2021, 21:39
It is not. This is the default action that myself and many others have mentioned often in the issue tracker. This method remembers screen size/state, current volume levels, and many other settings for that individual video. Most of us just want a simple playback position remembered, with none of the other stuff.
I'm sorry, it's not something I've interest to build.
The only related script I found is this:
https://github.com/NurioHin/mpv-bookmarker
cvrkuth
27th July 2021, 14:18
If your key binding is in the script, it will not work by design or missing libmpv functionality, but you can create a binding in input.conf
It can now be found in the manual:
https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#scripting-limitations-lua-and-javascript
I don't get it ... Tried to edit input.conf and put in last line this:
"h script-binding clock/show-clock"
What I am doing wrong here!?
KrazyLurt
27th July 2021, 16:11
For me, this (in osd-clock.lua) works:
-- defaults
local cfg = {
interval = '9999h',
format = "%H:%M",
duration = 2.5,
key = 'h',
name = 'show-clock'
}
cvrkuth
27th July 2021, 16:30
For me, this (in osd-clock.lua) works:
-- defaults
local cfg = {
interval = '9999h',
format = "%H:%M",
duration = 2.5,
key = 'h',
name = 'show-clock'
}
Trying to use the same script ... strange, it does not work here. Do you have Windows? Did you edit the input.conf file?
stax76
28th July 2021, 12:15
@brad86
There was a commit addressing the issue:
https://github.com/mpv-player/mpv/commit/1d1d1fbff9648e9adf7acf571514abf618ffc40f
@cvrkuth
If your script file is called osd-clock.lua, then your binding becomes:
h script-binding osd_clock/show-clock
Here is a guess:
It's an implementation detail and has something to do with almost all programming languages do not support Hyphen (minus sign) in function and variable names, as a workaround underscore is typically used instead.
The only language I know supporting Hyphen in function names is PowerShell.
cvrkuth
28th July 2021, 13:43
It's an implementation detail and has something to do with almost all programming languages do not support Hyphen (minus sign) in function and variable names, as a workaround underscore is typically used instead.
The only language I know supporting Hyphen in function names is PowerShell.
That is true, problem solved.
Thanks!
therube
29th July 2021, 16:05
If you set, (b)order:no, how do you drag, move, resize the player (other then being able to put it into fullscreen [& of course, setting border:yes])?
therube
29th July 2021, 16:09
Track (menu item)
Somehow ? audio can become deselected
& with that audio, is then "muted".
- This is different from Mute (in that Mute, UnMute, has no affect).
And with that, you simply do not get audio (presumably in that /session/ ?) unless you, Track (menu item), & "select" the audio track.
(I haven't been able to manually deselect audio or video from, Track (menu item), so not sure how I got into that situation, but I did.)
stax76
29th July 2021, 20:13
If you set, (b)order:no, how do you drag, move, resize the player (other then being able to put it into fullscreen [& of course, setting border:yes])?
Moving works with the left mouse button with and without border. Resize without border in mpv.net works only via shortcut key (Alt++ and Alt+-), because the Windows API does not provide a built-in mouse resize feature for borderless forms, I think. It works in mpv, I believe mpv has an implementation for it. It's not something I have interest to build unless a lot of people request it on the issue tracker.
Somehow ? audio can become deselected
aid=no generally is possible according to the mpv manual. But I don't know how to get there without running 'set aid no' by intend. I've never experienced this.
brad86
3rd August 2021, 19:48
Was just about to watch the new F&F film, and something is seriously wrong with the HDR handling. Not sure what is going on.
https://i.ibb.co/g4DxK5C/mpv-shot0001.png
chros
3rd August 2021, 19:57
Maybe it was DoVi? :)
brad86
3rd August 2021, 20:07
DoVi ?
EDIT: Silly me. Dolby Vision.
Not compatible with MPV then ?
JKyle
3rd August 2021, 22:43
It must be Dolby Vision Profile 5.
https://avdisco.com/uploads/default/original/1X/34572c0b9749856ee22c4a19032f55dc72e2604e.png
Profile 5 is playable on only Dolby Vision enabled devices. So it cannot be played properly on open source players like mpv, mpc, etc. The tonemapping is really weird if the Dolby Vision dynamic metadata is not properly parsed and applied by the player.
This is true even if you force-put HDR10-like metadata (SMPTE 2086) in the video stream by re-encoding or if you tonemap the Profile 5 source video down to SDR following the standard methods.
chros
3rd August 2021, 22:51
It's not just the metadata and tonemapping, but the colorspace is also different, as it's shown in the table.
brad86
4th August 2021, 07:54
@brad86
There was a commit addressing the issue:
https://github.com/mpv-player/mpv/commit/1d1d1fbff9648e9adf7acf571514abf618ffc40f
Looks to be exactly what I am after, thanks.
How does one go about using this, though ?
therube
4th August 2021, 17:53
(Win7. Not sure what happens in Win10 with LFN "enabled" in the OS?)
if you open a LFN (say a 255 chars name part [which you can do with drag&drop from Everything (https://www.voidtools.com/) [might need 1.5alpha, not sure?])
MPV.NET opens & plays the file just fine, but cannot "stat" it, Ctrl+M
(in a case like this, what is drag&drop'd is the SFN of that LFN'd file
i, Info, shows SFN
F8, shows SFN
though Ctrl+M is ineffective, nothing [seemingly] happens
[i suppose you're sending the LFN to MediaInfo in order to stat the file, but MediaInfo isn't "LFN aware".])
stax76
8th August 2021, 14:53
Looks to be exactly what I am after, thanks.
How does one go about using this, though ?
The documentation for it can be found here:
https://github.com/mpv-player/mpv/blob/master/DOCS/man/options.rst
Search for watch-later-options.
watch-later-options can be found in the mpv.net conf editor, for instance enter: start
Then only the start property is saved and restored.
Win7. Not sure what happens in Win10 with LFN "enabled" in the OS?
It works fine in Windows 10 with long path enabled. I only use API features that are available in Windows 7 to ensure Windows 7 compatibility, but actually setting up a Windows 7 debug environment is not something I would invest time for, too difficult anyway.
Maybe use an external app like so:
Ctrl+M run Z:\MediaInfo.NET\MediaInfoNET.exe "${path}" #menu: Tools > Open file with MediaInfo.NET
There is a new mpv.net beta release:
5.4.9.2 Beta (2021-08-08)
- Manual translated to simplified Chinese. (hooke007)
- watch-later-options support added to conf editor. (hooke007)
- Showing the playlist selects the currently played file/stream in the playlist.
- Properties are shown in the command palette instead of the text editor making it very easy to find a property and show/print its value.
- Support for --keep-open=no.
- Profile selection in the context menu.
- Use defaults in case settings.xml fails loading (not reproducible).
- conf editor support for keepaspect-window.
- Drawing flicker in the command palette was fixed.
- Saving window size and position was fixed.
- Some scroll bars were replaced with Windows 10 styled scroll bars, complex code used from HandyControl project.
- Some UI elements use rounded corners.
- The recent list can also be shown in the command palette: Alt+r script-message mpv.net show-recent #menu: View > Show Recent
- The recent context menu removes the folder info in case of very long paths.
- libmpv shinchiro 2021-08-01
brad86
8th August 2021, 22:44
Those watch later options are exactly what I was after. Thanks :)
brad86
9th August 2021, 08:45
Think I found a bug in the newest build.
Whenever I come out of fullscreen mode, mpv disappears to the task bar and does not come back when clicked on.
therube
9th August 2021, 17:33
Whenever I come out of fullscreen mode, mpv disappears to the task bar and does not come back when clicked on.
Cannot confirm, Win7 (non-aero).
therube
9th August 2021, 17:39
(Win7)
Showing the playlist selects the currently played file/stream in the playlist.
F8 (also via menu) looks to be ineffectual, Win7.
The recent list can also be shown in the command palette: Alt+r script-message mpv.net show-recent #menu: View > Show Recent
Shortcut looks to be ineffectual. And on my end looks to be, #menu: Open > Recent
stax76
9th August 2021, 20:05
@therube
It's required to reset input.conf, or update it manually, here are the defaults:
https://github.com/stax76/mpv.net/blob/master/src/Resources/input.conf.txt
therube
10th August 2021, 19:02
It's required to reset input.conf, or update it manually
Ah, that's got it, thanks :-).
stax76
22nd August 2021, 23:50
No problem.
After a longer coding session, I was able to port the WPF based context menu of the HandyControl project. The main reason I did this was rounded corners. There are a lot of more UI improvements and new png and webp screenshots here:
https://github.com/stax76/mpv.net
mpvnet 5.4.9.3 Beta
- Leaving fullscreen using keepaspect-window=no restores the correct size.
- Major UI rework!
- libmpv shinchiro 2021-08-15
Sorry if it works not correctly on Win 7, if that's true, then it can probably be fixed, please make a bug report in that case.
I'm happy how things went with the player, for some time I was thinking to do a Python script host, or Linux support or a WinUI port which would be the end of Win 7 support, but I don't think I do any of this but rather do something unrelated.
therube
23rd August 2021, 19:58
Sorry if it works not correctly on Win 7
Quick look looks good :-).
Actually, it isn't.
Start mpv.net
Show Commands, errors
Show Decoders, errors
Show Playlist, isn't doing anything, no, actually it errors
(this is starting with an empty, /portable_config/)
System.NulReferenceException: Object reference not set to an instance of object.
Once that happens, any focus away, focus back (to mpv.net) results in that message (re)appearing (until mpv.net is closed & reopened).
Show Profiles, errors
Show Properties, errors
Once that happens, any focus away, focus back (to mpv.net) results in that message (re)appearing (until mpv.net is closed & reopened).
Show Recent, errors
Once that happens, any focus away, focus back (to mpv.net) results in that message (re)appearing (until mpv.net is closed & reopened).
Command Palette, errors
Once that happens, any focus away, focus back (to mpv.net) results in that message (re)appearing (until mpv.net is closed & reopened).
Once that happens, any focus away, focus back (to mpv.net) results in that message (re)appearing (until mpv.net is closed & reopened).
And with that, even something like advancing through the timeline (arrow-keys), each arrow-key click causes that popup message.
(I've got another Win7 I can look at, but that won't be till tomorrow at the earliest.
I'm on, & use, Win7.)
stax76
23rd August 2021, 21:29
There is not a full stack trace? On the terminal, maybe?
therube
23rd August 2021, 21:41
Oh...
Starting from mpvnet.com, while some things (like F8) still fail, it is "silent", i.e., there is no (re-occurring) error message(s) displayed.
Microsoft Windows [Version 6.1.7601]
C:\mpv.net>mpvnet.com
(+) Audio --aid=1 (mp3 2ch 44100Hz)
AO: [wasapi] 48000Hz stereo 2ch float
A: 00:00:01 / 01:19:40 (0%)
[input] No key binding found for key 'MBTN_LEFT'.
[mpv.net] System.ComponentModel.Win32Exception (0x80004005): Error creating wind
ow handle.
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at mpvnet.MainForm.ShowCommandPalette() in D:\Projects\CS\mpv.net\src\Misc\Ma
inForm.cs:line 1146
at mpvnet.Commands.ShowPlaylistInternal() in D:\Projects\CS\mpv.net\src\Misc\
Commands.cs:line 411
[mpv.net] System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.Integration.ElementHost.Select(Boolean directed, Bool
ean forward)
at System.Windows.Forms.Form.set_Active(Boolean value)
at System.Windows.Forms.Form.WmActivate(Message& m)
at mpvnet.MainForm.WndProc(Message& m) in D:\Projects\CS\mpv.net\src\Misc\Mai
nForm.cs:line 876
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr
wparam, IntPtr lparam)
[input] No key binding found for key 'MBTN_LEFT'.
And from the GUI itself (starting from mpvnet.exe), Console doesn't show anything either.
(Open a file, hit F8, focus away, focus back.)
Also, I hadn't realized that these issues do not look to occur on Win10.
Dotnet 4.8 on Win7.
stax76
24th August 2021, 07:32
@therube
I've uploaded a new build and hope that it works now on Windows 7. This build disables code used for rounded corners in the command palette.
therube
24th August 2021, 16:06
5.4.9.4
I've uploaded a new build and hope that it works now on Windows 7.
(With a quick look), yes, that's better :-).
F8 opens as expected.
(Now I still get an error message when I ESC F8, but that has long been the case.
Similarly, I'll assume that I'll still get the other same errors that I've come across over time...
Microsoft Windows [Version 6.1.7601]
C:\mpv.net.5494>mpvnet
Behavior of playlist-pos when writing the same value will change (currently restarts, it will stop doing this).
(+) Audio --aid=1 (mp3 2ch 44100Hz)
AO: [wasapi] 48000Hz stereo 2ch float
A: 00:00:01 / 01:19:40 (0%)
[input] No key binding found for key 'MBTN_LEFT'.
[mpv.net] System.NullReferenceException: Object reference not set to an instance
of an object.
at System.Windows.Forms.Integration.ElementHost.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
I'll test further...
[With 5.4.9.3, on my other Win7 system, it had the same issues as reported yesterday & the same relative lack of information from Console.])
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.