Blur Busters Forums

Who you gonna call? The Blur Busters! For Everything Better Than 60Hz™ Skip to content

Trying to find solution, to watch youtube with g-sync

Everything about displays and monitors. 120Hz, 144Hz, 240Hz, 4K, 1440p, input lag, display shopping, monitor purchase decisions, compare, versus, debate, and more. Questions? Just ask!

Trying to find solution, to watch youtube with g-sync

Postby wenarlin » 23 Jan 2019, 16:29

Trying to find solution, to watch youtube with g-sync without downloading video
pg279q, 4790k, asus m7h, gtx970, 16gb RAM, asus xonar DGX
User avatar
wenarlin
 
Posts: 6
Joined: 17 Feb 2018, 13:21

Re: Trying to find solution, to watch youtube with g-sync

Postby RealNC » 23 Jan 2019, 16:41

You can use SMPlayer. During the installation, select the "mpv" backend, NOT "mplayer". In the smplayer settings, in the "network" section, set the "support for video sites" setting to "mpv + youtube-dl". You can now drag and drop videos and video links from youtube to the smplayer window.

However, this will probably result in a suboptimal video format being streamed. If you want to always use the high quality formats of youtube (best is VP9, H.264 is the fallback), and also use the best scaling filters, then in the "advanced" section in the settings, in the "options" field, enter this:

Code: Select all
--msg-level=ffmpeg=error --blend-subtitles=video --scale=ewa_lanczossharp --dscale=mitchell --ytdl-format bestvideo[ext=webm][width<=?2560]+bestaudio/bestvideo[ext=mp4][protocol!=http_dash_segments][width<=?2560]+bestaudio/best

This is optimal for a 1440p display (2560x1440). This is best even for 1080p displays, since youtube uses a much better bitrate for 1440p
streaming which doesn't have the compression artifacts that their 1080p encoding do.

If still want to limit the video streaming to 1080p though, then use this instead:

Code: Select all
--msg-level=ffmpeg=error --blend-subtitles=video --scale=ewa_lanczossharp --dscale=mitchell --ytdl-format bestvideo[ext=webm][width<=?1920]+bestaudio/bestvideo[ext=mp4][protocol!=http_dash_segments][width<=?1920]+bestaudio/best

Finally, in the "general" section, in the "video" tab, you should select "gpu" or "opengl" as "output driver", depending on which one actually results in working g-sync in fullscreen mode. (Press "f" while watching a video to switch to fullscreen and back.)

It's been a while since I used smplayer in Windows (I use Linux), so it might not work the same anymore. I'll give it a try later today to see if something changed in regard to g-sync.

You can tell if g-sync is working by swithing to fullscreen and moving your mouse. If the mouse cursor is jerky and low FPS, then g-sync is working. When viewing a 30FPS video for example, the mouse cursor would move with 30FPS too because of g-sync. If it instead moves as fluid as on the desktop (144Hz or whatever your monitor is), then g-sync is not working.
TwitterSteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.
User avatar
RealNC
 
Posts: 2715
Joined: 24 Dec 2013, 18:32

Re: Trying to find solution, to watch youtube with g-sync

Postby wenarlin » 23 Jan 2019, 18:13

aww the g-sync isnt working, no opengl option (
Image
pg279q, 4790k, asus m7h, gtx970, 16gb RAM, asus xonar DGX
User avatar
wenarlin
 
Posts: 6
Joined: 17 Feb 2018, 13:21

Re: Trying to find solution, to watch youtube with g-sync

Postby RealNC » 23 Jan 2019, 18:43

OK, found the solution. You need another advanced option. Select "gpu" as the output driver, but in the advanced options, paste this:

Code: Select all
--gpu-api=opengl --gpu-context=win --profile=gpu-hq --msg-level=ffmpeg=error --blend-subtitles=video --scale=ewa_lanczossharp --dscale=mitchell --ytdl-format bestvideo[ext=webm][width<=?2560]+bestaudio/bestvideo[ext=mp4][protocol!=http_dash_segments][width<=?2560]+bestaudio/best

G-Sync now works for me. The important options are "--gpu-api=opengl --gpu-context=win". By default, opengl is translated to direct3d using the ANGLE libraries, which is made for people who use GPUs that don't have good opengl drivers (like integrated graphics.) G-Sync doesn't appear to work when doing this, so when telling mpv to use the native opengl driver with these two options, g-sync works.

(Tip: to see what FPS the video you're watching has, press Shift+i. For 30FPS videos, you should get a very stuttery mouse cursor.)
TwitterSteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.
User avatar
RealNC
 
Posts: 2715
Joined: 24 Dec 2013, 18:32

Re: Trying to find solution, to watch youtube with g-sync

Postby wenarlin » 23 Jan 2019, 18:58

RealNC wrote:Update: "--opengl-backend=win" is deprecated and will be removed in future versions of mpv. The replacement is these two options: --gpu-api=opengl --gpu-context=win

So use this instead:

Ok Thank you very much, it is working fine.
Btw im watch to monitor buildin FPS indicator, if g-sync works - the fps indicator will be in dynamic action, otherwise it shows static "165" or the current refresh rate
https://www.youtube.com/watch?v=2ToQxYlkUqc
pg279q, 4790k, asus m7h, gtx970, 16gb RAM, asus xonar DGX
User avatar
wenarlin
 
Posts: 6
Joined: 17 Feb 2018, 13:21

Re: Trying to find solution, to watch youtube with g-sync

Postby RealNC » 23 Jan 2019, 19:26

One last option I forgot is "--profile=gpu-hq". This enables maximum quality video processing (scaling, chroma conversions, shaders, etc.) I already use that on Linux but I forgot to copy that option over to Windows.

I updated my previous post to include that option. You have a GTX 970, which should be powerful enough to use this (AFAIK, only slow, integrated graphics can be too slow for it.)

There's many other options mpv has. For example you can do FPS interpolation to round-up 25FPS videos to 30FPS for example if you decide to not use g-sync. For that to happen, you'd add the "--interpolation" option. This will convert videos to an FPS that can be displayed without judder. Although g-sync is probably better here, because FPS interpolation adds motion blur.

Finally, sometimes youtube (and other video sites) change things in a way that stops mpv from being able to stream their videos. The youtube-dl utility that is bundled with smplayer is responsible for grabbing the stream links from these sites, and it needs to be updated when a site stops working. Unfortunately, the way to update the youtube-dl utility is not automatic. You have to open a command prompt in administrator mode, and then update youtube-dl manually:

Code: Select all
cd c:\program files\smplayer\mpv
youtube-dl --update

If it prints a message that says it updated to a new version, you then need to wait when it says "Waiting for file handle to be closed". After a few seconds, it will say "Updated youtube-dl to version ..." at which point you can close the command prompt window.
TwitterSteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.
User avatar
RealNC
 
Posts: 2715
Joined: 24 Dec 2013, 18:32

Re: Trying to find solution, to watch youtube with g-sync

Postby wenarlin » 23 Jan 2019, 20:05

Image

OK updated option string
You are really nice specialist :roll:
have a nice day
Last edited by wenarlin on 24 Jan 2019, 19:23, edited 1 time in total.
pg279q, 4790k, asus m7h, gtx970, 16gb RAM, asus xonar DGX
User avatar
wenarlin
 
Posts: 6
Joined: 17 Feb 2018, 13:21

Re: Trying to find solution, to watch youtube with g-sync

Postby RealNC » 23 Jan 2019, 20:11

It's up to date because you just installed smplayer, which downloaded the most recent youtube-dl version. I'm just saying that if one day youtube videos stop working, then this is usually because you need to update it.
TwitterSteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.
User avatar
RealNC
 
Posts: 2715
Joined: 24 Dec 2013, 18:32

Re: Trying to find solution, to watch youtube with g-sync

Postby Chief Blur Buster » 24 Jan 2019, 22:12

Using VRR to smooth video playback (23.97fps, 24fps, 25fps, 30fps, 59.94fps, 60fps) is clever.

SMPlayer is one of the few VRR-friendly video players that does a good job of that.

Now YouTube needs to add HFR 120fps support!
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

       To support Blur Busters:
       • Official List of Best Gaming Monitors
       • List of G-SYNC Monitors
       • List of FreeSync Monitors
       • List of Ultrawide Monitors
User avatar
Chief Blur Buster
Site Admin
 
Posts: 6267
Joined: 05 Dec 2013, 15:44


Return to General — Displays, Graphics & More

Who is online

Users browsing this forum: No registered users and 11 guests