ENGLISH | 简体中文
- About
- Download
- Installation
- Support
- Settings
- Input and context menu
- Command Palette
- Command Line Interface
- Terminal
- mpv.net specific commands
- mpv.net specific options
- External Tools
- Scripting
- Extensions
- Color Theme
- Advanced Features
- Hidden Features
- Differences compared to mpv
- Technical Overview
- Context Menu Commands
mpv.net is a modern desktop media player for Windows based on the popular mpv player.
mpv.net is designed to be mpv compatible, almost all mpv features are available because they are all contained in libmpv, this means the official mpv manual applies to mpv.net.
mpv focuses on the usage of the command line and the terminal, mpv.net retains the ability to be used from the command line and the terminal and adds a modern Windows GUI on top of it.
Like mpv, mpv.net is designed for power users.
-
winget install mpv.net
mpv.net requires the .NET Framework 4.8 and Windows 7 or higher and a modern graphics card.
Internet streaming requires:
- Downloading yt-dlp and adding its folder to the user environment variable PATH.
- In case of proxy server usage, manual configuration.
File Associations can be registered using the context menu under 'Settings > Setup'.
After the file associations were registered, it might be necessary to change the default app in the Windows settings (Win+I, ms-settings:defaultapps).
Another way to register file associations is using Windows File Explorer, select a media file and select 'Open with > Choose another app' in the context menu.
Open with++ can be used to extend the File Explorer context menu to get menu items for Play with mpv.net and Add to mpv.net playlist.
When multiple files are selected in File Explorer and enter is pressed then the files are opened in mpv.net in random order, this works with maximum 15 files.
Before making a support request, please try the newest beta version first.
Support can be requested here:
Beginner questions:
mpv.net bug reports, feature requests and advanced questions:
https://github.com/stax76/mpv.net/issues
Advanced mpv questions:
https://github.com/mpv-player/mpv/issues
mpv.net searches the config folder at:
- startup\portable_config
- %APPDATA%\mpv.net (
C:\Users\%USERNAME%\AppData\Roaming\mpv.net
)
mpv options are stored in the file mpv.conf, mpv.net options are stored in the file mpvnet.conf, mpv.net options are documented here.
The input (key/mouse) bindings and the context menu definitions are stored in the input.conf file, if it's missing mpv.net generates it with default values.
Please be aware that once input.conf exists, mpv.net cannot update it, this means the menu becomes outdated when mpv.net is updated with new or changed default menu items. The only way to get an up-to-date menu is either resetting the menu by deleting input.conf or updating it by manually editing input.conf.
Global keyboard shortcuts are supported via global-input.conf file.
The config folder can be opened from the context menu: Settings > Open Config Folder
A input and config editor can be found in the context menu under 'Settings'.
The input test mode can be started via command line: --input-test
The input key list can be printed with --input-keylist or shown from the context menu under: View > Advanced > Show Keys
mpv.net input.conf defaults:
https://github.com/stax76/mpv.net/blob/master/src/Resources/input.conf.txt
mpv input.conf defaults: https://github.com/mpv-player/mpv/blob/master/etc/input.conf
mpv input commands: https://mpv.io/manual/master/#list-of-input-commands
mpv input options: https://mpv.io/manual/master/#input
The command palette is designed to quickly find, select and execute commands.
It can also be used to easily find shortcut keys.
The following functionality is presented with the Command Palette:
- Show media info in different ways.
- Show and select audio tracks.
- Show and select subtitle tracks.
- Show and select playlist files.
- Show and select recent files.
- Show available mpv properties.
- Show available decoders.
- Show available demuxers.
- Show available keys.
- Show available protocols.
Key | Action |
---|---|
F1 | Shows the command palette. |
Escape | Hides the command palette. |
Enter | Executes the selected item. |
Up | Moves the selection up. |
Down | Moves the selection down. |
mpvnet [options] [file|URL|PLAYLIST|-]
mpvnet [options] files
mpv properties can be set with the same syntax as mpv, that is:
To enable the border property:
--border
or --border=yes
To disable the border property:
--no-boder
or --border=no
Supported are all mpv properties, they are documented here:
https://mpv.io/manual/master/#properties
mpv.net has a feature to list all available properties:
Context Menu > View > Advanced > Show Properties
mpv has a few non property based switches which are generally not supported in mpv.net.
When mpv.net is started from a terminal it will output status, error and debug messages to the terminal and accept input keys from the terminal.
A common task for the terminal is debugging scripts.
script-message-to mpvnet <command> <arguments>
mpv.net commands are used when mpv commands don't exist or lack a feature.
Switches to the next audio track and shows info about that track.
Shows a file browser dialog to open external audio files.
Shows a file browser dialog to open external subtitle files.
Moves the Window to the screen edge (Alt+Arrow) or center (Alt+BS).
Opens the config folder with Windows File Explorer.
append
Appends files to the playlist.
Opens a file browser dialog in order to select files to be opened. The file browser dialog supports multiselect to load multiple files at once. Pressing CTRL appends the files to the playlist.
Shows a folder browser dialog to open a DVD or BD folder. ISO images don't have to be mounted, but instead can be opened directly with the open-files command.
Opens a single URL or filepath from the clipboard, or multiple files in the file clipboard format.
Cycles the pause property. In case the playlist is empty, the most recent file from the recent files list is loaded.
Changes the playlist position by adding the supplied integer value. If the position goes out of range, it jumpes to the opposite end.
Jumps to the first playlist entry, if the loaded file is already the first entry, nothing happens.
Jumps to the last playlist entry, if the loaded file is already the last entry, nothing happens.
Jumps to a random playlist entry.
On the first press a bookmark is saved, on the second press it is restored and removed. When a new file is loaded the bookmark is removed.
Registers the file associations.
Decreases or increases the Window size.
Shows the command palette to select a profile.
Shell executes a single file or URL.
Shows the about dialog.
Shows available audio devices in a message box.
Shows available audio tracks in the command palette and allows to load the selected audio track.
Shows chapters in the command palette.
Shows the command palette.
Shows available mpv imput commands.
Shows the conf editor.
Shows available decoders.
Shows available demuxers.
Shows the history file when existing.
Shows the input editor.
Shows available keys (as shown with --input-keylist
) in the command palette.
msgbox
Shows media info in a messsge box.
editor
Shows media info in the text editor.
osd Displays media info on screen.
full
Shows fully detailed media info.
raw
Shows media info with raw property names.
Shows the context menu.
Shows the playlist in the command palette and allows to play the selected entry.
Shows available profiles with a message box.
Shows a simple OSD progress message with time and date.
Shows available properties in the command palette and allows to display the property value of the selected property.
Shows available protocols in the command palette.
Shows recently played files and URLs in the command palette and allows to select and play entries.
Shows available subtitles in the command palette and allows to activate the selected subtitle.
Shows a OSD message with given text, duration and font size.
Works similar as the window-scale mpv property.
mpv.net specific options can be found in the conf editor searching for 'mpv.net'.
The options are saved in the mpvnet.conf file.
Initial window height in percent for audio files. Default: 70
Initial window height in percent for image files. Default: 80
Adds files to the playlist, requires --process-instance=single. Open with++ can be used to add files to the playlist using File Explorer.
Sends a input command to a running mpv.net instance via command line, for instance to create global keyboard shortcuts with AutoHotkey. Requires process-instance=single.
Save volume and mute on exit and restore it on start. Default: yes
Setting to remember the window size.
width-session
Width is remembered in the current session.
width-always
Width is always remembered.
height-session
Height is remembered in the current session. Default
height-always
Height is always remembered.
video
Window size is set to video resolution.
session
Window size is remembered in the current session.
always
Window size is always remembered.
Minimum aspect ratio of the window. Useful to force a wider window and therefore a larger OSC.
Same as minimum-aspect-ratio but used for audio files.
Save the window position on exit. Default: no
Threshold in milliseconds to wait for libmpv returning the video resolution before the window is shown, otherwise default dimensions are used as defined by autofit and start-size. Default: 1500
For single files automatically load the entire directory into the playlist. Can be suppressed via shift key. Default: yes
If the player is paused and another file is loaded, playback automatically resumes.
Defines if more then one mpv.net process is allowed.
Whenever the CTRL key is pressed when files or URLs are opened, the playlist is not cleared but the files or URLs are appended to the playlist. This not only works on process startup but in all mpv.net features that open files and URLs.
Multi can alternatively be enabled by pressing the SHIFT key.
multi
Create a new process everytime the shell starts mpv.net.
single
Force a single process everytime the shell starts mpv.net. Default
queue
Force a single process and add files to playlist.
Amount of recent files to be remembered. Default: 15
Usage of the media info library instead of mpv to access media information. Default: yes (mpv.net specific option)
Semicolon separated list of paths to be excluded from the history log feature.
Video file extensions used to create file associations and used by the auto-load-folder feature.
Audio file extensions used to create file associations and used by the auto-load-folder feature.
Image file extensions used to create file associations and used by the auto-load-folder feature.
Enable this only when a developer asks for it. Default: no
Enables a dark theme.
always
Default
system
Available on Windows 10 or higher.
never
Color theme used in dark mode. Default: dark
Color theme used in light mode. Default: light
Draws the blue mpv.net logo ontop of the native OSC logo. Default: yes
Draws the blue mpv.net logo with a santa hat in december, the option is called greenandgrumpy in mpv. Default: yes
In order to play videos from sites such as YouTube the Chrome Extension Play with mpv can be used.
Due to Chrome Extensions not being able to start a app, another app that communicates with the extension is required, this app can be downloaded here. The extension works only when the app is running, to have the app always running a link can be created in the auto start folder located at:
C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
This will start the app on system start and have it running in the background. When the file association registration of mpv.net was executed then the app should find the location of mpv.net, alternativly the mpv.net folder can be added to the Path environment variable.
Alternatively the Chrome/Firefox extension Open With can be used.
Open with++ can be used to extend the File Explorer context menu to get menu items for Play with mpv.net and Add to mpv.net playlist.
Videos can be streamed or downloaded easily with the Chrome extension External Application Button, for download (recommended):
path: wt
args: -- pwsh -NoLogo -Command "yt-dlp --ignore-errors --download-archive 'C:\External Application Button.txt' --output 'C:\YouTube\%(channel)s - %(title)s.%(ext)s' ('[HREF]' -replace '&list=.+','')"
A very large collection of Lua user scripts can be found in the mpv wiki here.
Lua scripting is documented in the mpv.net wiki here.
Location: <config folder>\scripts-ps
The PowerShell scripting host is not initialized before media files are loaded.
Location: <config folder>\scripts-cs
There are no compatibility guaranties.
Script code can be written within a C# extension, that way full code completion and debugger support is available. Once the code was developed and debugged, it can be moved from the extension to a lightweight standalone script. The script host uses an old C# version, modern features like string interpolation are not available.
There are synchronous and asynchronous events, prefer asynchronous events and don't block synchronous events and observed properties, as it would block the main event loop.
The C# scripting host is like extensions not initialized before media files are loaded.
Extensions are located in a subfolder extensions in the config folder and the filename must have the same name as the directory:
<config folder>\extensions\ExampleExtension\ExampleExtension.dll
There are synchronous and asynchronous events, prefer asynchronous events and don't block synchronous events and observed properties, as it would block the main event loop.
- Download and install Visual Studio Community.
- Create a new project of type Class Library .NET Framework and ensure the project name ends with Extension.
- Add a reference to System.ComponentModel.Composition.
- Add a reference to mpvnet.exe, select the mpvnet reference in the Solution Explorer, open the Properties window and set Copy Local to false to prevent mpvnet.exe being copied to the output directory when the project is built.
- Now open the project properties and set the output path in the Build tab,
extensions are like scripts located in your config folder, example:
<config folder>\extensions\ExampleExtension\ExampleExtension.dll
- Also in the project properties choose the option Start external program in the Debug tab and define the path to mpvnet.exe. In the Debug tab you may also define command line arguments like a video file to be played when you start debugging.
This extension writes a rating to the filename of rated videos when mpv.net shuts down.
The input.conf defaults contain key bindings for this extension to set ratings.
mpv.net supports custom color themes, the definition of the built-in themes can be found at:
Custom themes can be saved at:
<conf folder>\theme.conf
The theme.conf file may contain an unlimited amount of themes.
In the config editor under UI there are the settings dark-theme and light-theme to define the themes used in dark and in light mode.
vpy files are supported with following mpv.conf configuration:
[extension.vpy]
demuxer-lavf-format = vapoursynth
Python and VapourSynth must be in the path environment variable.
Hidden Features
Selecting multiple files in File Explorer and pressing enter will open the files in mpv.net. Explorer restricts this to maximum 15 files and the order will be random.
Whenever the control key is pressed when files or URLs are opened, the playlist is not cleared but the files or URLs are appended to the playlist. This works in all mpv.net features that open files or URLs.
Pressing the shift key while opening a single file will suppress loading all files of the folder into the playlist.
In fullscreen mode clicking the top right corner closes the player.
mpv.net is designed to work exactly like mpv, there are a few limitations:
mpv.net implements an own main window which means only mpv window features are supported that have an own implementation in mpv.net.
A window free mode is currently not supported, the main window is always visible, even when mpv.net is started from the terminal and music is played.
The documentation of mpv's window features can be found here:
https://mpv.io/manual/master/#window
mpv.net has currently implemented the following window properties:
- border
- fullscreen
- keepaspect-window
- ontop
- screen
- snap-window
- title
- window-maximized
- window-minimized
- window-scale
Partly implemented are:
- autofit-larger
Supported is a single integer value in the range 0-100. - autofit-smaller
Supported is a single integer value in the range 0-100. - autofit
Supported is a single integer value in the range 0-100.
mpv.net specific window features are documented in the screen section.
mpv.net supports property based mpv command line options which means it supports almost all mpv command line options.
What is not supported are non property bases options. Non property based options need an own implementation in mpv.net, so far implemented are:
--ad=help
--audio-device=help
--input-keylist
--profile=help
--vd=help
--version
The mpv property idle can be
used and mpv.net functions accordingly, but Lua scripts always see idle=yes
because mpv.net has to set it to function correctly, this is a difficult
to overcome libmpv limitation.
Options that are specific to mpv.net can be found by entering mpv.net in the search field of the config editor, in the mpv.net manual they are documented here.
mpv.net specific options are saved in the file mpvnet.conf and are just as mpv properties available on the command line.
mpv.net is written in C# 7 and runs on the .NET Framework 4.8.
The Extension implementation is based on the Managed Extensibility Framework.
The main window is WinForms based because WinForms allows better libmpv integration compared to WPF, all other windows are WPF based.
Third party components are:
The context menu of mpv.net is defined in the file input.conf which is located in the config directory.
If the input.conf file does not exists mpv.net generates it with the following defaults:
https://github.com/stax76/mpv.net/tree/master/src/Resources/input.conf.txt
input.conf defines mpv's key and mouse bindings and mpv.net uses comments to define the context menu.
The Open Files menu entry is one way to open files in mpv.net, it supports multi selection.
Another way to open files is the command line which is used by File Explorer for existing associations.
A third way is to drag and drop files on the main window.
Whenever the control key is pressed when files or URLs are opened, the playlist is not cleared but the files or URLs are appended to the playlist. This works in all mpv.net features that open files or URLs.
Pressing the shift key while opening a single file will suppress loading all files in the folder.
Blu-ray and DVD ISO image files are supported.
Opens files and URLs from the clipboard. How to open URLs directly from the browser from sites like YouTube is described in the External Tools section.
Opens a DVD/Blu-ray Drive/Folder.
Allows to load an external audio file. It's also possible to auto detect external audio files based on the file name, the option for this can be found in the settings under 'Settings > Show Config Editor > Audio > audio-file-auto'.
Allows to load an external subtitle file. It's also possible to auto detect external subtitle files based on the file name, the option for this can be found in the settings under 'Settings > Show Config Editor > Subtitles > sub-auto'.
Play/Pause using the command:
cycle pause
Stops the player and unloads the playlist using the command:
stop
Toggles fullscreen using the command:
cycle fullscreen
Navigates to the previous file in the playlist using the command:
playlist-prev
Navigates to the next file in the playlist using the command:
playlist-next
Navigates to the next chapter using the command:
add chapter 1
Navigates to the previous chapter using the command:
add chapter -1
Jumps to the next frame using the command:
frame-step
Jumps to the previous frame using the command:
frame-back-step
Seeking using the command:
no-osd seek sec
sec is the relative amount of seconds to jump, the no-osd prefix is used because mpv.net includes a script that shows the position when a seek operation is performed, the script uses a more simple time format.
Adds video zoom using the command:
add video-zoom 0.1
Adds negative video zoom using the command:
add video-zoom -0.1
add video-pan-x -0.01
video-pan-x, video-pan-y property
add video-pan-x 0.01
video-pan-x, video-pan-y property
add video-pan-y -0.01
video-pan-x, video-pan-y property
add video-pan-y 0.01
video-pan-x, video-pan-y property
add panscan -0.1
add panscan 0.1
Resets Pan & Scan, multiple commands in the same line are separated with semicolon.
set video-zoom 0; set video-pan-x 0; set video-pan-y 0
video-pan-x, video-pan-y property
Decreases contrast with the following command:
add contrast -1
Increases contrast with the following command:
add contrast 1
Decreases brightness using the following command:
add brightness -1
Increases brightness using the following command:
add brightness 1
Decreases gamma using the following command:
add gamma -1
Increases gamma using the following command:
add gamma 1
Decreases saturation using the following command:
add saturation -1
Increases saturation using the following command:
add saturation 1
async screenshot
Cycles the deinterlace property using the following command:
cycle deinterlace
Cycles the aspect ratio using the following command:
cycle-values video-aspect 16:9 4:3 2.35:1 -1
This uses a mpv.net command that shows better info then the mpv preset and also has the advantage of not showing no audio.
Adds a audio delay using the following command:
add audio-delay 0.1
Adds a negative audio delay using the following command:
add audio-delay -0.1
Shows the next subtitle track using the following command:
script-message-to mpvnet cycle-subtitles
Cycles the subtitle visibility using the following command:
cycle sub-visibility
Adds a negative subtitle delay using the following command:
add sub-delay -0.1
Adds a positive subtitle delay using the following command:
add sub-delay 0.1
Moves the subtitle up using the following command:
add sub-pos -1
Moves the subtitle down using the following command:
add sub-pos 1
Decreases the subtitle font size using the following command:
add sub-scale -0.1
Increases the subtitle font size using the following command:
add sub-scale 0.1
Increases the volume using the following command:
add volume 10
Decreases the volume using the following command:
add volume -10
Cycles the mute property using the following command:
cycle mute
Decreases the speed by 10% using the following command:
multiply speed 1/1.1
Increases the speed by 10% using the following command:
multiply speed 1.1
Halfs the speed using the following command:
multiply speed 0.5
Doubles the speed using the following command:
multiply speed 2
Resets the speed using the following command:
set speed 1
A plugin the writes the rating to the filename.
Forces the player to stay on top of other windows using the following command:
set ontop yes
Disables the player to stay on top of other windows using the following command:
set ontop no
Shows info using a mpv.net command about the current file, shows length, position, formats, size and filename.
Show statistics using the following command:
script-binding stats/display-stats
Toggles statistics using the following command:
script-binding stats/display-stats-toggle
Toggles OSC Visibility using the following command:
script-binding osc/visibility
Shows the playlist for 5 seconds using the following command:
show-text ${playlist} 5000
Shows the Audio/Video/Subtitle list for 5 seconds using the following command:
show-text ${track-list} 5000
Shows mpv.net's config editor.
Shows mpv.net's key binding editor.
Opens the config folder which contains:
mpv.conf file containing mpv settings
mpvnet.conf file containing mpv.net settings
input.conf containing mpv key and mouse bindings
User scripts and user extensions
Shows the command palette window which allows to quickly find and execute commands and key shortcuts.
Shows a text file that contains the file history. If the file don't exist it asks if the file should be created in the settings folder. Once the file exist then the history is logged. It logges the playback history containing the time and filename.
To ignore certain paths:
script-opt = history-discard=path1;path2
Enables to set loop start and end points using the following command:
ab-loop
Loops the current file infinitely using the following command:
cycle-values loop-file "inf" "no"
Cycles the hwdec property to enable/disable hardware decoding using the following command:
cycle-values hwdec "auto" "no"
Allows to manage file associations.
Shows the mpv manual.
Shows the mpv.net web site.
Shows the mpv.net manual.
Shows the mpv.net about dialog which shows a copyright notice, the versions of mpv.net and libmpv and a license notice (GPL v2).
Exits mpv.net using the following command:
quit
Exits mpv.net and remembers the position in the file using the following command:
quit-watch-later