Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#81 | Link |
Registered User
Join Date: Jun 2020
Posts: 236
|
#mpv built-in scalers
mpv has a number of built-in scalers (they can be listed with mpv --scale=help), which can be specified via command-line or mpv.conf: --scale=catmull_rom #lanczos #spline16 --cscale=bilinear --dscale=mitchell These settings are OK for integrated gpu use. Bilinear is the fastest but doesn't give great results, mitchell (B=1/3., C=1/3.) is smooth, catmull_rom (mitchell-netvrali with B=0, C=0.5) is quite sharp The scaler is used when the output resolution on screen is different from the source resolution. - scale is used for upscaling, and also downscaling (if dscale isn't specified) - dscale is used for downscaling - cscale is used for chroma upsampling. It is possible to define a hotkey in input.conf to switch between scalers, ex: F8 cycle-values scale bilinear mitchell catmull_rom lanczos A 24bit .png image file can be used as input for testing. The difference are visible but not that huge with typical (ex 720p to 1080p) upscaling.
__________________
bShaders: realtime Effects/filters for video players Last edited by butterw2; 26th February 2021 at 11:12. |
![]() |
![]() |
![]() |
#82 | Link |
Registered User
Join Date: Jun 2020
Posts: 236
|
#How to change settings/properties in mpv https://mpv.io/manual/master/#properties
Settings control in mpv: 1) Initial settings (determined by: defaults < mpv.conf < command-line options incl. profile) 2) Runtime changes (via hotkey/command): current settings, disable/restore settings (via script) 3) Show settings 4) quit-watch-later: partial save of per file settings Motivation for changing settings at runtime: - tweak settings based on the video being displayed - improve performance on some files (ex: on integrated graphics) - try out effects Runtime settings do not persist beyond the current session. How to do this ? - Multiple [profiles] can be defined in mpv.conf (startup profile can be specified via command-line option). - (Almost all ?) settings can be changed at runtime without restarting mpv through hotkey/commands (ex: switch profiles, or change a video filter/or glsl shader setting). - Partial per file settings persistence is possible via watch-later folder: some pre-defined settings (! the list is not currently user-customizable) can be written to disk and will then be used by default the next time the same file is played. Display pipeline video.mp4 (ex: 720p, yuv420) > --vf (ex: hqnd3d) > color controls (ex: --saturation) > LUMA, CHROMA (ex: noChroma.hook) > cscale > rgb: MAIN (ex: clut shader kodachrome-9.hk;bw.hook) > scale > OUTPUT (ex: Filmgrain.hk) > rgba display (ex: 1080p) Changing/displaying mpv settings at runtime with custom input.conf (hotkey/commands): - toggle individual filters/shaders in the chain, ex: F1 change-list glsl-shaders toggle "noChroma.hk" - set values, ex: CTRL+² change-list glsl-shaders set "", - cycle-values with a custom list, ex: F8 cycle-values scale bilinear mitchell catmull_rom lanczos - commands can be added via external script functions ...Scripts in lua or javascript in ./scripts folder are autoloaded by default ...stats.lua and osc.lua are built-in scripts. They can be configured in ./script-opts - Save/restore current settings (with an external script), ex: CTRL+p script-message switch-shaders - Display current settings (show-text on OSD or print-text to console, or use the window title bar)
__________________
bShaders: realtime Effects/filters for video players Last edited by butterw2; 26th February 2021 at 11:08. Reason: updated2 |
![]() |
![]() |
![]() |
#83 | Link |
Registered User
Join Date: Jun 2020
Posts: 236
|
#Custom contextual menu in mpvnet
result obtained: https://files.videohelp.com/u/295418/mpvnet_menu.jpg The menu gives access to the recent file list, the chapters list and the open file dialog. Unlike in mpv, runtime commands do not have to be associated to hotkeys (they can be launched though the menu or the command-palette). In mpv.net, Input.conf defines the key and mouse bindings and the context menu. It's easy to create a custom contextual menu. The default contextual menu is quite cluttered, I wanted to create a more minimalistic one. Mpvnet has a searchable command palette which lists all available commands, which is allows to keep a large number of commands available. Original menu ![]() ![]()
__________________
bShaders: realtime Effects/filters for video players Last edited by butterw2; 8th March 2021 at 19:11. |
![]() |
![]() |
![]() |
#84 | Link |
Registered User
Join Date: Jun 2020
Posts: 236
|
#hqdn3d fast spatio-temporal denoiser
Most shader implementations have the limitation that only the current frame is available as input. This means temporal algorithms cannot be implemented. This obviously isn't a problem when adapting algorithms which originate from image processing, however temporal issues do often have a big impact on the result achieved with video input (vs a fixed image). To limit this problem, it makes sense to clean the source of temporal fluctuations as much as possible. While spatio-temporal denoising should be applied prior to encoding or to an extent by the codec itself (with modern codecs), there is frequently a benefit to apply further spatio-temporal source denoising before further processing is applied by shaders. hqdn3d (hq mplayer spatio-temporal denoise) is a low cost cpu spatio-temporal denoiser. It is widely available, including in ffmpeg and as a result can be used in mpv. hqdn3d(2) is equivalent to hqdn3d(ls=2, cs=1.5, lt=3, ct=2.25), the default is ls=4.0 I would recommend switching it on with lower setting on sources which require it. It runs well on 720p videos even on an old cpu. add the following to input.conf, and turn it on with hotkey h: h vf toggle "hqdn3d=2" It should be noted that while temporal methods are great to remove temporal noise on backgrounds, they are not applicable to sources with fast motion.
__________________
bShaders: realtime Effects/filters for video players |
![]() |
![]() |
![]() |
#85 | Link | |||
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,800
|
Quote:
mpv.net specific options Quote:
Quote:
Thank you for the feedback.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
|||
![]() |
![]() |
![]() |
#86 | Link | |
Registered User
Join Date: Jun 2020
Posts: 236
|
Quote:
mpvnet has a number of Window Limitations vs regular mpv. some window properties are ignored, ex: --title which I use to display information in mpv. But also window-scale, etc. --video-file-extensions=<string> please provide example values, including how to disable picture files in auto-load-folder mpvnet.conf: image-file-extensions = jpg png image-file-extensions = #disables image files #image-file-extensions = #go back to default (all ext)
__________________
bShaders: realtime Effects/filters for video players |
|
![]() |
![]() |
![]() |
#87 | Link | |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,800
|
Download can be found on the front page:
https://github.com/stax76/mpv.net#table-of-contents Not sure what else I could do. There is an implementation for window-scale in mpv.net, but it works differently on purpose because I found the mpv behavior useless, what's the point of scaling based on the native video size? I'm not getting it but can try to implement it if people care. --title might be something that is easy to implement. I can try fixing both. Quote:
image-file-extensions = jpg bmp The file extensions can be separated by space, comma and semicolon.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists Last edited by stax76; 9th March 2021 at 18:22. |
|
![]() |
![]() |
![]() |
#88 | Link | ||
Registered User
Join Date: Jun 2020
Posts: 236
|
Quote:
Quote:
This is the same as mpc-hc: View > zoom which has 3 main values: 50%, 100% and 200%. 100% zoom turns off scaling. 200% zoom should still look OK and is integer ratio scaling. It's a useful feature on some files, not something meant to be used by default. title: displays information in the window title. in mpv it's the easiest way to display updated info. This is a great customization feature if it can be implemented in mpvnet.
__________________
bShaders: realtime Effects/filters for video players |
||
![]() |
![]() |
![]() |
#89 | Link | |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,800
|
Quote:
There is a new hotfix online: - The mpv window-scale property works now exactly like in mpv. - Implementation for the mpv title property. https://github.com/stax76/mpv.net/bl....conf.txt#L144 Btw. I noticed the mpv implementation of window-scale is buggy, which supports my claim that it's useless in the first place. I start mpv passing a video file to play, I set window-scale 1.0, nothing happens, very useful feature. I try not to lament, but every second request on my issue tracker is window related, 9 out of 10 window requests are strange, I've already wasted a ridiculous amount of time working on these requests.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
|
![]() |
![]() |
![]() |
#90 | Link | |
Registered User
Join Date: Jun 2020
Posts: 236
|
Quote:
I use this in my mpv.conf (1x size window, unless the video is wider than 1280): # window will not have a width larger than 1280pixels: autofit-larger=1280 Window and frame size isn't all that simple: mpc-hc for instance has many different ways to specify the window size, aspect-ratio, crop, zoom behavior... and some of these parameters are not exclusive. The mpvnet version of window-scale is now identified differently from the mpv original, which is less confusing. EDIT: window-scale seems to work as expected in latest hotfix mpvnet.exe
__________________
bShaders: realtime Effects/filters for video players Last edited by butterw2; 11th March 2021 at 19:52. |
|
![]() |
![]() |
![]() |
#91 | Link |
Registered User
Join Date: Jun 2020
Posts: 236
|
hotfix mpvnet.exe 2021/10/03 feedback:
- I've replied at github concerning the remaining issues with the command palette improvement. - mpvnet title testing (previously: title was ignored): At startup: title can only be set to a string, not to a property, this becomes the default value. with mpv.conf or startup option: --title = "${path}: ${glsl-shaders}" displays ${path}: ${glsl-shaders} in window title, not the property values ! - it can be set at runtime, but the value doesn't update dynamically like in mpv and gets reset to default when a new file is loaded: input.conf: Code:
F7 set title "${path}:ok"
__________________
bShaders: realtime Effects/filters for video players Last edited by butterw2; 11th March 2021 at 12:53. |
![]() |
![]() |
![]() |
#92 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,800
|
I want to improve the command palette, if you show the command palette in VS Code or Windows Terminal with Ctrl+Shift+P you see a command palette that looks much nicer than the one in mpv.net. It's going to be difficult to code, and might need migrating to .NET 5 and give up Win 7 and old Windows 10 versions, hopefully not. It's too much work to build a dedicated playlist dialog, but I can re-use the command palette infrastructure as playlist UI.
This title issue turned out to be fairly complex, I can try to get it, but need a small break first anyway, staxrip maintenance caused some stress lately. If this thread is about shaders, better post in the other mpv thread.
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists |
![]() |
![]() |
![]() |
#93 | Link | |
Registered User
Join Date: Jun 2020
Posts: 236
|
Quote:
One of the issues with user shaders is that passing parameters to individual shaders in the chain isn't simple (the player needs to set uniforms/registers). The workaround in mpv has been to create multiple versions of each shader with different sets of parameter values. While this works, its also hard to use. One of the benefits of having a GUI is allowing user runtime configuration of shaders (ex: turn on and increase the strength of filmgrain, because the source requires it). The command palette interface is easy to use and allows having many commands available without a cluttered GUI.
__________________
bShaders: realtime Effects/filters for video players Last edited by butterw2; 12th March 2021 at 10:13. |
|
![]() |
![]() |
![]() |
#94 | Link |
Registered User
Join Date: Sep 2015
Posts: 3
|
Hello,
Is there a shader that can fix the colors of DolbyVision movies? I don't have any monitors or TVs that support DolbyVision HDR. The colors are off - Everything looks green and red. I was hoping there's a shader that can fix that... Upon further investigation, it seems that DolbyVision content without the EL component displays wrong/shifted colors. In the following screenshot, you can see that this DolbyVision content only has the BL+RPU components: ![]() A user called "Doofussy2" found this issue and reported it on github: https://github.com/mpv-player/mpv/issues/7326 Last edited by ericgl; 22nd April 2021 at 11:04. |
![]() |
![]() |
![]() |
#95 | Link |
Registered User
Join Date: Jun 2020
Posts: 236
|
Try mpc-be which has some built-in HDRtoSDR shaders.
HDR10 and HLG should work with a recent version, but I don't know about HDR10+: You can ask the devs about this in the mpc-be thread. Dolby vision comes up in encoding topics also.
__________________
bShaders: realtime Effects/filters for video players |
![]() |
![]() |
![]() |
#96 | Link |
Registered User
Join Date: Apr 2008
Location: Russia, Vladivostok
Posts: 2,744
|
There is no software player that support pure DolbyVision, except Windows 10 "Movie and TV".
__________________
AMD Ryzen 5 3600 /GIGABYTE B450 Gaming X /AMD Radeon R9 16Gb@3200 /Kingston 500Gb M.2 /GTX 1650 /Samsung U28R550UQI /OLED Philips 55OLED707 /Yamaha RX-V471 + NS-555 + NS-C444 + NS-333 + YST-SW215 |
![]() |
![]() |
![]() |
#97 | Link | |
Registered User
Join Date: Sep 2015
Posts: 3
|
Quote:
@Aleksoid, OK, I will check DolbyVision content with the "Movie and TV" app on Win10. Thanks! Last edited by ericgl; 22nd April 2021 at 15:10. |
|
![]() |
![]() |
![]() |
#99 | Link |
Registered User
Join Date: Jun 2020
Posts: 236
|
It's often called rotate (90°) and yes most video players have this feature.
It's not typically done with user pixel shaders though, as they can't change the size/AR of the frame.
__________________
bShaders: realtime Effects/filters for video players |
![]() |
![]() |
![]() |
Tags |
hlsl, mpc-be, mpc-hc, mpv, pixel shaders |
Thread Tools | Search this Thread |
Display Modes | |
|
|