Log in

View Full Version : mpv.net media player


Pages : [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15

stax76
31st August 2017, 02:49
mpv.net is a modern desktop media player for Windows based on the popular mpv player.

https://mpv.io

https://github.com/mpvnet-player/mpv.net

https://i.postimg.cc/wBbv1f04/mpvnet.png

stax76
31st August 2017, 03:50
I'm going to create 'Video player usage 2017' poll thread, any suggestions regarding possible options? So far I have:

jriver
kodi
mpc-be
mpc-hc
mpv
plex
potplayer
vlc
zoomplayer
other

The winner is obviously mpc-hc but still could be a interesting thread.

huhn
31st August 2017, 05:20
mpdn, windows media player/windows video app.

the last thread kind of like this was deleted.
doom9 is not the place the "default" PC user is going to be.
and not sure what someone can learn from let's say 20-1000 votes...

stax76
31st August 2017, 06:47
Why was it deleted? I find such polls usually very helpful.

huhn
31st August 2017, 08:10
i'm not a mod. and the thread was only kind of like that planned poll.

the only thing you get from 20-1000 votes is a wrong idea nothing else.

pirlouy
31st August 2017, 18:33
Still, it won't harm anybody, it's just one thread anybody can avoid.

stax76
31st August 2017, 19:50
I did this for me, staxrip and windows programmers, with feedback like this it's indeed unlikely to become useful to a lot of people. ;)

stax76
2nd September 2017, 04:37
The first release is now available to download, new features are C# scripting and a configurable context menu and I've updated the website with a description and a image showing the new menu.

Feel free to ask questions about mpv or mpv.net usage and how to write a script or addon, if there is interested I'll create a development thread. There is a C# and a VB.NET addon included.

https://github.com/stax76/mpvnet

kuchikirukia
2nd September 2017, 14:50
Set volume to mousewheel by default.

stax76
2nd September 2017, 16:48
Yes, mouse wheel changes volume by default, don't you think it's a good choice?

https://github.com/stax76/mpvnet/blob/master/mpvnet/Resources/input_conf.txt#L21

ashlar42
2nd September 2017, 16:59
Do you plan on providing access to configuration through a GUI or is everything going to be kept in text files?

stax76
2nd September 2017, 17:31
If I do a config GUI then it will be search-able, that is sure. I don't have great code I can re-use, my encoder GUIs in staxrip don't scale for 200+ settings and the look and feel is mediocre, with that code 600 settings would probably take 3 seconds to load. I'll certainly collect ideas how a very good GUI could work and look like.

Milardo
2nd September 2017, 18:35
Hi stax76,

Is it possible to make your version of mpv-support video/audio directshow filters?

stax76
2nd September 2017, 19:16
Hi Milardo,

I used my own dshow player before mpv and first I wanted to improve it but it's a huge task to built a complete player almost from scratch so I evaluated all options for a while and mpv is what I liked most in the end, for mpc I would have needed two years to become fluent in C++. In case somebody wants to build a dotnet dshow player my code is here:

https://github.com/sharp-player/sharp-player

mpv probably won't support dshow, for some time I thought about having two playback engines, like dshow and libmpv, it could be done and might make sense but only if you have a lot time and interest, in StaxRip normally I try to support different encoders, it supports both avisynth and vapoursynth equally well and I'm very happy with the decision to support vapoursynth. Doing a player with two playback engines is much more difficult I think and most players don't get it right even with only one. I don't have enough time and interest for both so I decided to focus on one and make the best out of it.

Milardo
2nd September 2017, 21:36
Hi stax76,

Thanks for the reply. Ok, just wondering though, would the below work? I'm not sure even if it supports all types of video/audio directshow filters, or that it's readily usable with mpv.

http://oss.netfarm.it/dsnative/

kuchikirukia
3rd September 2017, 01:40
Yes, mouse wheel changes volume by default, don't you think it's a good choice?

https://github.com/stax76/mpvnet/blob/master/mpvnet/Resources/input_conf.txt#L21

I do. I assumed without checking. Sorry 'bout that.

stax76
3rd September 2017, 02:21
@Milardo

The mpv docs and github issue tracker don't mention directshow, support for it is unlikely.

stax76
3rd September 2017, 10:51
New script that also works with mpv:

When seeking displays position and duration like so:

00:00 / 120:00

this is different from MPC which uses:

00:00:00 / 02:00:00

https://github.com/stax76/mpvnet/blob/master/Scripts/seek-show-position.js

pirlouy
7th September 2017, 14:10
If you're OK with questions:
Which is the default video output by default on Windows ? (i've tried to search the manual, but there are a lot of references for Linux but not that much for Windows)
And which one is it advised to use ?

stax76
7th September 2017, 15:39
I believe it's opengl, I'm not sure what ways exist to find out what the current vo is, when you start mpv from cmd shell (type either mpv or mpv.com) it prints the vo along with some other info to the shell. What I found the shell most useful for so far is debugging scripts as it also prints errors in scripts and config files.


D:\Software\Medien\Player\mpv>mpv D:\Temp\test.mkv
Playing: D:\Temp\test.mkv
(+) Video --vid=1 (*) (h264 1280x720 29.970fps)
(+) Audio --aid=1 --alang=ger (aac 2ch 44100Hz)
AO: [wasapi] 48000Hz stereo 2ch float
VO: [opengl] 1280x720 yuv420p
AV: 00:00:17 / 00:01:41 (17%) A-V: 0.000

aufkrawall
7th September 2017, 17:47
Don't use mpv's Direct3D renderer, it's incomplete and what not.
Default is always OpenGL.

However, you have to choose between different presentation backends for it.
On Windows, there are
ANGLE (allows D3D11VA without copyback, but that combination leads to banding with 10 bit video)
WGL (I guess that's used also by games which run in windowed mode)
dxinterop (frames are presented by DX9, "experimental", allows native DXVA2 decoding with the same quality issues like for madVR, may be troublesome with Radeons and Optimus)

For me with GTX 1070 without Optimus, dxinterop works flawlessly. WGL shows stuttering with interpolation + any hardware decoding (I probably should report that).
dxinterop also worked here with Skylake IGP.

pirlouy
7th September 2017, 19:45
What's the best way to have madVR SmoothMotion ? From what I read, I think it's something like
vo=opengl-hq
video-sync=display-resample
interpolation=yes
tscale=oversample
Not sure if it's really as good as madVR SM.

aufkrawall
7th September 2017, 20:16
I don't find tscale=oversample convincing, I notice severe flicker with it. Default is Mitchell, which is very blurry for camera pans.
Probably linear comes closest to madVR, I personally use sinc which should be sharper than linear. Linear is the same as triangle, btw.

pirlouy
7th September 2017, 21:26
Unfortunately, video-sync=display-resample uses a lot of GPU. Not that they don't warn (https://github.com/mpv-player/mpv/wiki/Display-synchronization#display-sync), but you don't expect that much GPU. Maybe it's because of OpenGL, maybe it's because of algorithm. It is too complicated for me to know the reason.

As expected, madVR SmoothMotion is really good: good balance between blur and judder and not very high on GPU.

aufkrawall
7th September 2017, 21:40
I absolutely can't confirm this. I was able to use interpolation with my 6700K IGP without issues.

What if you try deband=no (deband=yes is included in opengl-hq profile)?
Have you already tried opengl-backend=dxinterop?

pirlouy
7th September 2017, 22:19
Indeed, debanding seems to be using GPU.
And for opengl-backend=dxinterop, I'm not sure if it does good or bad, but in terms of ressources, it looks the same.

pirlouy
16th September 2017, 23:23
I have to say... mpv is really interesting. :)
I took time to read the manual and the input.conf is really nice, you can bind actions like some FPS games. Really nice.
And in order to choose better settings, this script is mandatory (ok, with my limited experience): https://github.com/Argon-/mpv-stats

So indeed, on Windows, dxinterop is the way to go. Too bad, it adds a delay at startup: 1.5 seconds, compared to MPC (which launches video in less than 1 second). Maybe aufkrawall has a magic setting for that ?
In the end, I use little options:
autofit=600x600
slang=eng,fre,fra
loop-playlist=10

profile=opengl-hq
video-sync=display-resample
interpolation=yes
tscale=sinc
opengl-backend=dxinterop
What I really miss is the auto monitor refresh rate. There's one script for that, but you can't choose the monitor. Is there a "request" bug filled somewhere, that I can vote for ?

aufkrawall
16th September 2017, 23:56
opengl-backend=angle starts fastest for me, while win and dxinterop are a bit slower. Nothing too dramatic, but I got a fast CPU and no anti-virus software installed. I don't think it can be sped up.

There is "autospeed-monitor=0" in autospeedwin.lua.

pirlouy
17th September 2017, 01:05
ANGLE has bad performances compared to dxinterop.
For dxinterop slow start, I might fill a bug, maybe someone will have something...

Unfortunately the monitor number is not adapted in my case. I need refresh rate to change only on 1 monitor, and when it's the principal screen. I asked NirSoft if he can improve NirCmd, but I guess it will be complicated.
madVR is perfect for that.

aufkrawall
17th September 2017, 08:28
You already gave opengl-backend=win a try, didn't you?
I didn't suggest to use angle instead, I'd currently only do that if both win and dxinterop fail.

pirlouy
17th September 2017, 10:37
Yes I tried the 3. And with mpv-stats script, I can confirm dxinterop has by far better performance, which is confirmed by a lot of users.
When I did my test, I was with 382 nVidia drivers, but then I dit it again with last 385 drivers, and I got same results.

aufkrawall
17th September 2017, 10:55
I'd ignore any rendertime stats shown by video renderers as long as there are no playback oddities like dropped or delayed frames (which are shown by running mpv via CLI).
GPU usage according to driver is the same between win and dxinterop here with GTX 1070 and it's also pretty much the same compared to Linux with x11egl backend.
Only angle shows higher GPU load and power consumption and I'd thus consider it as a backup solution in case OGL driver on Windows is on a rampage.

I btw. once had a problem with renderstats script leading to performance issues. Since then I avoid using it.

Btw 2: My stutter problem with opengl-backend=win + hardware decoding copyback was caused by Windows balanced energy profile. It disappeared by using maximum performance profile. I've seen something similar on Linux with window compositors.

pirlouy
17th September 2017, 19:24
Today I've learned the "mpv-stats" script is often wrong with "pass timers".
The best way to compare backend (and performances in general):
1) put "maximum performance" in nVidia drivers settings (always when benchmarking) instead of "adaptive".
2) use
opengl-swapinterval=0
audio=no
untimed=yes
3) check "estimated Display FPS".

Angle and Win have same results, whereas dxinterop is behind !
So for now, I'll test "Angle" and verify if I have dropped frames at the end of video.

aufkrawall
17th September 2017, 19:34
I really fail to see why that would be a good way to determine performance differences between the backends.

pirlouy
17th September 2017, 19:49
It's not only backends, it's for performance in general.
I got that information on IRC from this guy: https://github.com/haasn
He seems to know a lot. :D
On his branch he works on Vulkan and explained the advantages of Vulkan that obviously I did not understand.

But you are right to doubt me since I know little from this player or OpenGL.

aufkrawall
17th September 2017, 19:53
He seems to know a lot. :D

Probably because he's a very active developer of mpv. :o

Well, it wouldn't hurt to take a look at the GPU load & clock at the same time too imho.

pirlouy
17th September 2017, 20:55
Yes I did not tell, but I use Open Hardware Monitor to check usage. So GPU frequencies are at max, and usage is at 80% (the maximum the card can do). The only difference is dxinterop displays less fps.

aufkrawall
23rd September 2017, 13:46
I'd suggest using the latest nightly build since last few release versions had a problem with chroma channel alignment when using hardware decoding:
https://sourceforge.net/projects/mpv-player-windows/files/
However, config variables have changed a lot lately because of renderer refactoring (old variables still work though).

xabregas
21st October 2017, 19:35
whats the difference between opengl and opengl-hq?

From what ive seen this is a very nice alternative to d3d and it plays everything without the need to change any setting even HEVC 4k with very high bitrates. It plays it with accurate color output. Opengl FTW.

aufkrawall
21st October 2017, 19:59
opengl-hq is only a profile with certain quality settings for the OpenGL renderer.
There are better scalers available though, like jinc.

xabregas
21st October 2017, 21:20
Here is my config file:

vd-lavc-threads=16
hwdec=auto
profile=gpu-hq
sub-font=Arial Black
sub-border-color=#ff000000
sub-border-size=1.25
sub-font-size=42
volume=40
audio-pitch-correction=yes
volume-max=100
vf-add=lavfi=[pad=aspect=1.77778:x=(ow-iw)/2:y=(oh-ih)/2]

Can i improve something?

Although subtitles are much better now i feel they can go below video a bit more. Need to figure it out :sly:

Another thing i dont know is if opengl-hq is affecting videos that dont need image up or down scaling.

aufkrawall
22nd October 2017, 10:21
mpv --show-profile=opengl-hq
Profile opengl-hq:
profile=gpu-hq
scale=spline36
cscale=spline36
dscale=mitchell
dither-depth=auto
correct-downscaling=yes
sigmoid-upscaling=yes
deband=yes
Deband is always on with that profile, and ofc the spline chroma scaler might also be noticed over bilinear when there is no luma scaling.
Really dunno about subtitles.

xabregas
22nd October 2017, 13:21
mpv --show-profile=opengl-hq
Profile opengl-hq:
profile=gpu-hq
scale=spline36
cscale=spline36
dscale=mitchell
dither-depth=auto
correct-downscaling=yes
sigmoid-upscaling=yes
deband=yes
Deband is always on with that profile, and ofc the spline chroma scaler might also be noticed over bilinear when there is no luma scaling.
Really dunno about subtitles.

Yes. For 4k i need to disable opengl-hq and use opengl instead because opengl-hq gives me bad color with hevc 10 bit content and higher cpu usage. Opengl gives me correct colors plus lower cpu usage for HEVC 10 bit videos 4k or not.

aufkrawall
22nd October 2017, 14:39
Mind to provide a screenshot?
opengl-hq should in no way influence colors (except of removing banding). It shouldn't have any influence on the CPU either.

Again: mpv by default always uses a OpenGL renderer (at least currently, D3D11 and Vulkan are in the making or already mostly completed), "opengl-hq" is only the above preset of certain quality settings. There is no "opengl" vs. "opengl-hq". ;)

I btw. don't think it's necessary to provide a --vd-lavc-threads setting.
If your system isn't entirely crappy, you can use --video-sync=display-resample for better frame timing and it should also be save to use --hwdec=dxva2-copy.

We also already had a discussion about --opengl-backend=... in this thread. Default is angle, which I wouldn't advise for best performance (or not at all, if possible).

xabregas
22nd October 2017, 16:51
Do i need to use any order in giving options to the config file?

Meaning, should --profile= come first than --hwdec= or after?

Sometimes is hard for me to tell if hwdec was used or not. I needed to search for the log command so i realized the decoding always fall back to software decoding. probably no need for 16 threads neither hwdec= setting.

As for the smooth --video-sync=display-resample i feel its similar to madvr smooth motion without losing so much sharpening. Anyway not to my taste. :D

Mind to provide a screenshot?«

PS: Well i need the screenshot command please ;)

aufkrawall
22nd October 2017, 16:58
Without --interpolation, --video-sync=display-resample doesn't introduce any visible blur or whatever.
The order is not relevant for config entries, maybe except of some special video filters.

Screenshots:
https://mpv.io/manual/stable/#taking-screenshots
You can ofc also just press the print screen and insert it into Paint.

You can drag&drop video files onto mpv.com to see the console with information about playback (or start it via shell). Current git version also got overlay script integrated (shift + i), which is also available as a userscript.

pirlouy
22nd October 2017, 17:03
I'm fine with opengl-backend=Angle, better performance than dxinterop. :p
For config file, you don't need --. Just profile=opengl-hq in config file. Order is not important.

Curious about the next version with new gpu-api settings. :D

pirlouy
2nd November 2017, 20:54
I was wondering if there is some equivalent for madVR option "automatically detect hard coded black bars".
There's a script (autocrop), but it is not automatic like madVR option.

With madVR, 1 option, and it does the job without taking too much ressources (well... I think).

stax76
11th March 2019, 22:01
Version 1.0 is out with a much more feature packed context menu.


Keybinding and context menu conf file:

https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input_conf.txt


Download:

https://github.com/stax76/mpv.net/releases


Screenshot:

https://raw.githubusercontent.com/stax76/mpv.net/master/screenshot.png

stax76
13th March 2019, 16:55
Working on IronPython integration now maybe a german dev kan help me with my curent issue described here:

https://social.msdn.microsoft.com/Forums/de-DE/a8ba1f9c-0735-4419-83f8-db32bfb77461/frage-zu-multi-caret-editing-shortcuts?forum=offtopicde