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 9th January 2021, 10:54   #61  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
# Comparison of video player features (Win10)

- mpc-hc/be are Windows Directshow based players whereas mpv and vlc are cross-platform players.
- All are open-source, are actively developed and come with all the required codecs for playing audio/video files (with support for hardware acceleration).
- All have portable versions and an optional installer.
- All have configurable hotkeys (incl. mouse).
- the default build for vlc on windows is still 32bit (a 64bit build with the same features is of course available).
- mpv doesn't have a GUI by default (beyond its window and libass based OSD). It uses configuration files and hotkeys (and optionally a console output). Every option can also be set from command-line. For those who do want a GUI, some mpv-based players are available.
- mpv.net offers a fully user-customizable right-click menu.
- A context menu can be added to mpv v0.37 with mpv-menu-plugin
- base mpv doesn't support single-instance mode !!! mpv.net does.
- mpv is built on top of ffmpeg and can use ffmpeg filters on its input. I needed --hwdec= d3d11va-copy or dxva2-copy for this to work.
- mpc-hc/be and mpv can open .avs scripts. If the script has an error, Mpv displays the Avisynth exception in the console.
- mpc-hc doesn't do HDR2SDR tonemapping by default.
- vlc doesn't support user pixel shaders with it's default dx11 video output. It does have built-in video filters (ex: FilmGrain) configurable through a multi-tab GUI.
- mpv has the most complete user shader support: YUV pre-scale and RGB, a working hardware linear sampling mode, embedded textures and compute shaders. vo=gpu-next adds shader parameters.
- mpc-hc and mpv have shader presets (multiple user configurable shader chains).
- mpc-hc shaders auto-update when their source file is modified. In mpv, you need to restart the player (but this can be done with a hotkey)
- vlc has built-in audio filters (equalizer, compressor, etc.) with sliders.

Last edited by butterw2; 24th December 2023 at 22:33. Reason: +updated
butterw2 is offline   Reply With Quote
Old 9th January 2021, 13:49   #62  |  Link
pirlouy
_
 
Join Date: May 2008
Location: France
Posts: 691
Eheh, dangerous to compare features between players. It would need a specific thread, and there would be blood in this thread.
Some will say players are missing in your list. Some will say it is biased.

One example: For me, mpv (the player I use) has a GUI: In OSD, there's not only seekbar, but some useful buttons like cycling subtitles/audio. But indeed, no contextual or main menu. You have to bind commands in a file with hotkeys.

Sometimes, features are specific to someone. For example, in madVR, screen resolution can be changed according to fps, whereas it's not possible in mpv. So I launch some files with MPC then close and open them with mpv.

But anyway, now that you made your comparison, I'm curious, what's your preferred player ?

Last edited by pirlouy; 10th January 2021 at 12:22.
pirlouy is offline   Reply With Quote
Old 9th January 2021, 15:40   #63  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
There are GUI frontends like mpv.net and GUI scripts like uosc.

https://github.com/stax76/mpv.net

https://github.com/darsain/uosc

https://github.com/mpv-player/mpv/wi...ions-using-mpv
stax76 is offline   Reply With Quote
Old 9th January 2021, 16:36   #64  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
As pirlouy points out a full feature comparison of every available player would be quite the ambitious undertaking, and beyond the scope of this shader thread.
If there are any mistakes in my post I'm certainly happy to correct them. But I will only comment on the players and the limited feature set I use.
There are a number of decent players available and I would simply recommend using at least two and selecting the one best suited for each task.

#the mpv GUI
From the mpv manual: "mpv has no official GUI, other than the OSC (ON SCREEN CONTROLLER), which is not a full GUI and is not meant to be."
For those who don't want a GUI, mpv is certainly a good candidate (the OSC can be disabled with --no-osc). For those who expect a GUI, there are multiple frontend options to choose from (such as mpv.net) and also some OSC.lua replacements (ex: https://github.com/maoiscat/mpv-osc-morden maybe with --no-border).
And contrary to mpv, mpv.net has a config GUI and does support by default: single instance mode, play files in folder, and Stop ■ (well at least it doesn't quit like with base mpv...).

Last edited by butterw2; 10th January 2021 at 11:42. Reason: +mpv.net +mpv-osc-morden link
butterw2 is offline   Reply With Quote
Old 10th January 2021, 12:58   #65  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
Regarding the mpv seekbar (osc.lua): IMO the default should be to match the standard of web (html5) video players and just provide a few configuration options.
Web video players can achieve a simple uncluttered interface, which isn't typically available in desktop video players. One of the issues is that the latter have a lot more available features.
Yet providing the option for a simple beautiful interface should be a focus for modern video player development.


# Menu options
One thing I would like to see in video player UI is configurable menu options, in particular for the right-click menu. This pop-up menu can be very useful in fullscreen mode to launch commands without the need for keyboard hotkeys.

- html5 players don't use menus, but they typically do have a settings button.
- base mpv has no menus or settings interface.
- mpv.net has a right-click menu and a settings interface. !!! config file changes do require a restart of the player.
- mpc-hc/be has a window menu by default, and offers 2 different options for the pop-up menu (configured through the O > Keys interface).
The mpc-hc/be menu displays the associated hotkey next to the commands and is generally well-thought out, but it is also very cluttered and this is true also of 2 different variants of the right-click menu (all the same commands, organised differently). An option for greatly cut down right-click menu would be appreciated. It should ideally be user-customizable, just like hotkeys are configurable.
butterw2 is offline   Reply With Quote
Old 10th January 2021, 13:37   #66  |  Link
pirlouy
_
 
Join Date: May 2008
Location: France
Posts: 691
mpv is so fast when you launch a video it is enjoyable and you prefer not to have a GUI.

It takes time to create the file with all shortcuts (input.conf), but once done, you realize you use little functions/buttons and keyboard/mouse shortcuts are enough.
But I'm aware it's only for advanced people, and mpv.net is a good choice for those coming from classic players with lots of options (like MPC).
pirlouy is offline   Reply With Quote
Old 27th January 2021, 16:44   #67  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
# Video Player installation

What a video player installer does on Windows:
0) Copies files to the chosen application folder
1) Creates a shortcut
2) [Registry] associates itself with filetype extensions (opened by double-click)
3) [Registry] changes filetype icons
4) [Registry] changes contextual menus: folder playlist-options, per filetype Open With
5) [Registry] Sets-up default settings
6) Creates an uninstaller !

This seemingly convenient automatic one-click solution has its pitfalls.

Custom manual portable installs are preferable in many cases.

Some info/advice:
- Install to folders were you and the program will have write permission (also for shaders subfolder). ! This isn't the case for c:\Program Files by default.
- a simpler/shorter path is preferable. Spaces can be troublesome for command-line.
- Changing your default video and audio players is OK, but changing per filetype associations can be troublesome (in particular icons per filetype).
- Use portable install for your non-default players, this allows using many different video player versions.
- Each portable install should be in its own folder. To test a development build, it's typically enough to copy the exe to an existing install folder (rename the .exe to switch between versions).
- Why register every possible audio, video extension that ever existed ?
- SendTo contextual menu is easy to configure (find sendTo folder location by running shell:sendTo, then copy/delete shortcuts in folder).
- ! Avoid changing installation paths
- Using Registry all player versions will use the same settings.
- Saving settings to .ini rather than registry makes it easier to backup, compare, modify, substitute (ex: reset to default) configurations
- You can replace the default shortcut icon for a player easily (but not the application window icon which would require hacking the exe).
- Shortcut properties can be edited to specify startup options or startup folder
- The default icon used for filetypes associated with a program can be changed in the registry.
butterw2 is offline   Reply With Quote
Old 7th February 2021, 18:29   #68  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
# Color mapping with Shaders
input pixel (typ. RGB) >>color transformation, out=f(in) >> RGB output pixel

- Color Controls for basic adjustments (Brightness, Contrast, Hue, Saturation), Gamma.
- Color Filters: Saturated rgb, Nightvision, Color Temperature, Tint, etc.
- Color to Black&White transformation (using a custom LumaCoef)
- Luma/Chroma Contrast curve without clipping (ex: SweetFx.Curves)
- ToneMapping

mpv additionally allows embedded textures in shaders, which can be used for fast LUT (Look-Up Table) transformations
ex: CLut(Vivid, Old Photo) or gr.Lut (Sepia), simple 1D LUT with linear interpolation: 256 rgba values hex-encoded
Applying the LUT requires just 1 texture tap for gr.LUT, and 3 texture taps for CLUT
EDIT: A better approach for Color Luts is to use 3D textures with 3D linear interpolation (also supported by mpv shaders)
In this case applying a CLut requires just 1 instruction (with one 3D-interpolated texture tap).
- ! texture format must be supported by the gpu driver, which can be an issue cross-platform for floating point formats (vs lightweight rgba8 texture format which is simple to encode and widely supported)
- Luts come in different formats and sizes (typ. from 4^3=64 to 64^3 colors). Filesize reaches 2MB for a clut-64, so using clut-36 for shaders would be more reasonable. clut-4 might be usable in some cases.
Many awesome free luts are available on the internet, the main issue is the required format conversion !

To change the color-look of a video, a pack of 10 to 15 distinctive shaders would cover most use cases:
- Technicolor
- Vintage KODACHROME (1936-1962) https://frankglencairn.wordpress.com...me-k-tone-lut/
- Old Film
- Sepia
- black&white Agfa 200X
- black&white Rollei (high-contrast)
- etc.

Last edited by butterw2; 26th February 2021 at 11:53. Reason: +3D textures
butterw2 is offline   Reply With Quote
Old 9th February 2021, 00:56   #69  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
# Main formats used for CLuts (Color Look-Up Table)
- Haldclut a square .png ex: level8, 512x512x24bit (or 48bit), 64^3 RGB colors.
- RGB lookup .png, (8x8 cube slices of 64x64 colors) 512x512x24bit
- .cube RGB floating point values (in text format).
- png cluts are used in photo-editing applications (ImageMagick and GMIC plugin use haldclut, XnViewMP>Film Simulation uses haldclut or RGB lookup).
- Adobe .cube format is used more in video-editing applications. One advantage seems to be that it can use values outside of the range [0, 1], but the filesize of .cube quickly becomes large with size.
- ImageMagick and GMIC can convert .cube to the Haldclut of corresponding level via command-line.
In a graphics program, the identity clut image can be used as input to capture/save the transformation clut.
When this clut is applied to an input image, the output should then match the result of the transformation. A 64x64x64 clut was enough to achieve transparency. Filesize was 200KB for png haldclut, 1MB for uncompressed rgb32, and 7MB for .cube !

ffmpeg supports haldclut and .cube (and other text-based formats) cluts.
ffplay -vf "movie=KODACHROME.png, [in] haldclut" video.mp4

Mpv can play cube format (input is converted to rgb24): ! use a relative path with / for the lut file
mpv --vf=lut3d=clut.cube video.mp4

However, this is quite cpu intensive at higher resolutions/framerates, so a shader based approach would be preferable (see previous post).

EDIT: With vo=gpu-next you can directly apply a .cube lut without having to create a shader embedding the clut:
> mpv --vo=gpu-next --target-lut=lut/clut.cube video.mp4

Last edited by butterw2; 30th June 2023 at 20:06. Reason: vo=gpu-next supports .cube lut
butterw2 is offline   Reply With Quote
Old 9th February 2021, 01:21   #70  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by butterw2 View Post
# Video Player installation

What a video player installer does on Windows:
0) Copies files to the chosen application folder
1) Creates a shortcut
2) [Registry] associates itself with filetype extensions (opened by double-click)
3) [Registry] changes filetype icons
4) [Registry] changes contextual menus: folder playlist-options, per filetype Open With
5) [Registry] Sets-up default settings
6) Creates an uninstaller !

This seemingly convenient automatic one-click solution has its pitfalls.

Custom manual portable installs are preferable in many cases.

Some info/advice:
- Install to folders were you and the program will have write permission (also for shaders subfolder). ! This isn't the case for c:\Program Files by default.
- a simpler/shorter path is preferable. Spaces can be troublesome for command-line.
- Changing your default video and audio players is OK, but changing per filetype associations can be troublesome (in particular icons per filetype).
- Use portable install for your non-default players, this allows using many different video player versions.
- Each portable install should be in its own folder. To test a development build, it's typically enough to copy the exe to an existing install folder (rename the .exe to switch between versions).
- Why register every possible audio, video extension that ever existed ?
- SendTo contextual menu is easy to configure (find sendTo folder location by running shell:sendTo, then copy/delete shortcuts in folder).
- ! Avoid changing installation paths
- Using Registry all player versions will use the same settings.
- Saving settings to .ini rather than registry makes it easier to backup, compare, modify, substitute (ex: reset to default) configurations
- You can replace the default shortcut icon for a player easily (but not the application window icon which would require hacking the exe).
- Shortcut properties can be edited to specify startup options or startup folder
- The default icon used for filetypes associated with a program can be changed in the registry.
Just personal taste, not everything true.
stax76 is offline   Reply With Quote
Old 9th February 2021, 09:32   #71  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
Few things are ever true (and probably not for everyone). What are you disagreeing with specifically ?
butterw2 is offline   Reply With Quote
Old 9th February 2021, 13:37   #72  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Install to folders were you and the program will have write permission (also for shaders subfolder). ! This isn't the case for c:\Program Files by default.
If you move a folder into 'c:\Program Files', you still have full write access in the folder, and it's sub folders.

Quote:
Saving settings to .ini rather than registry makes it easier to backup, compare, modify, substitute (ex: reset to default) configurations
For a mpv user using reg.exe instead of robocopy.exe isn't harder.
stax76 is offline   Reply With Quote
Old 9th February 2021, 15:10   #73  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
I use base mpv, which makes very limited (if any) use of registry.
There is an optional install .bat registry script, which can be trimmed down significantly to just make it available as a media player/Open With and change the default icon.
Also provided is a manual program update .bat script.
Mpv uses configuration files mpv.conf and input.conf in the portable_config subfolder and doesn't save it's settings. Backing up a mpv configuration would consist in making a backup of ./portable_config and shaders.

Hacking registry is probably less of a hazard than it used to be, but for non-expert windows users remains more complex IMO than comparing/switching a single complete settings file.
butterw2 is offline   Reply With Quote
Old 9th February 2021, 15:39   #74  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
May I ask why you choose base mpv over mpv.net?
stax76 is offline   Reply With Quote
Old 9th February 2021, 17:51   #75  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
I typically launch mpv from command-line and it works very well for this use on Windows/Linux. Mpc is my main windows GUI player.

For me, an mpv GUI would have to provide 100% of base mpv + some genuinely useful additions:
- A text editor like notepad++ can handle .conf files very well (all you need to know is which parameter/values to use).
- the default OSC in mpv isn't great
- hotkeys are preferable vs cluttered menus IMO. Maybe the pop-up menu could be made user configurable (in a config file) ?
- Support in mpv.net for recent files, single-instance, files in folder, command-list are certainly of interest vs base mpv.

Last edited by butterw2; 9th February 2021 at 17:55.
butterw2 is offline   Reply With Quote
Old 9th February 2021, 18:29   #76  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Maybe the pop-up menu could be made user configurable (in a config file) ?
You mean the context menu? That is defined in input.conf, all this is well documented.
stax76 is offline   Reply With Quote
Old 9th February 2021, 19:55   #77  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
https://github.com/stax76/mpv.net
Customizable context menu defined in the same file as the key bindings (input.conf)
That's a great feature which is not currently available in mpc.

I could re-use my existing mpv.conf.
From a quick test of the 24/12/2020 beta, something seemed off with portrait mode video in windowed mode (window doesn't adjust to video dimensions ?)
mpvnet --version didn't return the expected info.
butterw2 is offline   Reply With Quote
Old 9th February 2021, 20:42   #78  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
From a quick test of the 24/12/2020 beta, something seemed off with portrait mode video in windowed mode (window doesn't adjust to video dimensions ?)
There is a mpv.net specific window feature called:

minimum-aspect-ratio

<float> Minimum aspect ratio, if the AR is smaller than the defined value then the window AR is set to 16/9.
This avoids a square window for Music with cover art. Default: 1.2 (mpv.net specific setting)

Press c to show the config editor, enter mini in the search field, define 0.5 for minimum-aspect-ratio. This setting can be found in Screen section of the config editor, it is mpv.net specific, so is persisted not in mpv.conf but in mpvnet.conf.
stax76 is offline   Reply With Quote
Old 11th February 2021, 01:52   #79  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
mpvnet.conf:
minimum-aspect-ratio = 0.5 #resize the window when the input is portrait-mode AR.
As a suggestion, why not list all the mpvnet-specific config parameter with their defaults in this file ?

--
I also got multiple popup errors when opening mpvnet (I had syntax errors in mpv.conf): I probably shouldn't get more than one of these, and the message does seem a little cryptic.
Uppercase char detected: R
mpv properties using the command line and the mpv.conf config file are required to be lowercase.

I also got these when launching from command-line: it would probably be better to just print the error and continue in this case. If I type garbage in mpv.conf, base mpv provides much clearer and more precise error info.

--
Next I'm going to copy my input.conf and maybe try to customize (meaning trim down) the context menu.
butterw2 is offline   Reply With Quote
Old 20th February 2021, 17:46   #80  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
#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 #spline16
--cscale=bilinear
--dscale=mitchell

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.

How often is scaling used ?
- cscale is almost always used (chroma upsampling) but the scaler choice is not critical.
- downscaling isn't all that common and most scalers will provide an OK result.
Upscaling is the most critical as this is a common use case (ex: upscaling 720p to view on a 1080p screen), and a sharp output is typically desired.

These settings should be OK for integrated gpus: (first: make sure --hwdec is enabled and working for the supported codecs)
Bilinear (was the default) is the fastest but doesn't give great results,
fairly lightweight: mitchell (B=1/3., C=1/3.) is smooth, catmull_rom (mitchell-netvrali with B=0, C=0.5) and spline16 are quite sharp.

gpu-hq profile used spline36 for scale, cscale and mitchell for dscale. lanczos can be used instead of spline36 if desired.
spline36 / catmull_rom / mitchell runs on a recent igpu such as intel uhd730 without issues.

Possibly overkill:
- spline64
- ewa_lanczos and ewa_lanczossharp. They use significantly more resources.
The sharpest scalers can be detrimental depending on the source, you may need to use a scale-antiring value (available in gpu-next).

! EDIT: new defaults in mpv v0.37
now (2023-11): lanczos/lanczos (implicit) / hermite (bicubic with b=0, c=0).
dither-depth=auto
hdr-compute-peak=auto
correct-downscaling=yes
linear-downscaling=yes
sigmoid-upscaling=yes
Weaker machines (ex: old laptop with integrated graphics) should use --profile=fast. Scaling is then done with bilinear by default, but this can be overriden with the scale setting.
Also try --vo=gpu-next rather than the default --vo=gpu as the new renderer has some significant performance optimizations.

Mpv doesn't have the fastest scalers (ex: performance of 1080p video upscaled to 1440p compares defavorably to other players), but by default the result is very decent.
To avoid wasting ressources on chroma, you can explicitly set cscale (ex: catmull-rom or even bilinear).
If you are using a sharp downscaler (ex: catmull-rom or lanczos), you can set --no-linear-downscaling to limit ringing.

It is possible to define hotkeys in input.conf to switch between scalers at runtime, ex:
F8 cycle-values scale bilinear mitchell catmull_rom lanczos
or to set new scalers, ex:
F9 set scale spline36 ; set dscale catmull_rom ; set cscale catmull_rom

A .jpg image file or a paused video frame can be used as input for testing. The difference are visible (especially on elements such as text) but not that huge with typical (1.5x ratio) upscaling. This applies to general purpose videos, Anime may have specific requirements.

Last edited by butterw2; 10th January 2024 at 13:54. Reason: ! defaults have changed in mpv v0.37 / mpv-dev (2023-11)
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 21:00.


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