VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 38
Thread
  1. 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.
    Quote Quote  
  2. 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.
    Quote Quote  
  3. Originally Posted by butterw View Post
    how you view the content has a major impact here (viewing distance, screen size, screen resolution, etc.).
    I am watching movies on a 43 inch 1080p tv and I am sitting nearly 2m from the screen

    Originally Posted by butterw View Post
    you can also try sharpen complex variants or tuning the parameters inside the shaders.
    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?
    Quote Quote  
  4. 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.
    Quote Quote  
  5. Am I able to use another shader which is not a sharpener to improve how the movie looks?
    Quote Quote  
  6. 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.
    Quote Quote  
  7. Originally Posted by butterw View Post
    - You are displaying the source resolution (no upscaling) fairly close-up and traditional (non-AI) methods don't create detail.
    Currently I am watching 1080p movies on a 1080p screen. I want to buy a 4k screen. After that I can use madvr with potplayer to upscale from 1080p to 4k? Will the movie look nicer if I do that because madvr uses AI methods?
    Quote Quote  
  8. 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.
    Quote Quote  
  9. I found a shader which is glsl. Potplayer doesn't support it. How do I convert from glsl to hlsl?
    Quote Quote  
  10. 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.
    Quote Quote  
  11. 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?
    Quote Quote  
  12. There is no such thing as a best scaler for general purpose video.

    You can use either use glsl shaders with mpv or with potplayer madvr. You'll likely need an external gpu to run this type of upscaler with 4K output.
    Quote Quote  
  13. 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.
    Quote Quote  
  14. Originally Posted by cns00 View Post
    Ok. So Potplayer can't directly read glsl and it needs madvr to read it?
    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
    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?
    The filmgrain strength should be adjusted down so that the dots are not noticeable unless you are paying special attention to it.

    Originally Posted by cns00
    currently i am using edgesharpen v1_1 and sharpencomplex in pre resize shaders and adaptive sharpen and filmgrain in post resize shaders.
    When chaining shaders, it is advisable to use a 10bit integer surface or 16bit floating point. An 8 bit integer surface isn't really enough as it introduces rounding error between shaders.

    Originally Posted by cns00
    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?
    Video bitrate of about 2000 kbps is commonly used for 1080p x265 bluray rip (with good encoding settings). Depending on the source the quality of the result will vary a lot, but typically it's decent enough to watch on a 1080p screen if you are not too close, even without shaders. However, when you upgrade the screen (closer to the screen or larger screen or higher resolution) then it really doesn't look that good IMO.

    To be able to determine if the shaders are providing an improvement, look for a way to quickly enable/disable shaders.
    Quote Quote  
  15. Originally Posted by butterw View Post
    When chaining shaders, it is advisable to use a 10bit integer surface or 16bit floating point. An 8 bit integer surface isn't really enough as it introduces rounding error between 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?

    Originally Posted by butterw View Post
    However, when you upgrade the screen (closer to the screen or larger screen or higher resolution) then it really doesn't look that good IMO. To be able to determine if the shaders are providing an improvement, look for a way to quickly enable/disable shaders.
    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.
    Quote Quote  
  16. The surface type is a renderer setting.
    Quote Quote  
  17. Oh ok. You are talking about this:-
    https://i.imgur.com/aTR4UFP.png

    Do I tick the checkbox also?
    Quote Quote  
  18. 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.
    Quote Quote  
  19. Originally Posted by butterw View Post
    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.
    Ok. Please let me know when it's ready for use and tell me how to properly use it and how to combine it with s-curve
    Quote Quote  
  20. 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.
    Quote Quote  
  21. 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?
    Quote Quote  
  22. 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.
    Quote Quote  
  23. Originally Posted by butterw View Post
    The most important thing is to not oversharpen.
    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?
    Quote Quote  
  24. 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.
    Quote Quote  
  25. 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
    Quote Quote  
  26. Originally Posted by butterw View Post
    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.
    Quote Quote  
  27. 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).
    Quote Quote  
  28. What about the default sharpening shaders of potplayer? What directx do they use?
    Quote Quote  
  29. the shaders provided with potplayer (and kmplayer) are dx9.

    I use mpc-hc/mpc-be, I don't actually know if dx11 shaders are supported in potplayer.
    Quote Quote  
  30. Originally Posted by butterw View Post
    I don't actually know if dx11 shaders are supported in potplayer.
    Your CAS dx 11 shader didn't work and your CAS dx 9 shader worked.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!