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.

 

Go Back   Doom9's Forum > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd October 2021, 04:02   #101  |  Link
v0lt
Registered User
 
Join Date: Dec 2008
Posts: 1,959
Quote:
Originally Posted by Acba View Post
I would like some existing mpc-hc shaders, like "luma sharpen" or "lcd angle correction", to have effect just in the left half of a video, when the video is displayed in full screen.
Here's an example.
Code:
float4 main(float2 tex : TEXCOORD0) : COLOR
{
	if (tex.x > 0.5) return tex2D(s0, tex);
	...
v0lt is offline   Reply With Quote
Old 4th November 2021, 23:01   #102  |  Link
Acba
Registered User
 
Join Date: Oct 2021
Posts: 2
Quote:
Originally Posted by v0lt View Post
Here's an example.
Code:
float4 main(float2 tex : TEXCOORD0) : COLOR
{
	if (tex.x > 0.5) return tex2D(s0, tex);
	...
It worked!
Now I finally have "left-side-only" shaders.
Thank you very much!
Acba is offline   Reply With Quote
Old 20th May 2023, 16:57   #103  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
HideWindowedControls

## mpc-hc HideWindowedControls

Options > Advanced > HideWindowedControls
This Advanced option was added a while back to mpc-hc and helps modernize the windowed mode UI a lot. The toolbar is displayed only when the mouse hovers the bottom of the window similar to what happens by default in full screen mode. The result reduces the windows height and IMO looks much better.

The configuration for the following win10 window screenshot is:
normal preset + dark mode theme + hidden menubar
I'm using the following advanced options:
- DefaultToolbarSize=18.
- status bar display: codec/resolution + frame rate
the video resolution is 576x1024.

https://raw.githubusercontent.com/bu...edControls.jpg

The top menubar can be displayed if needed with the Alt key or the right-mouse click menu can be used instead.

EDIT: The Controls toolbar isn't typically very useful in mpc-hc, and can be disabled if you are familiar with the basic keyboard shortcuts.

Last edited by butterw2; 23rd May 2023 at 00:36.
butterw2 is offline   Reply With Quote
Old 21st May 2023, 01:37   #104  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
Quote:
Originally Posted by v0lt View Post
MPC Video Renderer 0.6.7.2013

Changes:
Added "Request Super Resolution" option for Nvidia and Intel graphics adapters. Hardware and driver support required. The display of "SuperResolution*" in the statistics only means that the request was sent successfully.
Recommended version of MPC-BE 1.6.6 or later.
I've tried out a few 720p and lower videos with mpcvr dx11 (vp resize+superResolution to 1080p on intel uhd730 with latest drivers). I will need to do test further to confirm that it is actually working as expected.
The result seem OK (nothing magical) but are achieved with very low cpu/gpu usage.

I believe intel vsr should also be available in Chrome web browser, but I haven't tried this yet
butterw2 is offline   Reply With Quote
Old 21st May 2023, 14:52   #105  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
mpc-be: window (minimal) + seekbar, no OSD filename

my config for mpc-be windowed mode:
- Minimal Preset (no window bar, hidden Menubar, hidden Toolbar)
- keep Flybar (displays when the mouse hovers at the top of the window and times out unless locked)
+ seekbar
- Show OSD + show seek time enabled, show filename disabled (can be toggled in Options>Player without restarting the player)
- HideWindowedMousePointer (time out)
- Window Size: after starting Playback, scale to video size: 100%.
- SnapToDesktopEdges.



The screenshot shows the default flybar, it's possible to change it by putting a custom flybar.svg file in the mpc-be folder.
Chapter markers can be displayed in the seekbar by toggling Options > Player > Interface > x use Chapter Markers.

When enabled the OSD display can show filename, playtime, clock, and feedback information such as Volume, Zoom. However no time-out is applied when the OSD keyboard shortcuts are used (it's ON until you toggle OFF, even restarting the player doesn't help!).

In fullscreen mode I would typically prefer the default Normal preset (the toolbar/seekbar autohide) with full OSD, but I don't think it is possible to configure two different custom setups for windowed and fullscreen mode.

Last edited by butterw2; 19th August 2023 at 00:26.
butterw2 is offline   Reply With Quote
Old 23rd May 2023, 20:43   #106  |  Link
SirMaster
Registered User
 
Join Date: Feb 2019
Posts: 231
Quote:
Originally Posted by butterw2 View Post
I've tried out a few 720p and lower videos with mpcvr dx11 (vp resize+superResolution to 1080p on intel uhd730 with latest drivers). I will need to do test further to confirm that it is actually working as expected.
The result seem OK (nothing magical) but are achieved with very low cpu/gpu usage.

I believe intel vsr should also be available in Chrome web browser, but I haven't tried this yet
Are you sure it's working?

When I use the super resolution on my desktop it takes almost all of my RTX 3080 and shoots up to 300W power usage.
SirMaster is offline   Reply With Quote
Old 24th May 2023, 18:45   #107  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
SuperResolution magic is not working for me.

with Intel Arc & Iris Xe Graphics WHQL graphics driver 31.0.101.4369 on Win10 22H2.

using mpc-be + mpcvr / intel dx11 vp for resizing.
The igpu (uhd730) is using 7W when upscaling 480p to 1080p (1% cpu, 10% gpu). Sharpness is similar to lanczos3 shader.
butterw2 is offline   Reply With Quote
Old 25th May 2023, 06:32   #108  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
can you try this on the uhd730 and share me an upscaled image?

https://drive.google.com/file/d/1B0H...ew?usp=sharing
huhn is offline   Reply With Quote
Old 25th May 2023, 09:42   #109  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
Low bitrate (<1Mbps, ex: 500kbps) youtube streams

- mpc-be can open youtube urls (via copy-paste) and play the video efficiently.
- Youtube encoded 480p videos don't look good upscaled to 1080p on a monitor. They look OK at 100% zoom.
- Well encoded 720p can upscale decently to 1080p. For similar bitrates, 720p-av1 (if available) would be preferable over youtube 480p-avc.
- Hardware decoders: Whereas even very old computers have h264-dec, only recent generations of gpu/igpu have av1-dec. Still it should be possible to play 720p av1 in software on a PC. Otherwise vp9 hw-dec are more widely available (vp9 uses webm container). When the hw-dec is used, GPU is circled in the mpc-be Controls toolbar at the bottom of the screen.

mpc-be: Options > Playback > Online media services
with the built-in web page parser (you can also use a youtube-dl variant executable)
Preferred format: mp4-av1 720p (alternative options: mp4, webm, +60fps)
butterw2 is offline   Reply With Quote
Old 25th May 2023, 10:22   #110  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
Quote:
Originally Posted by huhn View Post
can you try this on the uhd730 and share me an upscaled image?

https://drive.google.com/file/d/1B0H...ew?usp=sharing
upscaled to 1080p >> screenshot
https://files.videohelp.com/u/295418...pscale.png.zip
I can confirm the superresolution option doesn't change the output on this setup.

Do you have a 1080p picture of the test patterns for reference ?
butterw2 is offline   Reply With Quote
Old 25th May 2023, 10:36   #111  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
there is no reference.

this image show that the scaler should be the good old lanczos 3 with maybe AR in very low quality (the banding).

here is mpcvr jinc2m https://abload.de/img/jinc2l9ezb.png
which is flawless no bands or discontinuities.

this just a pattern that roughly tells you the scaler and shows error in it. the band seen in your intel results could be pointless if you are only scaling x2.
huhn is offline   Reply With Quote
Old 25th May 2023, 13:13   #112  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
jinc2m generates a clean pattern on this test, but does tend to oversharpen with real video.

if anyone wants to see what the input test patterns looks like, here's the integer scaling (180x180 pixels) of the first test pattern:


1080 version: https://github.com/butterw/bShaders/...er/test_resize

Last edited by butterw2; 25th May 2023 at 18:54. Reason: clarity
butterw2 is offline   Reply With Quote
Old 25th May 2023, 13:30   #113  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 293
A Pixel Is Not A Little Square,
A Pixel Is Not A Little Square,
A Pixel Is Not A Little Square!
lvqcl is offline   Reply With Quote
Old 25th May 2023, 13:55   #114  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,344
The image is not meant to be perfectly upscaled, its meant to visualize properties of upscalers. Of course "integer scaling" (whoever named it that? Its point sampling or nearest neighbour scaling) will look just like a perfectly bigger version of it. But you get aliasing, tons of aliasing. Thats all the sharp corners. Normal images have no sharp corners.
You don't even know if thats what it was supposed to look like. Maybe it was once bigger and had smooth detail, but when downscaling the lack of resolution made it appear to be pixel-y.

You totally missed the point of this image and what its supposed to test. "integer scaling" is a pointless excercise with very little real-world use, at best only useful if you play old pixelart games.

What the test did show is that whatever upscaler was being used for your original images is terrible. It creates a lot of visible block artifacts around the elements. This may not be visible in normal video because the scaling factor is not as extreme, but its certainly not a great algorithm.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders

Last edited by nevcairiel; 25th May 2023 at 14:05.
nevcairiel is offline   Reply With Quote
Old 25th May 2023, 15:21   #115  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
Of course nearest neighbour/integer scaling doesn't perform well for general purpose video. Having the reference is useful to determine that there is a pixel shift of the motif.

The built-in scaler is not great, not terrible. Out of the box, it actually performs slightly better than lanczos3 on my random video test (480p low bitrate + compression artefacts to 1080p). Jinc2m looked very poor there. catrom lacked sharpness.

It's going to take some magic to make these videos look good upscaled to 1080p (2-3x upscale), getting a better source is easier.
butterw2 is offline   Reply With Quote
Old 25th May 2023, 16:52   #116  |  Link
huhn
Registered User
 
Join Date: Oct 2012
Posts: 7,903
lowering resolution is a terrible compression algorithm so it unlikely to find a scaler that will make a lower resolution video look constantly or at least for the majority better than higher resolution video.

Quote:
Originally Posted by nevcairiel View Post
Of course "integer scaling" (whoever named it that? Its point sampling or nearest neighbour scaling) will look just like a perfectly bigger version of it.
integer scaler and NN are not 100 % the same well it is only used for specific situation or how should i say it. it is NN with a integar multiply to scale only.

https://abload.de/img/integarscaleri7elz.png
pretty sure nvidia also uses that name.
it was ask for for about a decade to make pixel art game look normal on rare 1440p displays at the time.
pixelart games are usually 720p like FTL.

only pascal and newer can do it on nvidia don't ask why. (may have changed not that i care)
point and NN where not enough i guess...
huhn is offline   Reply With Quote
Old 26th May 2023, 15:13   #117  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
- Integer scaling allows to zoom in to the source pixels as they are (without upscaler effect).
At 200% upscale, the low resolution, bitrate constrained web video that was compressed to look ok at 100% shows it's artefacts. The upscaler has to mitigate this somehow. The most common artefact is noisy edges, from what I observed.

To view the available codec/bitrates on a url from a streaming site, you can use a youtube-dl variant from command-line:
> yt-dlp.exe -F url
When you go from a 480p to a 360p stream you are lowering resolution, but also lowering bitrate, so the upscaling problem becomes a lot harder.

From initial testing close-up on a 24" monitor, 720p to 1080p upscale (1.5x) with acceptable quality might be more feasible than 480p to 1080p.
but screen display size and viewing distance are key:
- upscaling 480p to 720p (1.5x upscale) on the small screen of a smarphone is probably OK.
- upscaling 480p to 1080p (2.25x upscale) on a 24" monitor might look OK if you are watching from a distance.
- 720p to 1440p monitor would be a 2x upscale.
- 720p to 2160p would be a 3x upscale.

Web video quality is typically poor to OK (this is NOT a bluray source). Bitrate would typically be in the range 1000-1500kbps for 720p and currently are typ. only available as h264 (with the exception of youtube).

What are your current recommandation for realtime upscaling of low bitrate video to 1080p on PC ?

Last edited by butterw2; 28th May 2023 at 14:31.
butterw2 is offline   Reply With Quote
Old 30th May 2023, 12:37   #118  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
Low resolution web-videos and scaling (fullscreen, 2x, 1.5x, 0.75x), without superResolution

- Scaling low resolution to fullscreen to view on a monitor should probably only be considered if the source is reasonably good. In this case to upscale 720p to 1080p, you just need a sharp resizer or a sharpening shader. Adding noise/grain might help if the source lacks it.
- When the source has visible artifacts at 100% zoom, the options are to try to reduce the artifacts or to view downscaled.
- Some artifacts can be treated effectively at low cost, but there isn't much built-in to mpc-hc/be to do this. Mpc-hc does offer a 3x3 gaussian blur shader (light spatial smoothing).
- In mpc-hc and mpc-be, only 200% and 50% zoom can be easily and directly applied in windowed mode. But often the desirable scaling would be 150% or 75%...
butterw2 is offline   Reply With Quote
Old 31st May 2023, 10:00   #119  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
(custom) windowed zoom: 150%

Quote:
Originally Posted by butterw2 View Post
In mpc-hc and mpc-be, only 200% and 50% zoom can be easily and directly applied in windowed mode. But often the desirable scaling would be 150% or 75%...
To be more complete:
- You can go back to 100% zoom using View > Zoom > 100% or the corresponding hotkey.
- mpc-hc and mpc-be do allow to set a fixed window size or remember last window size. But random videos will have different resolutions so this isn't typically practical.
- mpc-hc has added a "zoom window +", "zoom window -" hotkey, which would allow to adjust window size manually (! the step is small though).
- in fullscreen mode, you could create a custom zoom factor with View>Pan&scan> Edit... preset, with the option to further adjust manually with numpad 9,1, 5 (PnS reset) hotkeys.

However Vlc does have the setting I was looking for (custom default windowed zoom):
Tools > Preferences > Show Settings: All (at the bottom) to access Advanced Settings.
Video > zoom Video: 150%. Restart the player.

In mpv:
> mpv --no-hidpi-window-scale --window-scale=1.5 "b:\Videos\day_480p.mp4"


- mpc-hc Changes from 1.9.1 to 1.9.2: Added a 25% zoom shortcut and menu entry
I don't know what the use case for a 25% zoom is, but I would suggest having a user customizable zoom would be more useful. The default value could remain 25%.

Last edited by butterw2; 11th November 2023 at 10:24. Reason: +mpv, 25% zoom ?
butterw2 is offline   Reply With Quote
Old 1st June 2023, 15:51   #120  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
bShadows shader

To darken shadows only, I'm using the following formula (1 texture, 5 arithmetic):

#define Shadows 0.15
pixel.rgb = pixel.rgb -Shadows*(1-luma)**4

Last edited by butterw2; 1st June 2023 at 17:43.
butterw2 is offline   Reply With Quote
Reply

Tags
hlsl, mpc-be, mpc-hc, mpv, pixel shaders

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.