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 29th December 2020, 10:12   #61  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
# Screenshots

mpc-hc/be Source screenshot (Alt+I) Save Image...
...set the output parameters (stored in .ini/registry): jpg (ex: 96% JpegQuality) or .png (lossless), the output directory (SnapshotPath)
To take Output Screenshot (resized, with shaders and subtitles):
in fullscreen: Win+PrnScr (Win10 Screenshot, saved in Pictures\Screenshots)
Screenshot of window (to clipboard): Alt+PrnScr
...to get only the video frame, first Set View>Preset...>Minimal (1)
...(3) returns to Normal View
mpc-be (Shift+F5): Save Displayed Image (auto), ! this feature is not available in mpc-hc

Given that Directshow doesn't guarantee frame accurate seeking, it is preferable to select a keyframe for repeatable screenshots:
-Shift+Left/Right: Prev/Next keyframe
-Ctrl-G: Go to time/frame

---
mpv Output screenshot (Ctrl-s)
-s: output screenshot, but with same resolution as the source file
(mpv manual) "by default: Files named mpv-shotNNNN.jpg will be saved in the working directory, using the first available number - no files will be overwritten."

The default screenshot settings can be set in mpv.conf, ex:
screenshot-format=png
screenshot-jpeg-quality=96

Last edited by butterw2; 29th December 2020 at 11:34.
butterw2 is offline   Reply With Quote
Old 9th January 2021, 10:54   #62  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
# 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 a seekbar with buttons). 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, there a number of mpv-based players are available.
- mpv.net offers a fully user-customizable right-click menu (base mpv doesn't have a menu, only hotkeys).
- 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.
- mpc-hc/be and mpv can open .avs scripts. Mpv also displays the Avisynth exception in the console if the script has an error.
- mpc-hc doesn't do HDR2SDR tonemapping by default.
- vlc doesn't support user pixel shader 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 .
- mpc-hc and mpv have shader presets (multiple user configurable shader chains).
- mpc-hc shaders auto-update when their source file is modified.
- vlc has built-in audio filters (equalizer, compressor, etc.) with sliders.

Last edited by butterw2; 28th February 2021 at 21:39. Reason: +mpv.net
butterw2 is offline   Reply With Quote
Old 9th January 2021, 13:49   #63  |  Link
pirlouy
_
 
Join Date: May 2008
Location: France
Posts: 661
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   #64  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,717
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   #65  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
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   #66  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
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   #67  |  Link
pirlouy
_
 
Join Date: May 2008
Location: France
Posts: 661
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   #68  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
# 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   #69  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
# 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   #70  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
# 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.

Last edited by butterw2; 11th February 2021 at 12:39.
butterw2 is offline   Reply With Quote
Old 9th February 2021, 01:21   #71  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,717
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   #72  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
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   #73  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,717
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   #74  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
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   #75  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,717
May I ask why you choose base mpv over mpv.net?
stax76 is offline   Reply With Quote
Old 9th February 2021, 17:51   #76  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
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   #77  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,717
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   #78  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
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   #79  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,717
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   #80  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 204
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
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 15:31.


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