Jump to content

Question about mpv scripts


srolomc

Recommended Posts

Guest asrequested

OK, well, if you want to use your conf to enable interpolation, you can see if it's working by using this stats script. You can't toggle it, so it will just be on. Add this line to your conf, to resize the text.

 

osd-font-size=20

Link to comment
Share on other sites

Guest asrequested

If I turn interpolation on in Emby that is when it hangs and never loads the video. It also never creates an MPV log file even though I added one to the config, so it sounds like mpv is never getting started. If I turn interpolation on in the config file the movie does play in Emby, although Im not 100% sure if it's actually enabled or not. If I run it standalone with your script and interpolation on, it does say enabled in the stats.

 

When you enable it in the conf, does the playback improve?

Link to comment
Share on other sites

srolomc

I updated my drivers last night before going to bed, so I will try to do a little more testing today with the latest, although I had updated my drivers fairly recently before last night. I will try your script to see if interpolation is enabled or not through Emby when I set it in the conf file and get back to you.  And yes it does sound like maybe it is a combination of settings causing the issue where the video does not play, if I have time I can try playing around with different setting combinations to see what happens

Link to comment
Share on other sites

srolomc

I was able to verify that interpolation was on when enabling it through the conf file using your stats script; I did not notice a change in performance with it on though. Emby still does not play a video when I select interpolation through the GUI though.  I am playing with some video card settings to see if I can reduce the stutter, and I will try running at 59 hz as well.

Link to comment
Share on other sites

srolomc

So the only real suspicious thing that I noticed was the FPS vs estimated FPS a shown in the attached picture.  I watched a different movie for a minute or two where those two values matched and I did not notice any stuttering at first glance.  Now when I was doing this I accidentally had "Enable Video Display Syncing" enabled in Emby, and I also had OpenGL high quality turned on (although I doubt the OpenGL high quality setting caused any issues). I turned them off and the stuttering seems to have mostly gone away.  Does anyone have any thoughts on this? Maybe display syncing is causing an issue here? And for reference I have an Nvidia GTX 1060 and i3-4160 in case that info helps.

post-32402-0-31246600-1499106180_thumb.jpg

Link to comment
Share on other sites

Guest asrequested

Opengl hq uses three scalers and requires more processing. That may be your issue. Try with different HWA settings.

Link to comment
Share on other sites

markyp

I remember someone also mentioning setting OpenGL hq in the gui overrides the conf settings..

 

Maybe that's what your seeing?

Edited by markyp
Link to comment
Share on other sites

Guest asrequested

The settings in the UI will override the corresponding settings in the conf. And some settings require other settings to also be set. If you want to use your conf, disable everything the UI. The scalers can conflict. In your testing, I would only try one setting at a time. You may just be asking your GPU to do too much.

Link to comment
Share on other sites

srolomc

So far it seems to me that the biggest problem is having the following setting: video-sync=display-resample. If I have that on, I see both delayed and dropped frames in the stats window, and of course stuttering probably as a result of that.  I have a hard time believing that the other high quality settings would be giving my GPU trouble since it's pretty new, and even though this is kind of an apples to oranges comparison since it's different software, I've used what I think are much more taxing settings in MadVR, so I would think they should not cause a problem in MPV.  Hardware acceleration does not seem to have much of an effect either, it mainly seems to be that video-sync setting. It's possible it's just an issue with this video...Again if I do not have it set to display-resample I do not see any dropped or delayed frames in the stats display in Emby. According to the mpv documentation it doesn't seem like I can use interpolation either if video-sync is not set to one of the display-* modes.

Link to comment
Share on other sites

srolomc

I just tried it, for some reason I did not see any dropped frames recorded, but there was visible stuttering when running in standalone mpv which I have seen before.  The difficulty is that the stuttering is inconsistent, it does not always happen at the same point in a video so tracking the problem is a little tough.  But I do see stuttering in both standalone mpv and through Emby.

Link to comment
Share on other sites

Guest asrequested

And that was with no conf, just the raw player? Make sure you're not using the player that has Opengl hq in its own conf. The one I got, has.

Link to comment
Share on other sites

srolomc

When I tried display-resample in mpv through Emby, opengl-hq was not enabled.  When I tested it in standalone MPV later I did have it re-enabled in the config; however when I turned display resample off it ran much better.  If I have some time tonight I can retest both cases with a blank config except for enabling display-resample. The one thing I did notice either way with various configs was better performance with display-resample disabled. 

Link to comment
Share on other sites

srolomc

I tried it standalone again with nothing enabled in the config except for display-resample, and then with it off. The stuttering seems to happen more often when it is enabled; however, it's difficult to debug this because the stuttering is quite inconsistent.  I can watch the same video twice in a row, and it will happen a different amount and in different places each time, so it does make it a bit frustrating to debug.  Sorry I can't provide much more info.  I'm starting to think it's just with this video at least, but I haven't watched too many other things with mpv yet.

Link to comment
Share on other sites

srolomc

I've tried setting everything to bilinear which should be the least taxing I think, but I can try that. I tested with interpolation at one point and didn't see an improvement, but I'll try again maybe with the threshold option too.

Edited by srolomc
Link to comment
Share on other sites

srolomc

Interpolation did not help. I do appreciate the help guys. This video is variable framerate, I wonder if that would cause an issue?

Link to comment
Share on other sites

Guest asrequested

Well, I'm pretty much out of ideas. It might just be that mpv doesn't play well with your GPU. You can still use MadVR for video, but live TV will use mpv.

Link to comment
Share on other sites

srolomc

Yeah I'm out of ideas too, but thanks for your help I appreciate it, I think I'll switch back to madvr for now. I am excited about the prospect of having Emby run in Linux though, so I may try a few more things if I have anymore ideas. I'll report back if I get it working.

Link to comment
Share on other sites

srolomc

At this point it appears the least stuttering I see is with Hardware Acceleration set to none, and I believe video syncing off.  I would have thought that I would see better performance with hardware acceleration on, so that seemed strange to me.

Link to comment
Share on other sites

Guest asrequested

Well, that would imply that mpv isn't working well with your GPU, as setting to no means it's software decoding. Have you looked on the Nvidia message boards?

Link to comment
Share on other sites

srolomc

I didn't specifically look on boards for my video card working with mpv, so I'll do a little searching and see what I can find.

Link to comment
Share on other sites

srolomc

So I just wanted to give an update with where I am on this; I have tried the following things (one more thing for everyone to keep in mind is that I am upscaling to 4k):

 

- I rolled back to an earlier Nvidia driver; this actually seemed to slightly help, but I still noticed a bit of stuttering.

 

- I took out my Nvidia GPU and and used the integrated Intel graphics.  This was the only other video card I could test with.  I noticed the same stuttering as with the other GPU.  For this test I had all the default mpv settings (i.e. no open-gl hq), and I also tried with and without hardware acceleration.

 

- I tried watching the same video on MPV in Linux with the Nvidia GPU noticed the same stuttering.  My config file was empty for this; this was just a quick test.

 

- I completely reinstalled Windows and tried this again with the Nvidia card.  Watching live TV, which runs at 1080 30fps causes visible frame drops with or without hardware acceleration.  I had open-gl hq turnned off and scaling set to bilinear.

 

After seeing all of this I definitely am questioning the video card/drivers.  So I decided to try Emby 2.5.4 again with madvr, and it actually does look to me like it may be stuttering a bit, but I have the following question: Since I was able to see dropped frames when running with the new version, I wanted to see if I saw those numbers increase in the old version.  When I try to look at info (ctrl + j), I get a small display with not a lot of information (it looks like the display from the new version).  Since this is an old version with madvr I expected to see the madvr prints.  I completely uninstalled the new version of Emby before trying this, so any ideas why I am not able to see the madvr display info?

Link to comment
Share on other sites

Because that's not implemented at this point. We have hooked the stats feature into MPV to draw data directly from MPV. We have not taken the time to do the same for madvr as of right now.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...