I am playing an 1080p x265 mp4 movie in potplayer. https://i.imgur.com/wSe1HK0.png is how the movie originally looks like. Look at the guy's face, the mountain behind the guy and the castle in the distance. They look acceptable.
I enabled adaptive sharpen which is https://i.imgur.com/48lWP8g.png under the shader settings. https://i.imgur.com/qhIowPv.png is how the movie looks like after adaptive sharpen is enabled. The guy's face, the mountain behind the guy and the castle in the distance are more detailed and they look sharper and before adaptive sharpen was enabled they looked a bit blurry.
Next I enabled edge sharpen which is https://i.imgur.com/aZV6Njd.png. https://i.imgur.com/yIS52gd.png is how the movie looks like after edge sharpen is enabled. As you can see I got a thin white line on the top. Edge sharpen was enabled under post resize. If I enable it under pre resize then the thin white line goes away and I got https://i.imgur.com/8vXcBk3.png. Now it looks a bit better than when edge sharpen was not enabled.
https://i.imgur.com/Ic1NIeo.png is my current shader settings. I want to ask are there any custom shader files that I can add to the shader folder which is C:\Program Files\DAUM\PotPlayer\PxShader so I can make the movie look even nicer? The shader files are .txt files. Potplayer also accepts shader files which are .hlsl but it doesn't recognize shader files which are .glsl.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 30 of 38
Thread
-
-
What looks best comes down to personal preference and how you view the content has a major impact here (viewing distance, screen size, screen resolution, etc.).
- A sharp luma scaler, if one is used (ex: upscale to 1440p, 4K screen) will increase sharpness.
- As for shaders:
you can also try sharpen complex variants or tuning the parameters inside the shaders. -
I am watching movies on a 43 inch 1080p tv and I am sitting nearly 2m from the screen
I don't understand. There are other sharpen options under shaders but they caused problems and a thin white line appeared on the top. I got the best result by using edge sharpen in the pre resize and adaptive sharpen in the post resize. I want to know are there any external shader files that I can add to potplayer to make the movie look even nicer? -
The shaders have internal parameters to adjust the strength of the effect. The default values can be changed by editing the code.
Sharpeners aren't typically designed to be chained, so you may need to lower the strength to limit artefacts and yes the order in which you chain matters here.
I don't know what is provided (or the naming) with potplayer but other popular hlsl sharpeners would be Lumasharpen (a light sharpener) and Sharpen complex. -
Am I able to use another shader which is not a sharpener to improve how the movie looks?
-
You could try adding a small amount of filmgrain after sharpening which might help at hiding the artefacts and making the picture look more natural. This could be done with a shader.
- Based on the provided screenshot, the source is mediocre. Sharpening it enhances detail in some areas, but in other areas (ex: the castle) it only highlights that detail is missing from the source.
- Sharpening also introduces artefacts.
- You are displaying the source resolution (no upscaling) fairly close-up and traditional (non-AI) methods don't create detail. -
To get the benefit of watching video on a 4K screen you will need better quality sources IMO.
Upscaling has the potential to improve perceived quality, but at 2x upscale, encode artefacts are more visible by default. -
glsl is a different shader programming language. You would need to translate it to dx9 hlsl to use it with potplayer (assuming you are using a dx9 renderer, otherwise dx11 hlsl).
This isn't always easy to do. -
Please see https://www.reddit.com/r/mpv/comments/vdgivi/what_are_some_very_high_quality_video_shaders/. It mentions FSRCNNX and AviSynthAiUpscale. They are the best scalers but they are glsl. You know shaders and you made your own shaders. Are you able to convert FSRCNNX and AviSynthAiUpscale to dx11 hlsl and dx9 hlsl?
-
-
Ok. So Potplayer can't directly read glsl and it needs madvr to read it?
also i want to ask you about filmgrain. it adds dots to the movie. sweetfx filmgrain adds even more dots to the movie. if i am close to the screen then i can see the dots and it's not nice. i have to move away from the screen so that the dots are not visible and the movie looks nice. is this how it's supposed to work? also which filmgrain is better? the normal one or sweetfx filmgrain?
currently i am using edgesharpen v1_1 and sharpencomplex in pre resize shaders and adaptive sharpen and filmgrain in post resize shaders. i have some 1080p x265 mp4 movies which were encoded by using 2000kb/s video bitrate by using the default encoder settings. the file size is between 1.5gb and 3gb depending on the movie. it's subjective. there are people who say using 2000kb/s video bitrate is too little so the movie doesn't look nice and there are other people who say that it's acceptable. i am using potplayer shaders so i make those movies look nicer and i am seeing a difference in quality than without using shaders. also i have other 1080p x265 mp4 movies which were encoded by using complex encoding settings and the movies look very nice without any shaders. will anything happen if i use shaders on those movies?Last edited by cns00; 13th Oct 2023 at 15:39.
-
Madvr is a renderer with built-in shaders (including the NGU upscaler) comparable to what is available with glsl shaders.
Potplayer can't use glsl shaders.
Originally Posted by cns00
Originally Posted by cns00
Originally Posted by cns00
To be able to determine if the shaders are providing an improvement, look for a way to quickly enable/disable shaders. -
I don't understand. What are you talking about here? Do I have to edit the hlsl files of the scaling shaders? You said that there could be minor artifacts when chaining sharpening scalers. Can I prevent those artifacts if I edit the scaling shader files and I set different values?
Before my movie collection was made 720p x264 mp4 movies which had under 1000 kb/s video bitrate. Those movies are low quality but they are quite watchable on a 1080p screen. However, they could look bad on a 4k screen so that's why I upgraded my movie collection to 1080p x265 mp4 files. 1080p x265 mo4 files look nicer on a 4k screen than 720p x264 mp4 files. Also 1080p scales perfectly to 4k because it's x2. I will do the scaling in madvr so it looks nice. -
The surface type is a renderer setting.
-
Oh ok. You are talking about this:-
https://i.imgur.com/aTR4UFP.png
Do I tick the checkbox also? -
I found the edge_sharpen mod I did a while back: https://gist.github.com/butterw/928aa8961c06e8df827e3546c07f57c5/81faa30f4fb6340d2ecad...a82a9e16dc3c1d
It can do the edge detection on luma and has some gpu performance optimization.
It could easily be combined with an s-curve to perform a simple form of local contrast enhancement (improves clarity).
I'll need to do some more testing and clean up the code before posting it, but it is fairly lightweight and could possibly be useful for video.
An s-curve (mid-tone contrast improvement) shader can be useful by itself for movies with weak colors. The main issue would be dark scenes as the contrast is slightly degraded in this case. -
-
I can start by explaining what Edge_sharpen and Sharpen_complex do (and why you probably don't need both at the same time).
Both shaders do a decent edge detection (using similar but non-identical methods).
The details above the edge detection threshold (the edges) are then processed differently from the rest of the picture:
- The pixels corresponding to the edges are sharpened using the exact same method in both Edge_sharpen and Sharpen_complex (and IMO the results are a bit lackluster).
- In Edge_sharpen, the rest of the picture is unchanged, whereas in Sharpen_complex it is sharpened using a different sharpener (unsharp mask).
The basic idea of these two shaders is the same: apply a different sharpening strength to the edges and the rest of the picture. -
The sharpening shaders in potplayer are not perfect. For example adaptive sharpen fixes some things and mess up other things and it sharpens some imperfections in the video and it turns it into artifacts and I can notice it if I am close to the screen. This is expected from non AI sharpening shaders.
You mentioned that there is sharpening which is done by AI. How can I get that? Does madVR use them? Do they do a better job at sharpening and they don't cause artifacts?
Also if I watch movies on advanced 4k screens like LG C2 or 32 inch Samsung neo G7 then will the screen features improve how the movies look? -
The screenshot you provided is easy to improve, any decent sharpening shader can do that.
But for any given source there is a limit to how much sharpening it can take before you'll get artifacts. Don't expect too much from a source that isn't great.
The most important thing is to not oversharpen.
I can't help you with madVR as I don't use it.
You could open a new thread about the built-in scaling and the quality of the processsing available on current TVs. I'm hoping that in the next few years with the improvements in AI, it will be possible to get an OK full-screen display from a mediocre source. -
What exactly do you mean? For example if I use the Sharpen shader, the adaptive sharpen shader and the sharpen complex shader then artifacts appear in some movies.
Should I use less sharpening shaders or I edit the source code of the shader file and I reduce the sharpening strength? The default sharpening strength is 1. What do I put? -
You need to adjust the parameter values in the shader code. I'm updating/correcting some of the old sharpeners to make this easy to do.
The latest version (2018-04, available at github) of "Adaptative sharpen" is a 2-pass shader.
see https://forum.doom9.org/showthread.php?t=172131
I have never really used this shader and don't know if the 2-pass version works with potplayer and the renderer you are using. -
1) I've uploaded a Contrast Adaptive Sharpening dx9/dx11 hlsl shader: https://gist.github.com/butterw/ceb89a68bc0aa3b0e317660fb4bacaa3
adjust the CAS sharpening value in the shader based on your taste and output resolution.
2) sCurve.hlsl shader (dx9, dx11, mpv) shader is available here: https://github.com/butterw/bShaders/tree/master/A-pack -
I tried your shaders. Enabling CAS dx11 did nothing and I couldn't notice any difference in the graphics. Enabling CAS dx9 worked and I noticed improvement in the graphics. I configured potplayer to use dx11 rendering and I made it to use my nvidia graphics card so I am watching the movies in hardware mode. Is it ok if potplayer uses dx11 and the CAS shader is dx9 and they won't conflict with each other? I am worried because dx11 and dx9 are running at the same time.
Last edited by cns00; 15th Nov 2023 at 11:21.
-
Ideally you want to run the decoder and the renderer using the same api (dx9 or dx11), but using different api does work.
However a dx11 renderer (ex: MPC-VR dx11) can only use dx11 shaders, a dx9 renderer (ex: EVR-CP) only dx9 shaders.
If you have a Nvidia RTX card you will want to try the new Video Super Resolution feature (available with MPC-VR). -
-
Similar Threads
-
Pixel-shaders for video playback (.hlsl, .glsl)
By butterw in forum Software PlayingReplies: 41Last Post: 2nd Apr 2024, 16:21 -
[A-Pack v1.50, Open-source] Video-player Adjustments shaders Pack.
By butterw in forum Latest Video NewsReplies: 2Last Post: 20th Nov 2023, 09:58 -
FREE motion interpolation solution (Uplavnyalka), pixel shaders
By DanilaZabiaka in forum Newbie / General discussionsReplies: 6Last Post: 18th Oct 2020, 10:54 -
PotPlayer crashing
By Rafael Dominiquini in forum Software PlayingReplies: 13Last Post: 18th May 2020, 22:40 -
PotPlayer replacement
By Dreamer in forum Software PlayingReplies: 9Last Post: 1st May 2020, 17:29