Compare commits

...

50 Commits

Author SHA1 Message Date
stax76
dbf1a32580 v6.0.3.2 2022-10-14 12:18:12 +02:00
stax76
a81ed58983 finish repo transfer 2022-10-12 12:40:40 +02:00
stax76
33df960d04 Merge branch 'master' of https://github.com/stax76/mpv.net 2022-10-02 15:40:55 +02:00
stax76
337bee9f28 fix severe termination bug 2022-10-02 15:40:53 +02:00
stax76
e57c41a254 Merge pull request #495 from nkh0472/patch-1
Update Manual_chs.md
2022-10-01 10:19:41 +02:00
nkh0472
62d06c65ab Update Manual_chs.md
Co-authored-by: hooke007 <hooke007@qq.com>
2022-09-25 19:21:22 +08:00
nkh0472
e70a935d7a Update Manual_chs.md
Add more info about translations update this time
2022-09-19 21:14:48 +08:00
nkh0472
c8e6ce678a Update Manual_chs.md
Translations for b73d2e7107 and 1f6025a10f
2022-09-18 23:03:37 +08:00
stax76
22960af78b mouse cursor auto-hide behavior 2022-08-19 07:13:07 +02:00
stax76
95e31a1d3f Improved mouse cursor hide behavior 2022-08-19 06:53:49 +02:00
stax76
06ff83b75c shorter OSD media info 2022-08-18 09:44:52 +02:00
stax76
1f6025a10f New command to move the Window to the screen edge 2022-08-18 09:31:23 +02:00
stax76
00bfa20fac improved OSD media info 2022-08-08 03:19:11 +02:00
stax76
1475d5ee66 conf editor option definition simplyfication 2022-08-07 14:21:11 +02:00
stax76
b73d2e7107 new history-filter option added 2022-08-07 13:50:29 +02:00
stax76
a7fa76d63a relative path fix 2022-08-05 07:11:50 +02:00
stax76
e2c720346a fix #480 2022-08-05 06:29:49 +02:00
stax76
01a853e865 Merge pull request #475 from hooke007/doc
bump Manual_chs v6.0.3.1
2022-07-31 06:47:19 +02:00
hooke007
6510de2bd8 bump Manual_chs v6.0.3.1 2022-07-31 01:01:58 +01:00
stax76
7fc1de2ce3 update process-instance description 2022-07-30 13:35:17 +02:00
stax76
b0d399e9ee update changelog 2022-07-30 13:20:39 +02:00
stax76
7f680829ef update changelog 2022-07-30 13:05:30 +02:00
stax76
603f956261 update changelog 2022-07-30 12:55:32 +02:00
stax76
6d06df9004 6.0.3.1 2022-07-30 12:52:19 +02:00
stax76
5ea086d05b Support --audio-file and --sub-file aliases 2022-07-30 11:45:07 +02:00
stax76
1ad819fa9d Fix external audio tracks not shown correctly in tracks context menu 2022-07-30 11:26:45 +02:00
stax76
f2dd6205b5 Merge branch 'master' of https://github.com/stax76/mpv.net 2022-07-27 09:42:02 +02:00
stax76
b2a3c231ff command line syntax is supported in mpv.conf 2022-07-27 09:42:00 +02:00
stax76
f6c223a411 Update issue templates 2022-07-25 09:51:28 +02:00
stax76
e7a2ba6805 Update issue templates 2022-07-25 09:43:58 +02:00
stax76
5a08d9ccd6 Shift key enables process-instance=multi 2022-07-23 08:50:07 +02:00
stax76
5714a5e62a Merge branch 'master' of https://github.com/stax76/mpv.net 2022-07-17 08:04:43 +02:00
stax76
def7e5ac5a misc 2022-07-17 08:04:32 +02:00
stax76
601bb20492 Update FUNDING.yml 2022-07-14 04:31:20 +02:00
stax76
59600df977 update manual 2022-07-13 09:02:51 +02:00
stax76
e1b9730e9b use mpv.net to cycle subtitles 2022-07-12 05:49:05 +02:00
stax76
e378551938 misc 2022-07-11 13:14:26 +02:00
stax76
a82b2ef571 disable unused mpv events 2022-07-11 07:05:50 +02:00
stax76
6157a01701 disable unused mpv events 2022-07-11 06:57:10 +02:00
stax76
ec17ae8ce9 support shortcuts with media file target 2022-07-11 06:14:01 +02:00
stax76
f719528017 fix #293 2022-07-10 10:30:01 +02:00
stax76
966b45eb65 shorten annoying media info titles 2022-07-10 00:49:56 +02:00
stax76
eeae6994a2 remove basic view and enhance advanced view of show-info command 2022-07-09 17:26:49 +02:00
stax76
07809d882f use mpvnet instead of mpv to create playlist from folder 2022-07-08 12:20:36 +02:00
stax76
e970f0b4e4 libmpv shinchiro 2022-07-02 2022-07-08 05:51:06 +02:00
stax76
a36b6a3fdf misc 2022-07-04 08:45:37 +02:00
stax76
4febca257f properly fix OSC hide behavior 2022-07-04 08:32:53 +02:00
stax76
9d493b4d08 store package update 2022-07-03 10:49:13 +02:00
stax76
9a6bf5a481 v6.0.3.0 update changelog 2022-07-03 10:35:39 +02:00
stax76
40565e8b3d fix possible race condition 2022-07-02 15:10:22 +02:00
29 changed files with 702 additions and 692 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1,3 +1,2 @@
github: stax76
patreon: stax76
ko_fi: stax76

View File

@@ -8,3 +8,33 @@ assignees: stax76
---
This template is meant for usage questions of mpv.net.
Some type of questions like questions about a problem require filling out an issue template:
**Describe the problem**
A clear and concise description of what the problem is.
**To Reproduce**
To reproduce, try the last beta version using the CLI option `--config=no`.
In case of an audio or video problem, try to reproduce the problem using mpv instead of mpv.net.
If it can be reproduced with mpv, use the [mpv issue tracker](https://github.com/mpv-player/mpv/issues).
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
1. mpv.net version
2. Windows version
3. GPU name
4. Media info

View File

@@ -11,6 +11,11 @@ assignees: stax76
A clear and concise description of what the bug is.
**To Reproduce**
To reproduce, try the last beta version using the CLI option `--config=no`.
In case of an audio or video issue, try to reproduce the issue using mpv instead of mpv.net.
If it can be reproduced with mpv, use the [mpv issue tracker](https://github.com/mpv-player/mpv/issues).
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
@@ -25,3 +30,7 @@ If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
1. mpv.net version
2. Windows version
3. GPU name
4. Media info

View File

@@ -16,10 +16,6 @@ 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, for regular users there is a
[mpv.net-next](https://github.com/mpv-net-player/mpv.net-next)
project under construction.
#### Graphical User Interface
Modern GUI with customizable color themes.

View File

@@ -1,4 +1,59 @@
# v6.0.3.2 Beta (2022-10-14)
- Support multiple folders input (regression fix).
- Relative file input paths are converted to absolute paths.
- New history-filter option added to define paths to be excluded from the history log feature.
- New command to move the Window to the screen edge (Alt+Arrow) or center (Alt+BS).
- Smaller OSD media info font size and more duplicated and obvious info removed from titles.
- Improved mouse cursor auto hide behavior.
- Fix severe bug causing termination before scripts having a chance reacting to shutdown event.
- mediainfo v22.09.
- libmpv shinchiro 2022-10-14, fixes a severe bug causing hangs:
https://github.com/mpv-player/mpv/pull/10569
input.conf changes:
New:
```
Alt+Left script-message-to mpvnet move-window left #menu: View > Move > Left
Alt+Right script-message-to mpvnet move-window right #menu: View > Move > Right
Alt+Up script-message-to mpvnet move-window top #menu: View > Move > Top
Alt+Down script-message-to mpvnet move-window bottom #menu: View > Move > Bottom
Alt+BS script-message-to mpvnet move-window center #menu: View > Move > Center
```
# 6.0.3.1 (2022-07-30)
- Creating a playlist from a folder uses absolute normalized paths, non-media files are ignored.
- The show-info command shows directly an advanced view, which was enhanced with a General section and the filename.
- Media info titles are shortened if they contain duplicated or obvious information.
- Support of shortcuts (.lnk files) with media file target.
- Support --audio-file and --sub-file aliases.
- playlist-random (F9 key) command jumps to a random playlist entry.
- Fix OSC hide behavior on mouse move.
- New binding (e key) to show the current file in File Explorer.
- Shift key enables process-instance=multi.
- Command line syntax (preceding double hyphen) is supported in mpv.conf for options implemented by mpv.net.
- MediaInfo v22.06
- libmpv shinchiro 2022-07-30
input.conf changes:
New:
```
e run powershell -command "explorer.exe '/select,' ( \"${path}\" -replace '/', '\\' )" #menu: Tools > Show current file in File Explorer
F9 script-message-to mpvnet playlist-random #menu: Navigate > Random File
```
# 6.0.3.0 (2022-07-03)
- Fix the rare occasion of duplicated playlist entries produced by the auto-load-folder feature.
# 6.0.2.0 (2022-07-02)
- Fix main window shown collapsed when the player was started with full screen.
@@ -6,7 +61,7 @@
# 6.0.1.0 (2022-06-30)
- New tutorial: [Extending mpv and mpv.net via Lua scripting](https://github.com/stax76/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting)
- New tutorial: [Extending mpv and mpv.net via Lua scripting](https://github.com/mpvnet-player/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting)
- New options `autofit-image` and `autofit-audio`, like autofit, but used for image and audio files.
- New [auto-mode](https://github.com/stax76/mpv-scripts) script to use mpv and mpv.net as image viewer and audio player.
- New [smart-volume](https://github.com/stax76/mpv-scripts) script. Records the volume per file in order to restore it
@@ -113,11 +168,11 @@ All occurrences of `script-message mpv.net` were changed to `script-message-to m
- Media Info isn't shown directly, instead the command palette
shows several choices. The command palette can be bypassed
using the arguments: msgbox, editor, full, raw.
https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#show-media-info-flags
https://github.com/mpvnet-player/mpv.net/blob/master/docs/Manual.md#show-media-info-flags
- mpv.net specific commands, the command palette, auto-play property
and various other things are documented in the manual.
- The action used for the right mouse button can be configured.
https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#show-menu
https://github.com/mpvnet-player/mpv.net/blob/master/docs/Manual.md#show-menu
- Workaround not reproducible logo drawing crash.
- Info command shows the length.
- New mpv.net specific option `show-logo` that allows to disable
@@ -147,10 +202,10 @@ All occurrences of `script-message mpv.net` were changed to `script-message-to m
- Fix script-opts files being ignored.
- Showing the recent list in the command palette,
the top item gets auto selected.
https://github.com/stax76/mpv.net/issues/328#issuecomment-1057296054
https://github.com/mpvnet-player/mpv.net/issues/328#issuecomment-1057296054
- If the play list is empty, the most recent file
gets loaded when pressing space.
https://github.com/stax76/mpv.net/issues/328#issuecomment-1057296054
https://github.com/mpvnet-player/mpv.net/issues/328#issuecomment-1057296054
- Ctrl+v (previously u) opens files (or URLs) from the clipboard,
previously it had to be a file path (format string) and now
it can also be the clipboard format of type file.
@@ -519,27 +574,27 @@ stable release, no changes since the last beta
https://mpv.io/manual/master/#legacy-option-syntax
- new: PowerShell script host was completely rewritten, events can be assigned
by using `Register-ObjectEvent`, the scripting wiki page was updated
https://github.com/stax76/mpv.net/wiki/Scripting#powershell
https://github.com/mpvnet-player/mpv.net/wiki/Scripting#powershell
- new: Context Menu > View > Show Profiles
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L147
https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L147
- new: Context Menu > View > Show Properties
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L148
https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L148
- new: Context Menu > View > Show Commands
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L149
https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L149
- new: config editor tab is now remembered
- new: osd-duration setting added to config editor and default mpv.conf
- new: external console replaced with internal console, in case mpv.conf is missing it's
generated with correct Hight DPI font size scale settings.
`script-opts=console-scale=<dpiscale>`
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L150
https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L150
https://mpv.io/manual/master/#console
- new: blue color in dark theme is now less intense
https://github.com/stax76/mpv.net/blob/master/Manual.md#color-theme
https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md#color-theme
- new: menu item 'View > Show Progress' (p key) to show progress bar
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L146
https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L146
- new: `script-message mpv.net playlist-first`, unlike mpv does not
restart if the first file is already active
https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L44
https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L44
- new: if mpv.net is started from the terminal and an error happens then the error
is printed to the terminal instead of shown with a message box
- fix: update routine did only work when mpv.net was located in 'Program Files'
@@ -556,7 +611,7 @@ stable release, no changes since the last beta
- new: update check, it must be enabled first in the conf editor under General
- new: update feature, requires PowerShell 5 and curl,
an up to date Windows 10 system has both included.
Main menu (input.conf) must be reset or updated manually ([defaults](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt))
Main menu (input.conf) must be reset or updated manually ([defaults](https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt))
- update: libmpv shinchiro 2019-11-10
@@ -565,17 +620,17 @@ stable release, no changes since the last beta
- fix: the file association routine uses no longer 'Play with mpv.net' for the
default open verb caption because it doesn't support multi selection,
it shows now only Open, the manual explains how to get multi selection
in File Explorer, read about it [here](https://github.com/stax76/mpv.net/blob/master/Manual.md#open-with)
in File Explorer, read about it [here](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md#open-with)
- fix: x86 builds had an older version included because
of a misconfiguration in the solution file
### 5.4.3.0
- new: the color themes can now be customized ([manual](https://github.com/stax76/mpv.net/blob/master/Manual.md#color-theme))
- new: three new sections were added to the [manual](https://github.com/stax76/mpv.net/blob/master/Manual.md):
1. [Color Theme](https://github.com/stax76/mpv.net/blob/master/Manual.md#color-theme)
2. [Hidden and secret features](https://github.com/stax76/mpv.net/blob/master/Manual.md#hidden-and-secret-features)
3. [External Tools](https://github.com/stax76/mpv.net/blob/master/Manual.md#external-tools)
- new: the color themes can now be customized ([manual](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md#color-theme))
- new: three new sections were added to the [manual](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md):
1. [Color Theme](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md#color-theme)
2. [Hidden and secret features](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md#hidden-and-secret-features)
3. [External Tools](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md#external-tools)
- fix: window restore from maximized and from minimized was broken
- fix: it's possible to multi select files in File Explorer and press
@@ -595,13 +650,13 @@ stable release, no changes since the last beta
context menu item in explorer with multi selection support use my
[Open with++](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) shell extension, as far as I know multi selection
can not be done using the Registry but only via shell extension
- window-size mpv property support added ([default bindings](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L137))
- window-size mpv property support added ([default bindings](https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L137))
- the config editor keeps profiles and comments in mpv.conf intact!
- the options in the config editor are better organized
### 5.4.2
- new: the [scripting wiki page](https://github.com/stax76/mpv.net/wiki/Scripting#powershell) was improved
- new: the [scripting wiki page](https://github.com/mpvnet-player/mpv.net/wiki/Scripting#powershell) was improved
- new: Toggle Shuffle has been added to the menu defaults
- new: for URLs the media title is shown in the title bar and in the info command
instead of displaying the URL, mpv.conf defaults were changed to use
@@ -669,7 +724,7 @@ stable release, no changes since the last beta
### 5.1
- many [wiki pages](https://github.com/stax76/mpv.net/wiki) were improved
- many [wiki pages](https://github.com/mpvnet-player/mpv.net/wiki) were improved
- the logo/icon had a very small cosmetic change
- the help in the context menu was improved,
for quick access consider the command palette (F1 key)
@@ -703,7 +758,7 @@ stable release, no changes since the last beta
### 5.0
- [changed icon design](https://github.com/stax76/mpv.net/blob/master/img/mpvnet.png)
- [changed icon design](https://github.com/mpvnet-player/mpv.net/blob/master/img/mpvnet.png)
- libmpv was updated to shinchiro 2019-07-14
- new or improved config editor settings: screenshot-directory,
screenshot-format, screenshot-tag-colorspace, screenshot-high-bit-depth,
@@ -722,7 +777,7 @@ stable release, no changes since the last beta
the script is located at startup/scripts
- terminal support added using mpvnet.com !
- script engine performance and error handling was improved
- the [scripting wiki page](https://github.com/stax76/mpv.net/wiki/Scripting) was improved
- the [scripting wiki page](https://github.com/mpvnet-player/mpv.net/wiki/Scripting) was improved
- the C# scripting host extension was converted from VB to C# because it's not
only used for hosting but I also use it now to code and debug script code
- there was a copy paste bug in the file association feature resulting in keys
@@ -792,7 +847,7 @@ stable release, no changes since the last beta
pressed, the files are opened as selected, the order is random though
because Explorer starts multiple mpv.net processes concurrently
- libmpv was updated to shinchiro 2019-06-30
- the [mpv.conf defaults](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/mpv.conf.txt) were changed to show a larger OSC
- the [mpv.conf defaults](https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/mpv.conf.txt) were changed to show a larger OSC
- in case a file is opened that has a aspect ratio smaller then 1.2 then
the window size will use a aspect ratio of 1.8
- new JavaScript script osc-visibility.js included in the distribution
@@ -810,7 +865,7 @@ stable release, no changes since the last beta
- invalid command-line arguments were ignored, now an error message is shown
- a description on how to start mpv.net from Google Chrome was added to the
manual, it's useful to play videos from sites like YouTube, find the
description [here](https://github.com/stax76/mpv.net/blob/master/Manual.md#chrome-extension)
description [here](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md#chrome-extension)
- new config setting remember-height added to remember the window height,
otherwise the video's native resolution is used
- support for protocols other then http added
@@ -825,13 +880,13 @@ stable release, no changes since the last beta
- the playlist is never cleared whenever the control key is down but
files and URLs are appended instead
- powershell script hosting bugs were fixed and a new powershell example script
was added to the [scripting wiki page](https://github.com/stax76/mpv.net/wiki/Scripting#powershell)
was added to the [scripting wiki page](https://github.com/mpvnet-player/mpv.net/wiki/Scripting#powershell)
- the menu entry for the command palette was renamed to 'Show All Commands' and
the default key binding was changed to F1 which is also the default in VS Code
- the default key binding of the Everything media search was changed to F3
- support for the mpv property 'border' was added to the config editor
to show/hide the window decoration (titlebar, border). A toggle menu item and
key binding (b) was added as well ([Default Binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L135))
key binding (b) was added as well ([Default Binding](https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L135))
### 4.3.1
@@ -846,7 +901,7 @@ stable release, no changes since the last beta
- the help and layout in the config editor was improved
- clipboard monitoring for URLs can be disabled in the settings
- the context menu has a new feature: Open > Add files to playlist,
it appends files to the playlist [(Default binding)](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L33)
it appends files to the playlist [(Default binding)](https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L33)
- a setting was added to force using a single mpv.net process instance
### 4.1
@@ -861,7 +916,7 @@ stable release, no changes since the last beta
- on the start screen the mpv.NET icon is shown instead of the mpv icon,
feedback and contributions regarding the icon are welcome! The paint.net
pdn and png source is located [here](https://github.com/stax76/mpv.net/tree/master/img)
pdn and png source is located [here](https://github.com/mpvnet-player/mpv.net/tree/master/img)
- everytime only one file is opened the complete folder is loaded in the playlist
- the info command (i key) shows the audio format
- new options osd-font-size, sub-font, sub-font-size
@@ -888,7 +943,7 @@ stable release, no changes since the last beta
- there was a bug that caused underscores beeing removed from input like MBTN_LEFT_DBL
- the search clear button in the input editor had a render issue in dark mode
- new search feature added to search and play media files, requires
[Everything](https://www.voidtools.com) to be installed. [Default Binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L29)
[Everything](https://www.voidtools.com) to be installed. [Default Binding](https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L29)
### 3.5
@@ -901,6 +956,6 @@ stable release, no changes since the last beta
### 3.4
- new feature added to manage file associations from within the app. It can be found in the menu at: Tools > Manage... [Default Binding](https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L149)
- new feature added to manage file associations from within the app. It can be found in the menu at: Tools > Manage... [Default Binding](https://github.com/mpvnet-player/mpv.net/blob/master/mpv.net/Resources/input.conf.txt#L149)
- new zip download option added
- new x86 download option added

View File

@@ -42,9 +42,7 @@ 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, for regular users there is a
[mpv.net-next](https://github.com/mpv-net-player/mpv.net-next)
project under construction.
Like mpv, mpv.net is designed for power users.
Download
@@ -67,7 +65,7 @@ Internet streaming requires:
- Downloading [yt-dlp](https://github.com/yt-dlp/yt-dlp) and adding its folder
to the [user environment variable PATH](https://www.google.com/search?q=user+environment+variable+PATH).
- In case of proxy server usage, [manual configuration](https://github.com/stax76/mpv.net/issues/401).
- In case of proxy server usage, [manual configuration](https://github.com/mpvnet-player/mpv.net/issues/401).
#### File Associations
@@ -90,12 +88,21 @@ the files are opened in mpv.net in random order, this works with maximum 15 file
Support
-------
Before making a support request, please try the newest version first.
Before making a support request, please try the newest [beta version](../../../releases) first.
Bugs and feature requests can be made on the github [issue tracker](../../../issues),
feel free to use for anything mpv.net related, usage questions are welcome.
Support can be requested here:
Or use the [support thread](https://forum.videohelp.com/threads/392514-mpv-net-a-extendable-media-player-for-windows) in the VideoHelp forum.
Beginner questions:
https://www.reddit.com/r/mpv
mpv.net bug reports, feature requests and advanced questions:
https://github.com/mpvnet-player/mpv.net/issues
Advanced mpv questions:
https://github.com/mpv-player/mpv/issues
Settings
@@ -134,7 +141,7 @@ 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
https://github.com/mpvnet-player/mpv.net/blob/master/src/Resources/input.conf.txt
mpv input.conf defaults:
https://github.com/mpv-player/mpv/blob/master/etc/input.conf
@@ -234,6 +241,9 @@ Shows a file browser dialog to open external audio files.
### load-sub
Shows a file browser dialog to open external subtitle files.
### move-window [left|top|right|bottom|center]
Moves the Window to the screen edge (Alt+Arrow) or center (Alt+BS).
### open-conf-folder
Opens the config folder with Windows File Explorer.
@@ -270,6 +280,9 @@ already the first entry, nothing happens.
Jumps to the last playlist entry, if the loaded file is
already the last entry, nothing happens.
### playlist-random
Jumps to a random playlist entry.
### quick-bookmark
On the first press a bookmark is saved, on the second
@@ -320,9 +333,6 @@ Shows available demuxers.
Shows the history file when existing.
### show-info
Shows media info on screen, a second key press shows more detailed media info.
### show-input-editor
Shows the input editor.
@@ -475,10 +485,12 @@ playback automatically resumes.
Defines if more then one mpv.net process is allowed.
Tip: Whenever the CTRL key is pressed when files or URLs are opened,
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.
@@ -496,6 +508,10 @@ 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)
#### --history-filter
Semicolon separated list of paths to be excluded from the history log feature.
#### --video-file-extensions=\<string\>
Video file extensions used to create file associations and used by the auto-load-folder feature.
@@ -572,31 +588,6 @@ Alternatively the Chrome/Firefox extension [Open With](../../../issues/119) can
[Open with++](https://github.com/stax76/OpenWithPlusPlus) can be used to extend the File Explorer context menu to get menu items for [Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) and [Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist).
### Universal Remote Android app
Universal Remote is Android remote control app which costs 5 €.
https://www.unifiedremote.com
https://play.google.com/store/apps/details?id=com.Relmtech.Remote
https://play.google.com/store/apps/details?id=com.Relmtech.RemotePaid
https://www.unifiedremote.com/tutorials/how-to-create-a-custom-keyboard-shortcuts-remote
https://www.unifiedremote.com/tutorials/how-to-install-a-custom-remote
[My config](./Universal%20Remote)
Very useful is the Universal Remote File Browser feature.
### One For All Contour URC1210 and FLIRC USB
My primary remote control solution however is a One For All Contour URC1210
using Philips code 0556 together with FLIRC USB (gen2).
### External Application Button
Videos can be streamed or downloaded easily with the Chrome extension
@@ -614,7 +605,7 @@ Scripting
A very large collection of Lua user scripts can be found in the mpv wiki [here](https://github.com/mpv-player/mpv/wiki/User-Scripts).
Lua scripting is documented in the mpv.net wiki [here](https://github.com/stax76/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting).
Lua scripting is documented in the mpv.net wiki [here](https://github.com/mpvnet-player/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting).
#### JavaScript
@@ -848,7 +839,7 @@ 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>
<https://github.com/mpvnet-player/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.
@@ -1241,7 +1232,7 @@ Adds a negative audio delay using the following command:
Shows the next subtitle track using the following command:
`cycle sub`
`script-message-to mpvnet cycle-subtitles`
[cycle command](https://mpv.io/manual/master/#command-interface-cycle-%3Cname%3E-[%3Cvalue%3E])
@@ -1577,7 +1568,7 @@ Shows the [mpv.net web site](https://mpv-net.github.io/mpv.net-web-site/).
### Help > Show mpv.net manual
Shows the [mpv.net manual](https://github.com/stax76/mpv.net/blob/master/Manual.md).
Shows the [mpv.net manual](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md).
### Help > About mpv.net

View File

@@ -2,7 +2,7 @@
mpv.net手册
==============
适配版本 [v6.0.0.0-beta](https://github.com/stax76/mpv.net/releases/tag/v6.0.0.0-beta)
适配版本 [Master_commit_220819](https://github.com/mpvnet-player/mpv.net/commit/22960af78b7e1b7255954d845b3d378330aa449b)
**[ENGLISH](Manual.md)** | **简体中文**
@@ -36,13 +36,11 @@ mpv.net手册
mpv.net是基于受欢迎的mpv的Windows现代媒体播放器。
mpv.net出于兼容mpv而设计几乎所有mpv的功能都可用因为它们都包含在libmpv中
这意味着[mpv官方手册](https://mpv.io/manual/master/) 也适用于mpv.net。
mpv.net出于兼容mpv而设计几乎所有mpv的功能都可用因为它们都包含在libmpv中这意味着[mpv官方手册](https://mpv.io/manual/master/) 也适用于mpv.net。
mpv专注命令行与终端的使用而mpv.net保留了这些并加入了现代化的图形界面。
与mpv一样mpv.net也是为高级用户设计的,对于普通用户,
有一个正在建设中的 [mpv.net-next](https://github.com/mpv-net-player/mpv.net-next) 项目。
与mpv一样mpv.net也是为高级用户设计的
下载
@@ -65,36 +63,39 @@ mpv.net需要.NET Framework 4.8运行库和高于win7版本的系统以及一张
互联网流媒体需要:
- 下载[yt-dlp](https://github.com/yt-dlp/yt-dlp)并将其添加到[用户环境变量PATH](https://www.google.com/search?q=user+environment+variable+PATH)
- 在使用代理服务器的情况下,需要[手动配置](https://github.com/stax76/mpv.net/issues/401)。
- 在使用代理服务器的情况下,需要[手动配置](https://github.com/mpvnet-player/mpv.net/issues/401)。
#### 文件关联
可以使用上下文菜单注册文件关联。 'Settings > Setup'
注册完文件关联后,进入 "Windows设置 > 应用 > 默认应用" (Win+I, ms-settings:defaultapps)
然后选择mpv. net作为视频/音频/图像的默认程序。
注册完文件关联后,进入 "Windows设置 > 应用 > 默认应用" (Win+I, ms-settings:defaultapps) 然后选择mpv. net作为视频/音频/图像的默认程序。
另一种注册文件关联的方式是使用文件资源管理器,选中媒体文件后,
选择上下文菜单的 '打开方式 > 选择其它应用' 。
另一种注册文件关联的方式是使用文件资源管理器,选中媒体文件后,选择上下文菜单的 '打开方式 > 选择其它应用' 。
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单
[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和
[Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist).
可用来获取 'Play with mpv.net' 和 'Add to mpv.net playlist' 的菜单子项
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单。[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和 [Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) 可用来获取 'Play with mpv.net' 和 'Add to mpv.net playlist' 的菜单子项
当在资源管理器中选择多个文件并按 enter 键时文件会在mpv.net随机排序打开
最多限制15个文件。
当在资源管理器中选择多个文件并按 enter 键时文件会在mpv.net随机排序打开最多限制15个文件。
支持
-------
在提出支持请求之前,先尝试最新的测试版
在提出支持请求之前,先尝试最新的 [测试版](../../../releases)
程序错误和功能请求可以在github的 [问题追踪](../../../issues) 上提出,
任何与mpv. net相关的东西都可以使用欢迎提交使用上出现的问题。
可以在这些地方请求支持:
或者浏览VideoHelp论坛的 [讨论帖](https://forum.videohelp.com/threads/392514-mpv-net-a-extendable-media-player-for-windows)
初学者提问:
https://www.reddit.com/r/mpv
mpv.net的错误报告、功能请求和高级问题
https://github.com/mpvnet-player/mpv.net/issues
高级的mpv问题
https://github.com/mpv-player/mpv/issues
设置
@@ -105,20 +106,15 @@ mpv.net在以下路径寻找设置文件夹
1. <程序启动目录>\portable_config
2. %APPDATA%\mpv.net (`C:\Users\%USERNAME%\AppData\Roaming\mpv.net`)
mpv的选项保存在mpv.conf文件中
mpv.net的专属选项保存在 mpvnet.conf 文件中,
参数解释请参阅 [此处](#mpvnet的专属选项)
mpv的选项保存在mpv.conf文件中mpv.net的专属选项保存在 mpvnet.conf 文件中,参数解释请参阅 [此处](#mpvnet的专属选项)
快捷键和上下文菜单
----------------------
键鼠的快捷键和上下文菜单的操作保存在 input.conf 文件中,
如果设置目录中不存在mpv.net会用默认值生成它。
键鼠的快捷键和上下文菜单的操作保存在 input.conf 文件中,如果设置目录中不存在mpv.net会用默认值生成它。
请注意,一旦 input.conf 存在, mpv.net 就不能更新它,这意味着当 mpv.net 升级了
新的版本或改变了的默认菜单项时,菜单条目就会过时。获得最新菜单的唯一方法是
通过删除 input.conf 来重置菜单,或者通过手动编辑 input.conf 来更新它。
请注意,一旦 input.conf 存在, mpv.net 就不能更新它,这意味着当 mpv.net 升级了新的版本或改变了的默认菜单项时,菜单条目就会过时。获得最新菜单的唯一方法是通过删除 input.conf 来重置菜单,或者通过手动编辑 input.conf 来更新它。
通过 global-input.conf 文件支持全局热键。
@@ -128,11 +124,10 @@ input 和 config editor 可以在上下文菜单的该条目中找到 'Settings'
输入测试模式可以通过命令行启动: --input-test
输入的键位列表可由该参数输出 --input-keylist
或从上下文菜单的该条目获取 `View > Advanced > Show Keys`
输入的键位列表可由该参数输出 --input-keylist 或从上下文菜单的该条目获取 `View > Advanced > Show Keys`
mpv.net的默认input.conf文件
https://github.com/stax76/mpv.net/blob/master/src/Resources/input.conf.txt
https://github.com/mpvnet-player/mpv.net/blob/master/src/Resources/input.conf.txt
mpv的默认input.conf文件
https://github.com/mpv-player/mpv/blob/master/etc/input.conf
@@ -230,6 +225,9 @@ mpv.net命令可在mpv命令不存在或缺乏某种功能时使用。
### load-sub
显示一个资源管理器的对话框来加载外部字幕文件。
### move-window [left|top|right|bottom|center]
将窗口移动到屏幕边缘 (Alt+方向键) 或中心 (Alt+Backspace)。
### open-conf-folder
用Windows资源管理器打开配置文件夹。
@@ -237,12 +235,10 @@ mpv.net命令可在mpv命令不存在或缺乏某种功能时使用。
**append**
追加文件到播放列表中。
打开一个资源管理器的对话框,以便选择要打开的文件。资源管理器的对话框
支持多选以一次性加载多个文件。按住CTRL键可以将这些文件追加到播放列表中。
打开一个资源管理器的对话框,以便选择要打开的文件。资源管理器的对话框支持多选以一次性加载多个文件。按住CTRL键可以将这些文件追加到播放列表中。
### open-optical-media
显示一个资源管理器的对话框来打开一个DVD或BD文件夹。ISO镜像不需要被挂载
但可以直接用 open-files 命令打开。
显示一个资源管理器的对话框来打开一个DVD或BD文件夹。ISO镜像不需要被挂载但可以直接用 open-files 命令打开。
### open-clipboard
从剪贴板打开单个的URL或文件路径或以文件剪贴板中的格式打开多个文件。
@@ -259,9 +255,11 @@ mpv.net命令可在mpv命令不存在或缺乏某种功能时使用。
### playlist-last
跳转到播放列表的最后一个条目,如果加载的文件已经是最后一个条目,则无动作。
### playlist-random
跳转到播放列表的任一条目。
### quick-bookmark
第一次触发时,书签被保存,第二次触发时,它被恢复并移除。当加载新文件时,
书签也会被移除。
第一次触发时,书签被保存,第二次触发时,它被恢复并移除。当加载新文件时,书签也会被移除。
### reg-file-assoc \<audio|video|image\>
注册文件关联。
@@ -269,6 +267,9 @@ mpv.net命令可在mpv命令不存在或缺乏某种功能时使用。
### scale-window \<factor\>
减小或增大窗口的尺寸。
### select-profile
显示命令面板以选择一个profile。
### shell-execute \<file|URL\>
Shell执行单个文件或URL。
@@ -281,6 +282,9 @@ Shell执行单个文件或URL。
### show-audio-tracks
在命令面板中显示可用的音轨,并允许加载选中的音轨。
### show-chapters
在命令面板中显示章节。
### show-command-palette
显示命令面板。
@@ -299,9 +303,6 @@ Shell执行单个文件或URL。
### show-history
显示已有的历史文件。
### show-info
在屏幕上显示mediainfo第二次触发可显示更详细的媒体信息。
### show-input-editor
显示器快捷键编辑器。
@@ -362,15 +363,19 @@ mpv.net的专属选项
这些专属选项被修改后被保存在 mpvnet.conf 文件中。
#### --autofit-audio \<integer\>
音频文件的初始窗口高度以百分比为单位。默认70
#### --autofit-image \<integer\>
图片文件的初始窗口高度以百分比为单位。默认80
#### --queue \<files\>
添加文件到播放列表,需要设置 [--process-instance=single](#--process-instancevalue) 。
也可以在资源管理器中使用 [Open with++](#open-with) 添加文件。
添加文件到播放列表,需要设置 [--process-instance=single](#--process-instancevalue) 。也可以在资源管理器中使用 [Open with++](#open-with) 添加文件。
#### --command=\<input command\>
通过命令行向正在运行的mpv.net实例发送输入命令例如使用 AutoHotkey 创建
全局热键,必须设置 [process-instance=single](#--process-instancevalue) 。
通过命令行向正在运行的mpv.net实例发送输入命令例如使用 AutoHotkey 创建全局热键,必须设置 [process-instance=single](#--process-instancevalue) 。
### Audio
@@ -407,16 +412,14 @@ mpv.net的专属选项
始终记住大小。
#### --start-threshold=\<milliseconds\>
在显示窗口之前等待libmpv返回视频分辨率的阈值毫秒
否则将使用由 --autofit 和 --start-size 定义的初始大小。默认1500
#### --minimum-aspect-ratio=\<float\>
最小宽高比,如果窗口宽高比小于定义的值,那么将窗口宽高比设置为16/9
这避免了音乐封面的方形窗口。默认1.2
最小宽高比,如果窗口宽高比小于定义的值,那么将窗口宽高比将被强制设为该值
#### --minimum-aspect-ratio-audio=\<float\>
同上但仅用于音频文件。
#### --remember-window-position=\<yes|no\>
@@ -424,6 +427,11 @@ mpv.net的专属选项
在退出时保存窗口的位置。默认no
#### --start-threshold=\<milliseconds\>
在显示窗口之前等待libmpv返回视频分辨率的阈值毫秒否则将使用由 --autofit 和 --start-size 定义的初始大小。默认1500
### Playback
#### --auto-load-folder=\<yes|no\>
@@ -442,8 +450,9 @@ mpv.net的专属选项
定义是否允许多个 mpv.net 进程。
提示:当打开文件或 url 时只要按下CTRL键就不会清除当前的播放列表
而只将文件或 url 追加到列表中。这不仅适用于进程启动,也适用于所有打开文件和 url 的功能。
当打开文件或 url 时只要按下CTRL键就不会清除当前的播放列表而只将文件或 url 追加到列表中。这不仅适用于进程启动,也适用于所有打开文件和 url 的功能。
也可以通过按住SHIFT键来启动多个进程。
**multi**
每次从 shell 启动 mpv.net 时创建一个新进程。
@@ -464,6 +473,9 @@ mpv.net的专属选项
使用MediaInfo而不是mpv来访问媒体信息。默认yes
#### --history-filter
要从历史日志功能中排除的路径的分号分隔列表。
#### --video-file-extensions=\<string\>
@@ -530,17 +542,13 @@ mpv.net的专属选项
### Play with mpv
[Play with mpv](https://chrome.google.com/webstore/detail/play-with-mpv/hahklcmnfgffdlchjigehabfbiigleji)
是一个支持调用mpv播放YouTube等网站视频的谷歌浏览器的扩展。
[Play with mpv](https://chrome.google.com/webstore/detail/play-with-mpv/hahklcmnfgffdlchjigehabfbiigleji) 是一个支持调用mpv播放YouTube等网站视频的谷歌浏览器的扩展。
由于Chrome扩展无法启动一个应用程序需要另一个与扩展程序通信的应用程序该程序可以从
[此处](http://www.mediafire.com/file/lezj8lwqt5zf75v/play-with-mpvnet-server.7z/file)下载。
只有当该程序运行时扩展才能正常工作,为了让应用程序始终运行,应将其放在系统自启动目录中:
由于Chrome扩展无法启动一个应用程序需要另一个与扩展程序通信的应用程序该程序可以从[此处](http://www.mediafire.com/file/lezj8lwqt5zf75v/play-with-mpvnet-server.7z/file)下载。只有当该程序运行时扩展才能正常工作,为了让应用程序始终运行,应将其放在系统自启动目录中:
`C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup`
这将使该程序随系统共同启动并在后台运行。当mpv.net的文件关联注册被执行后
该程序应该会找到mpv.net的位置或者将mpv.net文件夹添加到环境变量PATH。
这将使该程序随系统共同启动并在后台运行。当mpv.net的文件关联注册被执行后该程序应该会找到mpv.net的位置或者将mpv.net文件夹添加到环境变量PATH。
### Open With
@@ -550,35 +558,7 @@ mpv.net的专属选项
### Open with++
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单
[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和
[Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist).
可用来获取 'Play with mpv.net' 和 'Add to mpv.net playlist' 的菜单子项
### Universal Remote 安卓应用
Universal Remote 是一个收费的安卓远程控制APP。
https://www.unifiedremote.com
https://play.google.com/store/apps/details?id=com.Relmtech.Remote
https://play.google.com/store/apps/details?id=com.Relmtech.RemotePaid
https://www.unifiedremote.com/tutorials/how-to-create-a-custom-keyboard-shortcuts-remote
https://www.unifiedremote.com/tutorials/how-to-install-a-custom-remote
[我的配置](./Universal%20Remote)
Universal Remote 的 File Browser 功能十分有用。
### One For All Contour URC1210 and FLIRC USB
然而我的主要远程控制解决方案适用于所有人,
Philips code 0556 和 FLIRC USB (gen2) 一同被使用。
[Open with++](#open-with) 可用来扩展资源管理器的上下文菜单。[Play with mpv.net](https://github.com/stax76/OpenWithPlusPlus#play-with-mpvnet) 和 [Add to mpv.net playlist](https://github.com/stax76/OpenWithPlusPlus#add-to-mpvnet-playlist) 可用来获取 'Play with mpv.net' 和 'Add to mpv.net playlist' 的菜单子项
### External Application Button
@@ -595,67 +575,34 @@ args: `-- pwsh -NoLogo -Command "yt-dlp --ignore-errors --download-archive 'C:\E
#### Lua
文件类型: `lua`
可以在 [mpv wiki](https://github.com/mpv-player/mpv/wiki/User-Scripts) 中找到一个庞大的用户Lua脚本的集合。
文件位置: `<config folder>\scripts`
Lua脚本的host由libmpv内建。
错误和调试消息输出在终端上。
Lua脚本在第一个媒体文件打开之前加载。
[mpv Lua 文档](https://mpv.io/manual/master/#lua-scripting)
[mpv 用户脚本 wiki](https://github.com/mpv-player/mpv/wiki/User-Scripts)
[mpv 用户脚本 GitHub](https://github.com/topics/mpv-script)
[mpv 用户脚本 Google](https://www.google.com/search?q=mpv+script)
Lua脚本在 [mpv.net wiki](https://github.com/mpvnet-player/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting) 上有进一步记录。
#### JavaScript
文件类型: `js`
文件位置: `<config folder>\scripts`
JavaScriptLua脚本的host由libmpv内建。
错误和调试消息输出在终端上。
JavaScript脚本在第一个媒体文件打开之前加载。
[mpv JavaScript 文档](https://mpv.io/manual/master/#javascript)
[mpv用户脚本](https://github.com/mpv-player/mpv/wiki/User-Scripts)
#### PowerShell
文件类型: `ps1`
文件位置: `<config folder>\scripts-ps`
PS脚本的host类似于扩展在打开媒体文件前尚未初始化。
mpv.net没有定义脚本接口而是公开了它的完整内部没有兼容性保证。
PS脚本在打开媒体文件前尚未初始化。
[示例脚本](../../../tree/master/src/Scripts)
#### C#
文件类型: `cs`
文件位置: `<config folder>\scripts-cs`
mpv.net没有定义脚本接口而是公开了它的完整内部没有兼容性保证。
没有兼容性保证。
脚本代码可以在C#[扩展](../../../tree/master/src/Extensions)中编写,这样
就可以获得完整的代码和调试器支持。一旦代码被调试和开发完成,就可以将其
从扩展转移到轻量级的独立脚本。脚本host使用的是旧的C#版本,像字符串插值
这样的现代功能是不存在的。
脚本代码可以在C#[扩展](../../../tree/master/src/Extensions)中编写,这样就可以获得完整的代码和调试器支持。一旦代码被调试和开发完成就可以将其从扩展转移到轻量级的独立脚本。脚本host使用的是旧的C#版本,像字符串插值这样的现代功能是不存在的。
有同步事件和异步事件,更偏好异步事件,不要阻断同步事件和观察到的属性,因为这样会阻断主事件循环。
C#脚本的host类似于[扩展](../../../tree/master/src/Extensions),在打开媒体文件前尚未初始化。
@@ -671,7 +618,7 @@ C#脚本的host类似于[扩展](../../../tree/master/src/Extensions),在打
<config folder>\extensions\ExampleExtension\ExampleExtension.dll
```
mpv.net没有定义脚本接口而是公开了它的完整内部没有兼容性保证
有同步事件和异步事件,更偏好异步事件,不要阻断同步事件和观察到的属性,因为这样会阻断主事件循环
### 创建扩展演示
@@ -679,14 +626,9 @@ mpv.net没有定义脚本接口而是公开了它的完整内部没有兼
- 下载安装 [Visual Studio Community](https://visualstudio.microsoft.com) 。
- 创建新的项目类型 **Class Library .NET Framework** 并确保项目名称以 **Extension** 作结尾。
- 增加一个 reference 到 **System.ComponentModel.Composition**.
- 增加一个 reference 到 mpvnet.exe ,在 Solution Explorer 中选择 mpvnet 的 reference
打开 Properties 窗口并设置 **Copy Local** 为 false 来阻止在项目编译时 mpvnet.exe 被复制到输出目录。
- 现在打开 project properties 并在 Build 标签页设置 output path
扩展类似于位于配置文件夹中的脚本,例如:
`<config folder>\extensions\ExampleExtension\ExampleExtension.dll`
- 同样在 project properties 的 Debug 标签页中选择选项 **Start external program**
并且定义到 mpvnet.exe 的路径。
在 Debug 标签页中你还可以定义 command line arguments ,例如开始调试时要播放的视频文件。
- 增加一个 reference 到 mpvnet.exe ,在 Solution Explorer 中选择 mpvnet 的 reference 打开 Properties 窗口并设置 **Copy Local** 为 false 来阻止在项目编译时 mpvnet.exe 被复制到输出目录。
- 现在打开 project properties 并在 Build 标签页设置 output path ,扩展类似于位于配置文件夹中的脚本,例如: `<config folder>\extensions\ExampleExtension\ExampleExtension.dll`
- 同样在 project properties 的 Debug 标签页中选择选项 **Start external program** 并且定义到 mpvnet.exe 的路径。在 Debug 标签页中你还可以定义 command line arguments ,例如开始调试时要播放的视频文件。
### 代码样本
@@ -735,11 +677,9 @@ Python和VapourSynth必须在环境变量PATH中。
隐藏功能
---------------
使用mpv.net在资源管理器中选择多个文件并按下回车键打开。
资源管理器将此限制为最多15个并且顺序将是随机的。
使用mpv.net在资源管理器中选择多个文件并按下回车键打开。资源管理器将此限制为最多15个并且顺序将是随机的。
当打开文件或url时只要按下CTRL键就不会清除播放列表而是将文件或url附加到播放列表中。
这适用于mpv.net的所有打开文件或url的功能。
当打开文件或url时只要按下CTRL键就不会清除播放列表而是将文件或url附加到播放列表中。这适用于mpv.net的所有打开文件或url的功能。
在打开单个文件时按下SHIFT键将禁止该文件夹的其它文件添加到播放列表中。
@@ -770,6 +710,7 @@ https://mpv.io/manual/master/#window
- [keepaspect-window](https://mpv.io/manual/master/#options-keepaspect-window)
- [ontop](https://mpv.io/manual/master/#options-ontop)
- [screen](https://mpv.io/manual/master/#options-screen)
- [snap-window](https://mpv.io/manual/master/#options-snap-window)
- [title](https://mpv.io/manual/master/#options-title)
- [window-maximized](https://mpv.io/manual/master/#options-window-maximized)
- [window-minimized](https://mpv.io/manual/master/#options-window-minimized)
@@ -779,8 +720,11 @@ https://mpv.io/manual/master/#window
**部分支持的属性:**
- [autofit](https://mpv.io/manual/master/#options-autofit)
仅支持0-100范围内的整数
- [autofit-smaller](https://mpv.io/manual/master/#options-autofit-smaller)
同上
- [autofit-larger](https://mpv.io/manual/master/#options-autofit-larger)
同上
mpv.net的专属窗口功能在 [屏幕设置](#screen) 部分。
@@ -802,9 +746,7 @@ mpv.net支持基于属性的mpv命令行选项这意味着它支持mpv几乎
### 其它限制
mpv的属性 [idle](https://mpv.io/manual/master/#options-idle) 在mpv.net中
也会相应的发挥作用但是LUA脚本获取到的值始终是 `yes` 因为mpv.net必须
设置它才能正常工作这是一个难以攻克的来自libmpv的限制。
mpv的属性 [idle](https://mpv.io/manual/master/#options-idle) 在mpv.net中也会相应的发挥作用但是LUA脚本获取到的值始终是 `yes` 因为mpv.net必须设置它才能正常工作这是一个难以攻克的来自libmpv的限制。
### mpv.net的专属选项
@@ -819,8 +761,7 @@ mpv.net的专属选项保存在 mpvnet.conf 文件中与mpv一样可由命令
mpv.net使用 C#7 编写并且需要 .NET Framework 4.8 来运行。
扩展的实现基于
[Managed Extensibility Framework](https://docs.microsoft.com/en-us/dotnet/framework/mef/).
扩展的实现基于 [Managed Extensibility Framework](https://docs.microsoft.com/en-us/dotnet/framework/mef/)
主窗口基于WinForms与WPF相比对libmpv集成的更友好所有其他窗口都是基于WPF的。
@@ -837,7 +778,7 @@ mpv.net的上下文菜单由设置目录中的文件 input.conf 定义。
如果 input.conf 文件不存在mpv.net由以下文件生成默认
<https://github.com/stax76/mpv.net/tree/master/src/Resources/input.conf.txt>
<https://github.com/mpvnet-player/mpv.net/tree/master/src/Resources/input.conf.txt>
input.conf 定义mpv的快捷键同时mpv.net使用注释定义上下文菜单。
@@ -850,8 +791,7 @@ input.conf 定义mpv的快捷键同时mpv.net使用注释定义上下文菜
第三种方法是拖放文件到主窗口上。
每当打开文件或URL时按下控制键时播放列表不会被清除但文件或URL会追加到播放列表中。
这适用于所有打开文件或URL的mpv.net的功能。
每当打开文件或URL时按下控制键时播放列表不会被清除但文件或URL会追加到播放列表中。这适用于所有打开文件或URL的mpv.net的功能。
在打开单个文件时按shift键将临时禁止加载文件夹中的其它文件。
@@ -870,14 +810,12 @@ input.conf 定义mpv的快捷键同时mpv.net使用注释定义上下文菜
### Open > Load external audio files
允许加载外部音轨文件。也可以根据文件名自动检测,该选项可在下面的设置中找到
'Settings > Show Config Editor > Audio > audio-file-auto' 。
允许加载外部音轨文件。也可以根据文件名自动检测,该选项可在下面的设置中找到 'Settings > Show Config Editor > Audio > audio-file-auto'
### Open > Load external subtitle files
允许加载外部字幕文件。也可以根据文件名自动检测,该选项可在下面的设置中找到
'Settings > Show Config Editor > Subtitles > sub-auto' 。
允许加载外部字幕文件。也可以根据文件名自动检测,该选项可在下面的设置中找到 'Settings > Show Config Editor > Subtitles > sub-auto'
### Play/Pause
@@ -975,8 +913,7 @@ input.conf 定义mpv的快捷键同时mpv.net使用注释定义上下文菜
`no-osd seek sec`
sec是跳转的相对秒数使用no osd前缀是因为mpv.net包含一个脚本
该脚本显示执行寻道操作时的位置,该脚本使用更简单的时间格式。
sec是跳转的相对秒数使用no osd前缀是因为mpv.net包含一个脚本该脚本显示执行寻道操作时的位置,该脚本使用更简单的时间格式。
[no-osd command prefix](https://mpv.io/manual/master/#command-interface-no-osd)
@@ -1220,7 +1157,7 @@ sec是跳转的相对秒数使用no osd前缀是因为mpv.net包含一个脚
使用以下命令改变到下一个可用的字幕轨:
`cycle sub`
`script-message-to mpvnet cycle-subtitles`
[cycle command](https://mpv.io/manual/master/#command-interface-cycle-%3Cname%3E-[%3Cvalue%3E])
@@ -1499,8 +1436,7 @@ input.conf 文件内涵mpv的键鼠绑定
### Tools > Show History
显示包含历史记录的文本文件。如果文件不存在,则会询问是否在设置文件夹中
创建该文件。一旦文件存在,则写入历史记录(包括时间和文件名)
显示包含历史记录的文本文件。如果文件不存在,则会询问是否在设置文件夹中创建该文件。一旦文件存在,则写入历史记录(包括时间和文件名)
屏蔽部分路径的参数:
@@ -1554,7 +1490,7 @@ script-opt = history-discard=path1;path2
### Help > Show mpv.net manual
显示 [mpv.net手册](https://github.com/stax76/mpv.net/blob/master/Manual.md).
显示 [mpv.net手册](https://github.com/mpvnet-player/mpv.net/blob/master/Manual.md).
### Help > About mpv.net

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout>
<row>
<button text="PLAY" ontap="play" />
<button text="PREV" ontap="prev" />
<button text="NEXT" ontap="next" />
<button text="Enter" ontap="enter" />
</row>
<row>
<button text="LEFT" ontap="left" />
<button text="RIGHT" ontap="right" />
<button text="UP" ontap="up" />
<button text="DOWN" ontap="down" />
</row>
<row>
<button text="VOL-" ontap="vol_minus" />
<button text="VOL+" ontap="vol_plus" />
<button text="MUTE" ontap="mute" />
<button text="INFO" ontap="info" />
</row>
<row>
<button text="KP0" ontap="KP0" />
<button text="KP1" ontap="KP1" />
<button text="KP2" ontap="KP2" />
<button text="KP3" ontap="KP3" />
<button text="KP4" ontap="KP4" />
</row>
<row>
<button text="KP5" ontap="KP5" />
<button text="KP6" ontap="KP6" />
<button text="KP7" ontap="KP7" />
<button text="KP8" ontap="KP8" />
<button text="KP9" ontap="KP9" />
</row>
<row>
<button text="Cycle Audio" ontap="KP7" />
<button text="Cycle Subtitle" ontap="KP8" />
<button text="AB LOOP" ontap="ab_loop" />
</row>
<row>
<button text="ZOOM IN" ontap="zoom_in" />
<button text="ZOOM OUT" ontap="zoom_out" />
</row>
</layout>

View File

@@ -1,5 +0,0 @@
meta.name: custom keys
meta.author: stax76
meta.description: custom keys
meta.tags: mpv

View File

@@ -1,106 +0,0 @@
-- https://github.com/unifiedremote/Docs/blob/master/libs/keyboard.md
-- https://github.com/unifiedremote/Docs/blob/master/res/keys.md
local kb = libs.keyboard;
actions.play = function ()
kb.stroke("space");
end
actions.next = function ()
kb.stroke("F12");
end
actions.prev = function ()
kb.stroke("F11");
end
actions.enter = function ()
kb.stroke("enter");
end
actions.left = function ()
kb.stroke("left");
end
actions.right = function ()
kb.stroke("right");
end
actions.up = function ()
kb.stroke("up");
end
actions.down = function ()
kb.stroke("down");
end
actions.vol_minus = function ()
kb.text("-");
end
actions.vol_plus = function ()
kb.text("+");
end
actions.mute = function ()
kb.stroke("m");
end
actions.info = function ()
kb.stroke("i");
end
actions.KP0 = function ()
kb.stroke("num0");
end
actions.KP1 = function ()
kb.stroke("num1");
end
actions.KP2 = function ()
kb.stroke("num2");
end
actions.KP3 = function ()
kb.stroke("num3");
end
actions.KP4 = function ()
kb.stroke("num4");
end
actions.KP5 = function ()
kb.stroke("num5");
end
actions.KP6 = function ()
kb.stroke("num6");
end
actions.KP7 = function ()
kb.stroke("num7");
end
actions.KP8 = function ()
kb.stroke("num8");
end
actions.KP9 = function ()
kb.stroke("num9");
end
actions.ab_loop = function ()
kb.stroke("l");
end
actions.zoom_in = function ()
kb.stroke("ctrl", "oem_plus");
end
actions.zoom_out = function ()
kb.stroke("ctrl", "oem_minus");
end

View File

@@ -14,6 +14,8 @@ namespace mpvnet
{
public static List<string> TempFiles { get; } = new List<string>();
public static string[] HistoryFilter { get; set; }
public static string ConfPath { get => Core.ConfigFolder + "mpvnet.conf"; }
public static string ProcessInstance { get; set; } = "single";
public static string DarkMode { get; set; } = "always";
@@ -244,16 +246,17 @@ namespace mpvnet
case "audio-file-extensions": CorePlayer.AudioTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
case "auto-load-folder": AutoLoadFolder = value == "yes"; return true;
case "auto-play": AutoPlay = value == "yes"; return true;
case "autofit-image": AutofitImage = value.Trim('%').ToInt() / 100f; return true;
case "autofit-audio": AutofitAudio = value.Trim('%').ToInt() / 100f; return true;
case "autofit-image": AutofitImage = value.Trim('%').ToInt() / 100f; return true;
case "dark-mode": DarkMode = value; return true;
case "dark-theme": DarkTheme = value.Trim('\'', '"'); return true;
case "debug-mode": DebugMode = value == "yes"; return true;
case "history-filter": HistoryFilter = value.Split(';'); return true;
case "image-file-extensions": CorePlayer.ImageTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
case "light-theme": LightTheme = value.Trim('\'', '"'); return true;
case "media-info": MediaInfo = value == "yes"; return true;
case "minimum-aspect-ratio": MinimumAspectRatio = value.ToFloat(); return true;
case "minimum-aspect-ratio-audio": MinimumAspectRatioAudio = value.ToFloat(); return true;
case "minimum-aspect-ratio": MinimumAspectRatio = value.ToFloat(); return true;
case "process-instance": ProcessInstance = value; return true;
case "queue": Queue = value == "yes"; return true;
case "recent-count": RecentCount = value.ToInt(); return true;
@@ -264,6 +267,7 @@ namespace mpvnet
case "start-size": StartSize = value; return true;
case "start-threshold": StartThreshold = value.ToInt(); return true;
case "video-file-extensions": CorePlayer.VideoTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
default:
if (writeError)
Terminal.WriteError($"unknown mpvnet.conf property: {name}");

View File

@@ -24,20 +24,20 @@ namespace mpvnet
{
switch (id)
{
case "add-files-to-playlist": OpenFiles("append"); break; // deprecated 2019
case "cycle-audio": CycleAudio(); break;
case "execute-mpv-command": Msg.ShowError("The command was removed, reset input.conf by deleting it, in the new menu use the on screen console."); break; // deprecated 2020
case "cycle-subtitles": CycleSubtitles(); break;
case "load-audio": LoadAudio(); break;
case "load-sub": LoadSubtitle(); break;
case "move-window": MoveWindow(args[0]); break;
case "open-clipboard": OpenFromClipboard(); break;
case "open-conf-folder": ProcessHelp.ShellExecute(Core.ConfigFolder); break;
case "open-files": OpenFiles(args); break;
case "open-optical-media": Open_DVD_Or_BD_Folder(); break;
case "open-url": OpenFromClipboard(); break; // deprecated 2022
case "play-pause": PlayPause(); break;
case "playlist-add": PlaylistAdd(Convert.ToInt32(args[0])); break;
case "playlist-first": PlaylistFirst(); break;
case "playlist-last": PlaylistLast(); break;
case "playlist-random": PlaylistRandom(); break;
case "quick-bookmark": QuickBookmark(); break;
case "reg-file-assoc": RegisterFileAssociations(args[0]); break;
case "scale-window": ScaleWindow(float.Parse(args[0], CultureInfo.InvariantCulture)); break;
@@ -64,10 +64,20 @@ namespace mpvnet
case "show-properties": ShowProperties(); break;
case "show-protocols": ShowStrings(mpvHelp.GetProtocols().Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); break;
case "show-recent": ShowRecent(); break;
case "show-setup-dialog": ShowSetupDialog(); break; // deprecated 2022
case "show-subtitle-tracks": ShowSubtitleTracks(); break;
case "show-text": ShowText(args[0], Convert.ToInt32(args[1]), Convert.ToInt32(args[2])); break;
case "window-scale": WindowScale(float.Parse(args[0], CultureInfo.InvariantCulture)); break;
// deprecated 2019
case "add-files-to-playlist": OpenFiles("append"); break;
// deprecated 2020
case "execute-mpv-command": Msg.ShowError("command was removed, reset input.conf by deleting it, in the new menu use the on screen console."); break;
case "key-binding": if (args[0] == "show-playlist") ShowPlaylist(); break;
// deprecated 2022
case "show-setup-dialog": ShowSetupDialog(); break;
case "open-url": OpenFromClipboard(); break;
}
}
@@ -148,37 +158,24 @@ namespace mpvnet
ProcessHelp.ShellExecute(Core.ConfigFolder + "history.txt");
else
{
if (Msg.ShowQuestion("Create history.txt file in config folder?" + BR2 +
"mpv.net will write the date, time and filename of opened files to it.") == MessageBoxResult.OK)
if (Msg.ShowQuestion("Create a 'history.txt' file in the config folder?" + BR2 +
"mpv.net will write the date, time, play length and path of watched files to it.") == MessageBoxResult.OK)
File.WriteAllText(Core.ConfigFolder + "history.txt", "");
}
}
static int LastShowInfo;
public static void ShowInfo()
{
if (Core.PlaylistPos == -1)
return;
if (Environment.TickCount - LastShowInfo < 5000)
{
Core.Command("script-message-to mpvnet show-media-info osd");
LastShowInfo = 0;
return;
}
LastShowInfo = Environment.TickCount;
string text;
long fileSize = 0;
string path = Core.GetPropertyString("path");
if (File.Exists(path))
{
fileSize = new FileInfo(path).Length;
if (CorePlayer.AudioTypes.Contains(path.Ext()))
{
text = Core.GetPropertyOsdString("filtered-metadata");
@@ -187,6 +184,7 @@ namespace mpvnet
}
else if (CorePlayer.ImageTypes.Contains(path.Ext()))
{
fileSize = new FileInfo(path).Length;
text = "Width: " + Core.GetPropertyInt("width") + "\n" +
"Height: " + Core.GetPropertyInt("height") + "\n" +
"Size: " + Convert.ToInt32(fileSize / 1024.0) + " KB\n" +
@@ -195,6 +193,11 @@ namespace mpvnet
Core.CommandV("show-text", text, "5000");
return;
}
else
{
Core.Command("script-message-to mpvnet show-media-info osd");
return;
}
}
if (path.Contains("://")) path = Core.GetPropertyString("media-title");
@@ -308,13 +311,44 @@ namespace mpvnet
if (++aid > tracks.Length)
aid = 1;
Core.CommandV("set", "aid", aid.ToString());
Core.SetPropertyInt("aid", aid);
}
Core.CommandV("show-text", aid + "/" + tracks.Length + ": " + tracks[aid - 1].Text.Substring(3), "5000");
}
}
public static void CycleSubtitles()
{
Core.UpdateExternalTracks();
lock (Core.MediaTracksLock)
{
MediaTrack[] tracks = Core.MediaTracks.Where(track => track.Type == "s").ToArray();
if (tracks.Length < 1)
{
Core.CommandV("show-text", "No subtitles");
return;
}
int sid = Core.GetPropertyInt("sid");
if (tracks.Length > 1)
{
if (++sid > tracks.Length)
sid = 0;
Core.SetPropertyInt("sid", sid);
}
if (sid == 0)
Core.CommandV("show-text", "No subtitle");
else
Core.CommandV("show-text", sid + "/" + tracks.Length + ": " + tracks[sid - 1].Text.Substring(3), "5000");
}
}
public static void ShowCommands()
{
string jsonString = Core.GetPropertyString("command-list");
@@ -391,6 +425,7 @@ namespace mpvnet
else
{
Core.UpdateExternalTracks();
text = "N: " + Core.GetPropertyString("filename") + BR;
lock (Core.MediaTracksLock)
foreach (MediaTrack track in Core.MediaTracks)
text += track.Text + BR;
@@ -401,7 +436,7 @@ namespace mpvnet
if (editor)
ShowTextWithEditor("media-info", text);
else if (osd)
ShowText(text.Replace("\r", ""), 5000, 17);
ShowText(text.Replace("\r", ""), 5000, 16);
else
{
MsgBoxEx.MessageBoxEx.MsgFontFamily = new FontFamily("Consolas");
@@ -518,6 +553,9 @@ namespace mpvnet
Action = () => Core.SetPropertyInt("playlist-pos", index)
};
if (string.IsNullOrEmpty(item.Text))
item.Text = file;
items.Add(item);
if (currentPath.ToLowerEx() == file.ToLowerEx())
@@ -701,6 +739,12 @@ namespace mpvnet
Core.SetPropertyInt("playlist-pos", pos);
}
public static void PlaylistRandom()
{
int count = Core.GetPropertyInt("playlist-count");
Core.SetPropertyInt("playlist-pos", new Random().Next(count));
}
public static void QuickBookmark()
{
if (App.QuickBookmark == 0)
@@ -716,5 +760,7 @@ namespace mpvnet
App.QuickBookmark = 0;
}
}
public static void MoveWindow(string direction) => Core.RaiseMoveWindow(direction);
}
}

View File

@@ -14,7 +14,7 @@ namespace mpvnet
{
public static List<ConfSection> Parse(string content)
{
string[] lines = content.Split("\r\n".ToCharArray());
string[] lines = content.Split(new[] { "\r\n" }, System.StringSplitOptions.None);
var sections = new List<ConfSection>();
ConfSection currentGroup = null;
@@ -22,12 +22,9 @@ namespace mpvnet
{
string line = i.Trim();
if (string.IsNullOrEmpty(line))
continue;
if (line.StartsWith("[") && line.EndsWith("]"))
if (line == "")
{
currentGroup = new ConfSection() { Name = line.TrimStart('[').TrimEnd(']') };
currentGroup = new ConfSection();
sections.Add(currentGroup);
}
else if (line.Contains("="))
@@ -45,7 +42,6 @@ namespace mpvnet
public class ConfSection
{
public string Name { get; set; }
public List<StringPair> Items { get; set; } = new List<StringPair>();
public bool HasName(string name)

View File

@@ -7,7 +7,7 @@ public static class TestStringExtension
{
public static bool ContainsEx(this string instance, string value)
{
if (instance != null && value != null)
if (!string.IsNullOrEmpty(instance) && !string.IsNullOrEmpty(value))
return instance.Contains(value);
return false;
@@ -47,6 +47,8 @@ public static class ConvertToStringExtension
return instance.Trim();
}
public static string ToStringEx(this object instance) => instance?.ToString() ?? "";
}
public static class ConvertStringExtension

View File

@@ -20,8 +20,8 @@ namespace mpvnet
{
public class CorePlayer
{
public static string[] VideoTypes { get; set; } = "264 265 asf avc avi avs dav flv h264 h265 hevc m2t m2ts m2v m4v mkv mov mp4 mpeg mpg mpv mts ts vob vpy webm wmv y4m".Split(' ');
public static string[] AudioTypes { get; set; } = "aac ac3 dts dtshd dtshr dtsma eac3 flac m4a mka mp2 mp3 mpa mpc ogg opus thd w64 wav".Split(' ');
public static string[] VideoTypes { get; set; } = "mkv mp4 avi mov flv mpg webm wmv ts vob 264 265 asf avc avs dav h264 h265 hevc m2t m2ts m2v m4v mpeg mpv mts vpy y4m".Split(' ');
public static string[] AudioTypes { get; set; } = "mp3 flac m4a mka mp2 ogg opus aac ac3 dts dtshd dtshr dtsma eac3 mpa mpc thd w64 wav".Split(' ');
public static string[] ImageTypes { get; set; } = { "jpg", "bmp", "png", "gif", "webp" };
public static string[] SubtitleTypes { get; } = { "srt", "ass", "idx", "sub", "sup", "ttxt", "txt", "ssa", "smi", "mks" };
@@ -63,6 +63,7 @@ namespace mpvnet
public event Action<int> PlaylistPosChangedAsync;
public event Action<Size> VideoSizeChanged;
public event Action<Size> VideoSizeChangedAsync;
public event Action<string> MoveWindow;
public Dictionary<string, List<Action>> PropChangeActions { get; set; } = new Dictionary<string, List<Action>>();
public Dictionary<string, List<Action<int>>> IntPropChangeActions { get; set; } = new Dictionary<string, List<Action<int>>>();
@@ -72,6 +73,7 @@ namespace mpvnet
public AutoResetEvent ShutdownAutoResetEvent { get; } = new AutoResetEvent(false);
public AutoResetEvent VideoSizeAutoResetEvent { get; } = new AutoResetEvent(false);
public DateTime HistoryTime;
public IntPtr Handle { get; set; }
public IntPtr NamedHandle { get; set; }
public List<MediaTrack> MediaTracks { get; set; } = new List<MediaTrack>();
@@ -118,6 +120,11 @@ namespace mpvnet
Handle = mpv_create();
var events = Enum.GetValues(typeof(mpv_event_id)).Cast<mpv_event_id>();
foreach (mpv_event_id i in events)
mpv_request_event(Handle, i, 0);
mpv_request_log_messages(Handle, "no");
App.RunTask(() => MainEventLoop());
@@ -171,7 +178,15 @@ namespace mpvnet
SetPropertyString("idle", "yes");
ObservePropertyDouble("window-scale", value => WindowScaleMpv(value));
ObservePropertyString("path", value => Path = value);
ObservePropertyString("path", value => {
if (HistoryTime == DateTime.MinValue)
{
HistoryTime = DateTime.Now;
HistoryPath = value;
}
Path = value;
});
ObservePropertyBool("pause", value => {
Paused = value;
@@ -207,6 +222,12 @@ namespace mpvnet
InvokeAsync(InitializedAsync);
}
public void Destroy()
{
mpv_destroy(Handle);
mpv_destroy(NamedHandle);
}
void ApplyShowMenuFix()
{
if (App.Settings.ShowMenuFixApplied)
@@ -373,6 +394,9 @@ namespace mpvnet
string key = i.Substring(0, i.IndexOf("=")).Trim();
string value = i.Substring(i.IndexOf("=") + 1).Trim();
if (key.StartsWith("-"))
key = key.TrimStart('-');
if (value.Contains("#") && !value.StartsWith("#") &&
!value.StartsWith("'#") && !value.StartsWith("\"#"))
@@ -491,7 +515,7 @@ namespace mpvnet
case mpv_event_id.MPV_EVENT_SHUTDOWN:
IsQuitNeeded = false;
Shutdown?.Invoke();
WriteHistory(null);
WriteHistory();
ShutdownAutoResetEvent.Set();
return;
case mpv_event_id.MPV_EVENT_LOG_MESSAGE:
@@ -572,13 +596,7 @@ namespace mpvnet
}
App.RunTask(new Action(() => UpdateTracks()));
App.RunTask(new Action(() => {
if (path.Contains("://"))
path = GetPropertyString("media-title");
WriteHistory(path);
}));
App.RunTask(new Action(() => WriteHistory()));
InvokeEvent(FileLoaded, FileLoadedAsync);
}
@@ -934,29 +952,6 @@ namespace mpvnet
return "";
}
public string GetScriptOption(string name, string defaultValue = "")
{
string value = GetPropertyString("script-opts");
if (string.IsNullOrEmpty(value))
return defaultValue;
string[] values = value.Split(',');
foreach (string item in values)
{
if (item.Contains("="))
{
string optionName = item.Substring(0, item.IndexOf("="));
if (optionName == name)
return item.Substring(item.IndexOf("=") + 1);
}
}
return defaultValue;
}
public void ObservePropertyInt(string name, Action<int> action)
{
lock (IntPropChangeActions)
@@ -1124,11 +1119,13 @@ namespace mpvnet
string left = arg.Substring(2, arg.IndexOf("=") - 2);
string right = arg.Substring(left.Length + 3);
if (left == "script")
left = "scripts";
if (left == "external-file")
left = "external-files";
switch (left)
{
case "script": left = "scripts"; break;
case "audio-file": left = "audio-files"; break;
case "sub-file": left = "sub-files"; break;
case "external-file": left = "external-files"; break;
}
if (preInit && preInitProperties.Contains(left))
{
@@ -1194,17 +1191,28 @@ namespace mpvnet
{
string file = files[i];
if (string.IsNullOrEmpty(file))
continue;
if (file.Contains("|"))
file = file.Substring(0, file.IndexOf("|"));
if (file.Ext() == "avs")
LoadAviSynth();
file = ConvertFilePath(file);
if (file.Ext() == "iso")
string ext = file.Ext();
switch (ext)
{
case "avs": LoadAviSynth(); break;
case "lnk": file = GetShortcutTarget(file); break;
}
if (ext == "iso")
LoadISO(file);
else if(SubtitleTypes.Contains(file.Ext()))
else if(SubtitleTypes.Contains(ext))
CommandV("sub-add", file);
else if (file.Ext().Length != 3 && File.Exists(System.IO.Path.Combine(file, "BDMV\\index.bdmv")))
else if (!IsMediaExtension(ext) && !file.Contains("://") && Directory.Exists(file) &&
File.Exists(System.IO.Path.Combine(file, "BDMV\\index.bdmv")))
{
Command("stop");
Thread.Sleep(500);
@@ -1224,6 +1232,17 @@ namespace mpvnet
SetPropertyInt("playlist-pos", 0);
}
public string ConvertFilePath(string path)
{
if ((path.Contains(":/") && !path.Contains("://")) || (path.Contains(":\\") && path.Contains("/")))
path = path.Replace("/", "\\");
if (!path.Contains(":") && !path.StartsWith("\\\\") && File.Exists(path))
path = System.IO.Path.GetFullPath(path);
return path;
}
public void LoadISO(string path)
{
long gb = new FileInfo(path).Length / 1024 / 1024 / 1024;
@@ -1276,41 +1295,48 @@ namespace mpvnet
}
}
static object LoadFolderLockObject = new object();
public void LoadFolder()
{
if (!App.AutoLoadFolder || Control.ModifierKeys.HasFlag(Keys.Shift))
return;
Thread.Sleep(1000);
string path = GetPropertyString("path");
if (!File.Exists(path) || GetPropertyInt("playlist-count") != 1)
return;
lock (LoadFolderLockObject)
{
string path = GetPropertyString("path");
string dir = Environment.CurrentDirectory;
if (!File.Exists(path) || GetPropertyInt("playlist-count") != 1)
return;
if (path.Contains(":/") && !path.Contains("://"))
path = path.Replace("/", "\\");
string dir = Environment.CurrentDirectory;
if (path.Contains("\\"))
dir = System.IO.Path.GetDirectoryName(path);
if (path.Contains(":/") && !path.Contains("://"))
path = path.Replace("/", "\\");
List<string> files = Directory.GetFiles(dir).ToList();
if (path.Contains("\\"))
dir = System.IO.Path.GetDirectoryName(path);
files = files.Where(file =>
VideoTypes.Contains(file.Ext()) ||
AudioTypes.Contains(file.Ext()) ||
ImageTypes.Contains(file.Ext())).ToList();
List<string> files = GetMediaFiles(Directory.GetFiles(dir)).ToList();
files.Sort(new StringLogicalComparer());
int index = files.IndexOf(path);
files.Remove(path);
files.Sort(new StringLogicalComparer());
int index = files.IndexOf(path);
files.Remove(path);
foreach (string i in files)
CommandV("loadfile", i, "append");
foreach (string i in files)
CommandV("loadfile", i, "append");
if (index > 0)
CommandV("playlist-move", "0", (index + 1).ToString());
}
}
if (index > 0)
CommandV("playlist-move", "0", (index + 1).ToString());
IEnumerable<string> GetMediaFiles(IEnumerable<string> files) => files.Where(i => IsMediaExtension(i.Ext()));
bool IsMediaExtension(string ext)
{
return VideoTypes.Contains(ext) || AudioTypes.Contains(ext) || ImageTypes.Contains(ext);
}
bool WasAviSynthLoaded;
@@ -1330,38 +1356,36 @@ namespace mpvnet
}
}
string LastHistoryPath;
DateTime LastHistoryStartDateTime;
string HistoryPath;
void WriteHistory(string path)
void WriteHistory()
{
if (!File.Exists(ConfigFolder + "history.txt"))
return;
double totalMinutes = (DateTime.Now - HistoryTime).TotalMinutes;
double totalMinutes = (DateTime.Now - LastHistoryStartDateTime).TotalMinutes;
if (!string.IsNullOrEmpty(HistoryPath) && totalMinutes > 1 &&
!HistoryDiscard() && File.Exists(ConfigFolder + "history.txt"))
{
string path = HistoryPath;
if (LastHistoryPath != null && totalMinutes > 1 && !HistoryDiscard())
File.AppendAllText(ConfigFolder + "history.txt", DateTime.Now.ToString().Substring(0, 16) +
" " + Convert.ToInt32(totalMinutes).ToString().PadLeft(3) + " " + LastHistoryPath + "\r\n");
if (path.Contains("://"))
path = GetPropertyString("media-title");
LastHistoryPath = path;
LastHistoryStartDateTime = DateTime.Now;
string txt = DateTime.Now.ToString().Substring(0, 16) + " " +
Convert.ToInt32(totalMinutes).ToString().PadLeft(3) + " " + path + "\r\n";
File.AppendAllText(ConfigFolder + "history.txt", txt);
}
HistoryPath = Path;
HistoryTime = DateTime.Now;
}
string HistoryDiscardOption;
bool HistoryDiscard()
public bool HistoryDiscard()
{
if (HistoryDiscardOption == null)
HistoryDiscardOption = GetScriptOption("history-discard");
if (string.IsNullOrEmpty(HistoryDiscardOption))
return false;
foreach (string i in HistoryDiscardOption.Split(';'))
if (LastHistoryPath.Contains(i))
return true;
if (App.HistoryFilter != null)
foreach (string filter in App.HistoryFilter)
if (HistoryPath.Contains(filter.Trim()))
return true;
return false;
}
@@ -1431,7 +1455,25 @@ namespace mpvnet
}
}
string GetNativeLanguage(string name)
{
foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.NeutralCultures))
if (ci.EnglishName == name)
return ci.NativeName;
return name;
}
public static string GetShortcutTarget(string path)
{
Type t = Type.GetTypeFromProgID("WScript.Shell");
dynamic sh = Activator.CreateInstance(t);
return sh.CreateShortcut(path).TargetPath;
}
public void RaiseScaleWindow(float value) => ScaleWindow(value);
public void RaiseMoveWindow(string value) => MoveWindow(value);
public void RaiseWindowScaleNET(float value) => WindowScaleNET(value);
@@ -1476,12 +1518,13 @@ namespace mpvnet
public void UpdateExternalTracks()
{
int trackCount = GetPropertyInt("track-list/count");
int trackListTrackCount = GetPropertyInt("track-list/count");
int editionCount = GetPropertyInt("edition-list/count");
int count = MediaTracks.Where(i => i.Type != "g").Count();
lock (MediaTracksLock)
{
if (MediaTracks.Count != (trackCount + editionCount))
if (count != (trackListTrackCount + editionCount))
{
MediaTracks = MediaTracks.Where(i => !i.External).ToList();
MediaTracks.AddRange(GetTracks(false));
@@ -1599,6 +1642,15 @@ namespace mpvnet
using (MediaInfo mi = new MediaInfo(path))
{
MediaTrack track = new MediaTrack();
Add(track, mi.GetGeneral("Format"));
Add(track, mi.GetGeneral("FileSize/String"));
Add(track, mi.GetGeneral("Duration/String"));
Add(track, mi.GetGeneral("OverallBitRate/String"));
track.Text = "G: " + track.Text.Trim(' ', ',');
track.Type = "g";
tracks.Add(track);
int videoCount = mi.GetCount(MediaInfoStreamKind.Video);
for (int i = 0; i < videoCount; i++)
@@ -1608,16 +1660,13 @@ namespace mpvnet
if (float.TryParse(fps, NumberStyles.Float, CultureInfo.InvariantCulture, out float result))
fps = result.ToString(CultureInfo.InvariantCulture);
MediaTrack track = new MediaTrack();
track = new MediaTrack();
Add(track, mi.GetVideo(i, "Format"));
Add(track, mi.GetVideo(i, "Format_Profile"));
Add(track, mi.GetVideo(i, "Width") + "x" + mi.GetVideo(i, "Height"));
Add(track, mi.GetVideo(i, "BitRate/String"));
Add(track, fps + " FPS");
Add(track, mi.GetVideo(i, "Language/String"));
Add(track, mi.GetVideo(i, "Forced") == "Yes" ? "Forced" : "");
Add(track, (videoCount > 1 && mi.GetVideo(i, "Default") == "Yes") ? "Default" : "");
Add(track, mi.GetVideo(i, "Title"));
track.Text = "V: " + track.Text.Trim(' ', ',');
track.Type = "v";
track.ID = i + 1;
@@ -1628,16 +1677,89 @@ namespace mpvnet
for (int i = 0; i < audioCount; i++)
{
MediaTrack track = new MediaTrack();
Add(track, mi.GetAudio(i, "Language/String"));
Add(track, mi.GetAudio(i, "Format"));
string lang = mi.GetAudio(i, "Language/String");
string nativeLang = GetNativeLanguage(lang);
string title = mi.GetAudio(i, "Title");
string format = mi.GetAudio(i, "Format");
if (!string.IsNullOrEmpty(title))
{
if (title.ContainsEx("DTS-HD MA"))
format = "DTS-MA";
if (title.ContainsEx("DTS-HD MA"))
title = title.Replace("DTS-HD MA", "");
if (title.ContainsEx("Blu-ray"))
title = title.Replace("Blu-ray", "");
if (title.ContainsEx("UHD "))
title = title.Replace("UHD ", "");
if (title.ContainsEx("EAC"))
title = title.Replace("EAC", "E-AC");
if (title.ContainsEx("AC3"))
title = title.Replace("AC3", "AC-3");
if (title.ContainsEx(lang))
title = title.Replace(lang, "").Trim();
if (title.ContainsEx(nativeLang))
title = title.Replace(nativeLang, "").Trim();
if (title.ContainsEx("Surround"))
title = title.Replace("Surround", "");
if (title.ContainsEx("Dolby Digital"))
title = title.Replace("Dolby Digital", "");
if (title.ContainsEx("Stereo"))
title = title.Replace("Stereo", "");
if (title.StartsWithEx(format + " "))
title = title.Replace(format + " ", "");
foreach (string i2 in new [] { "2.0", "5.1", "6.1", "7.1" })
if (title.ContainsEx(i2))
title = title.Replace(i2, "").Trim();
if (title.ContainsEx("@ "))
title = title.Replace("@ ", "");
if (title.ContainsEx(" @"))
title = title.Replace(" @", "");
if (title.ContainsEx("()"))
title = title.Replace("()", "");
if (title.ContainsEx("[]"))
title = title.Replace("[]", "");
if (title.TrimEx() == format)
title = null;
if (!string.IsNullOrEmpty(title))
title = title.Trim(" _-".ToCharArray());
}
track = new MediaTrack();
Add(track, lang);
Add(track, format);
Add(track, mi.GetAudio(i, "Format_Profile"));
Add(track, mi.GetAudio(i, "BitRate/String"));
Add(track, mi.GetAudio(i, "Channel(s)") + " ch");
Add(track, mi.GetAudio(i, "SamplingRate/String"));
Add(track, mi.GetAudio(i, "Forced") == "Yes" ? "Forced" : "");
Add(track, (audioCount > 1 && mi.GetAudio(i, "Default") == "Yes") ? "Default" : "");
Add(track, mi.GetAudio(i, "Title"));
Add(track, title);
if (track.Text.Contains("MPEG Audio, Layer 2"))
track.Text = track.Text.Replace("MPEG Audio, Layer 2", "MP2");
if (track.Text.Contains("MPEG Audio, Layer 3"))
track.Text = track.Text.Replace("MPEG Audio, Layer 2", "MP3");
track.Text = "A: " + track.Text.Trim(' ', ',');
track.Type = "a";
track.ID = i + 1;
@@ -1649,6 +1771,7 @@ namespace mpvnet
for (int i = 0; i < subCount; i++)
{
string codec = mi.GetText(i, "Format").ToUpperEx();
if (codec == "UTF-8")
codec = "SRT";
else if (codec == "WEBVTT")
@@ -1656,13 +1779,63 @@ namespace mpvnet
else if (codec == "VOBSUB")
codec = "VOB";
MediaTrack track = new MediaTrack();
Add(track, mi.GetText(i, "Language/String"));
string lang = mi.GetText(i, "Language/String");
string nativeLang = GetNativeLanguage(lang);
string title = mi.GetText(i, "Title");
bool forced = mi.GetText(i, "Forced") == "Yes";
if (!string.IsNullOrEmpty(title))
{
if (title.ContainsEx("VobSub"))
title = title.Replace("VobSub", "VOB");
if (title.ContainsEx(codec))
title = title.Replace(codec, "");
if (title.ContainsEx(lang.ToLowerEx()))
title = title.Replace(lang.ToLowerEx(), lang);
if (title.ContainsEx(nativeLang.ToLowerEx()))
title = title.Replace(nativeLang.ToLowerEx(), nativeLang).Trim();
if (title.ContainsEx(lang))
title = title.Replace(lang, "");
if (title.ContainsEx(nativeLang))
title = title.Replace(nativeLang, "").Trim();
if (title.ContainsEx("full"))
title = title.Replace("full", "").Trim();
if (title.ContainsEx("Full"))
title = title.Replace("Full", "").Trim();
if (title.ContainsEx("Subtitles"))
title = title.Replace("Subtitles", "").Trim();
if (title.ContainsEx("forced"))
title = title.Replace("forced", "Forced").Trim();
if (forced && title.ContainsEx("Forced"))
title = title.Replace("Forced", "").Trim();
if (title.ContainsEx("()"))
title = title.Replace("()", "");
if (title.ContainsEx("[]"))
title = title.Replace("[]", "");
if (!string.IsNullOrEmpty(title))
title = title.Trim(" _-".ToCharArray());
}
track = new MediaTrack();
Add(track, lang);
Add(track, codec);
Add(track, mi.GetText(i, "Format_Profile"));
Add(track, mi.GetText(i, "Forced") == "Yes" ? "Forced" : "");
Add(track, forced ? "Forced" : "");
Add(track, (subCount > 1 && mi.GetText(i, "Default") == "Yes") ? "Default" : "");
Add(track, mi.GetText(i, "Title"));
Add(track, title);
track.Text = "S: " + track.Text.Trim(' ', ',');
track.Type = "s";
track.ID = i + 1;
@@ -1689,8 +1862,10 @@ namespace mpvnet
void Add(MediaTrack track, object value)
{
if (value != null && !(track.Text != null && track.Text.Contains(value.ToString())))
track.Text += " " + value + ",";
string str = value.ToStringEx().Trim();
if (str != "" && !(track.Text != null && track.Text.Contains(str)))
track.Text += " " + str + ",";
}
private string[] _ProfileNames;

View File

@@ -32,6 +32,9 @@ namespace mpvnet
App.Init();
Mutex mutex = new Mutex(true, StringHelp.GetMD5Hash(App.ConfPath), out bool isFirst);
if (Control.ModifierKeys.HasFlag(Keys.Shift))
App.ProcessInstance = "multi";
if ((App.ProcessInstance == "single" || App.ProcessInstance == "queue") && !isFirst)
{
List<string> args2 = new List<string>();

View File

@@ -23,7 +23,6 @@ namespace mpvnet
public Size WindowSize;
public string ConfigEditorSearch = "Video:";
public string Mute = "no";
public string UpdateCheckVersion = "";
}
class SettingsManager

View File

@@ -23,6 +23,12 @@ public class MediaInfo : IDisposable
public int GetCount(MediaInfoStreamKind kind) => MediaInfo_Count_Get(Handle, kind, -1);
public string GetGeneral(string parameter)
{
return Marshal.PtrToStringUni(MediaInfo_Get(Handle, MediaInfoStreamKind.General,
0, parameter, MediaInfoKind.Text, MediaInfoKind.Name));
}
public string GetVideo(int stream, string parameter)
{
return Marshal.PtrToStringUni(MediaInfo_Get(Handle, MediaInfoStreamKind.Video,

View File

@@ -14,6 +14,9 @@ public class libmpv
[DllImport("mpv-2.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern mpv_error mpv_initialize(IntPtr mpvHandle);
[DllImport("mpv-2.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void mpv_destroy(IntPtr mpvHandle);
[DllImport("mpv-2.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern mpv_error mpv_command(IntPtr mpvHandle, IntPtr strings);
@@ -65,6 +68,9 @@ public class libmpv
[DllImport("mpv-2.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr mpv_wait_event(IntPtr mpvHandle, double timeout);
[DllImport("mpv-2.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern mpv_error mpv_request_event(IntPtr mpvHandle, mpv_event_id id, int enable);
public enum mpv_error
{
MPV_ERROR_SUCCESS = 0,

View File

@@ -11,7 +11,7 @@
<Identity
Name="5664FrankSkare.mpv.net"
Publisher="CN=6A1A1E69-736C-4C77-B310-7B6D38E32617"
Version="5.7.0.0" />
Version="6.0.3.0" />
<Properties>
<DisplayName>mpv.net</DisplayName>

View File

@@ -27,7 +27,7 @@
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundlePlatforms>neutral</AppxBundlePlatforms>
<AppxBundlePlatforms>x64</AppxBundlePlatforms>
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
</PropertyGroup>

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.0.2.0")]
[assembly: AssemblyFileVersion("6.0.2.0")]
[assembly: AssemblyVersion("6.0.3.2")]
[assembly: AssemblyFileVersion("6.0.3.2")]

View File

@@ -1,82 +1,74 @@
[setting]
name = process-instance
file = mpvnet
default = single
filter = General
help = Defines if more then one mpv.net process is allowed. (mpv.net specific option)\n\nTip: 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 not only works on process startup but in all mpv.net features that open files and URLs.
help = Defines if more then one mpv.net process is allowed. (mpv.net specific option)\n\nMulti can alternatively be enabled by pressing the SHIFT key.\n\nWhenever 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 not only works on process startup but in all mpv.net features that open files and URLs.
option = multi Create a new process everytime the shell starts mpv.net
option = single Force a single process everytime the shell starts mpv.net
option = queue Force a single process and add files to playlist
[setting]
name = recent-count
file = mpvnet
filter = General
help = <int> Amount of recent files to be remembered. Default: 15 (mpv.net specific option)
[setting]
name = media-info
file = mpvnet
default = yes
filter = General
help = Usage of the media info library instead of mpv to access media information. (mpv.net specific option)
option = yes
option = no
[setting]
name = history-filter
file = mpvnet
filter = General
width = 500
help = Semicolon separated list of paths to be excluded from the history log feature.
name = video-file-extensions
file = mpvnet
filter = General
width = 500
help = Video file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net specific option)
[setting]
name = audio-file-extensions
file = mpvnet
filter = General
width = 500
help = Audio file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net specific option)
[setting]
name = image-file-extensions
file = mpvnet
filter = General
width = 500
help = Image file extensions used to create file associations and used by the auto-load-folder feature. (mpv.net specific option)
[setting]
name = debug-mode
file = mpvnet
default = no
filter = General
help = Enable this only when a developer asks for it. (mpv.net specific option)
option = yes
option = no
[setting]
name = vo
file = mpv
default = gpu
filter = Video
help = Video output drivers to be used.\n\nFor more information visit:
url = https://mpv.io/manual/master/#video-output-drivers-vo
option = gpu General purpose, customizable, GPU-accelerated video output driver. It supports extended scaling methods, dithering, color management, custom shaders, HDR, and more.
option = gpu-next Experimental video renderer based on libplacebo. This supports almost the same set of features as --vo=gpu.
option = direct3d Video output driver that uses the Direct3D interface.
[setting]
name = hwdec
file = mpv
default = no
filter = Video
url = https://mpv.io/manual/master/#options-hwdec
help = Specify the hardware video decoding API that should be used if possible. Whether hardware decoding is actually done depends on the video codec. If hardware decoding is not possible, mpv will fall back on software decoding.\n\nFor more information visit:
option = no always use software decoding
option = auto enable best hw decoder
option = yes exactly the same as auto
@@ -91,24 +83,20 @@ option = cuda-copy copies video back to system RAM (Any platform CUDA is ava
option = nvdec requires vo=gpu (Any platform CUDA is available)
option = nvdec-copy copies video back to system RAM (Any platform CUDA is available)
[setting]
name = gpu-api
file = mpv
default = auto
filter = Video
help = Controls which type of graphics APIs will be accepted. Auto uses d3d11, it should only be changed in case of problems, Vulkan is not recommended.
option = auto Use any available API
option = d3d11 Allow only gpu-context=d3d11
option = opengl Allow only OpenGL (requires OpenGL 2.1+ or GLES 2.0+)
option = vulkan Allow only Vulkan
[setting]
name = gpu-context
file = mpv
default = auto
filter = Video
option = auto auto-select
option = d3d11 Win32, with native Direct3D 11 rendering.
option = angle Direct3D11 through the OpenGL ES translation layer ANGLE. This supports almost everything the win backend does (if the ANGLE build is new enough).
@@ -116,14 +104,12 @@ option = win Win32/WGL
option = dxinterop (experimental) Win32, using WGL for rendering and Direct3D 9Ex for presentation. Works on Nvidia and AMD. Newer Intel chips with the latest drivers may also work.
option = winvk VK_KHR_win32_surface
[setting]
name = video-sync
file = mpv
default = audio
filter = Video
help = How the player synchronizes audio and video.\n\nFor more information visit:
url = https://mpv.io/manual/master/#options-video-sync
option = audio
option = display-resample
option = display-resample-vdrop
@@ -133,13 +119,11 @@ option = display-adrop
option = display-desync
option = desync
[setting]
name = scale
file = mpv
default = bilinear
filter = Video
help = The GPU renderer filter function to use when upscaling video. There are some more filters, but most are not as useful. For a complete list, pass help as value, e.g.: mpv --scale=help
option = bilinear Bilinear hardware texture filtering (fastest, very low quality).
option = spline36 Mid quality and speed. This is the default when using gpu-hq.
option = lanczos Lanczos scaling. Provides mid quality and speed. Generally worse than spline36, but it results in a slightly sharper image which is good for some content types. The number of taps can be controlled with scale-radius, but is best left unchanged. (This filter is an alias for sinc-windowed sinc)
@@ -148,13 +132,11 @@ option = ewa_lanczossharp A slightly sharpened version of ewa_lanczos, preconfi
option = mitchell Mitchell-Netravali. The B and C parameters can be set with scale-param1 and scale-param2. This filter is very good at downscaling (see dscale).
option = oversample A version of nearest neighbour that (naively) oversamples pixels, so that pixels overlapping edges get linearly interpolated instead of rounded. This essentially removes the small imperfections and judder artifacts caused by nearest-neighbour interpolation, in exchange for adding some blur. This filter is good at temporal interpolation, and also known as "smoothmotion" (see tscale).
[setting]
name = cscale
file = mpv
default = bilinear
filter = Video
help = As scale, but for interpolating chroma information. If the image is not subsampled, this option is ignored entirely.
option = bilinear Bilinear hardware texture filtering (fastest, very low quality).
option = spline36 Mid quality and speed. This is the default when using gpu-hq.
option = lanczos Lanczos scaling. Provides mid quality and speed. Generally worse than spline36, but it results in a slightly sharper image which is good for some content types. The number of taps can be controlled with scale-radius, but is best left unchanged. (This filter is an alias for sinc-windowed sinc)
@@ -163,13 +145,11 @@ option = ewa_lanczossharp A slightly sharpened version of ewa_lanczos, preconfi
option = mitchell Mitchell-Netravali. The B and C parameters can be set with scale-param1 and scale-param2. This filter is very good at downscaling (see dscale).
option = oversample A version of nearest neighbour that (naively) oversamples pixels, so that pixels overlapping edges get linearly interpolated instead of rounded. This essentially removes the small imperfections and judder artifacts caused by nearest-neighbour interpolation, in exchange for adding some blur. This filter is good at temporal interpolation, and also known as "smoothmotion" (see tscale).
[setting]
name = dscale
file = mpv
default =
filter = Video
help = Like scale, but apply these filters on downscaling instead. \nIf no option is selected, it will keep the same with the upscaler.
option = bilinear Bilinear hardware texture filtering (fastest, very low quality).
option = spline36 Mid quality and speed. This is the default when using gpu-hq.
option = lanczos Lanczos scaling. Provides mid quality and speed. Generally worse than spline36, but it results in a slightly sharper image which is good for some content types. The number of taps can be controlled with scale-radius, but is best left unchanged. (This filter is an alias for sinc-windowed sinc)
@@ -178,115 +158,94 @@ option = ewa_lanczossharp A slightly sharpened version of ewa_lanczos, preconfi
option = mitchell Mitchell-Netravali. The B and C parameters can be set with scale-param1 and scale-param2. This filter is very good at downscaling (see dscale).
option = oversample A version of nearest neighbour that (naively) oversamples pixels, so that pixels overlapping edges get linearly interpolated instead of rounded. This essentially removes the small imperfections and judder artifacts caused by nearest-neighbour interpolation, in exchange for adding some blur. This filter is good at temporal interpolation, and also known as "smoothmotion" (see tscale).
[setting]
name = dither-depth
file = mpv
default = no
filter = Video
help = Set dither target depth to N. Note that the depth of the connected video display device cannot be detected. Often, LCD panels will do dithering on their own, which conflicts with this option and leads to ugly output.
option = no Disable any dithering done by mpv.
option = auto Automatic selection. If output bit depth cannot be detected, 8 bits per component are assumed.
option = 8 Dither to 8 bit output.
option = 10 Dither to 10 bit output.
[setting]
name = correct-downscaling
file = mpv
default = no
filter = Video
help = When using convolution based filters, extend the filter size when downscaling. Increases quality, but reduces performance while downscaling.\n\nThis will perform slightly sub-optimally for anamorphic video (but still better than without it) since it will extend the size to match only the milder of the scale factors between the axes.
option = yes
option = no
[setting]
name = sigmoid-upscaling
file = mpv
default = no
filter = Video
help = When upscaling, use a sigmoidal color transform to avoid emphasizing ringing artifacts. This also implies linear-scaling.
option = yes
option = no
[setting]
name = deband
file = mpv
default = no
filter = Video
help = Enable the debanding algorithm. This greatly reduces the amount of visible banding, blocking and other quantization artifacts, at the expense of very slightly blurring some of the finest details. In practice, it's virtually always an improvement - the only reason to disable it would be for performance.
option = yes
option = no
[setting]
name = d3d11va-zero-copy
file = mpv
default = no
filter = Video
help = By default, when using hardware decoding with --gpu-api=d3d11, the video image will be copied (GPU-to-GPU) from the decoder surface to a shader resource. Set this option to avoid that copy by sampling directly from the decoder image. This may increase performance and reduce power usage, but can cause the image to be sampled incorrectly on the bottom and right edges due to padding, and may invoke driver bugs, since Direct3D 11 technically does not allow sampling from a decoder surface (though most drivers support it.)
option = yes
option = no
[setting]
name = hdr-compute-peak
file = mpv
default = auto
filter = Video
help = Compute the HDR peak and frame average brightness per-frame instead of relying on tagged metadata. These values are averaged over local regions as well as over several frames to prevent the value from jittering around too much. This option basically gives you dynamic, per-scene tone mapping. Requires compute shaders, which is a fairly recent OpenGL feature, and will probably also perform horribly on some drivers, so enable at your own risk. The special value auto (default) will enable HDR peak computation automatically if compute shaders and SSBOs are supported.
option = auto
option = yes
option = no
[setting]
name = allow-delayed-peak-detect
file = mpv
default = yes
filter = Video
help = When using --hdr-compute-peak, allow delaying the detected peak by a frame when beneficial for performance. In particular, this is required to avoid an unnecessary FBO indirection when no advanced rendering is required otherwise. Has no effect if there already is an indirect pass, such as when advanced scaling is enabled. (Only affects --vo=gpu-next, note that --vo=gpu always delays the peak.)
option = yes
option = no
[setting]
name = volume
file = mpv
filter = Audio
help = Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values can be passed for compatibility, but are treated as 0. Since mpv 0.18.1, this always controls the internal mixer (aka "softvol"). Default: 100
[setting]
name = remember-volume
file = mpvnet
default = yes
filter = Audio
help = Save volume and mute on exit and restore it on start. (mpv.net specific option)
option = yes
option = no
[setting]
name = alang
file = mpv
filter = Audio
type = string
help = Specify a priority list of audio languages to use. Different container formats employ different language codes. DVDs use ISO 639-1 two-letter language codes, Matroska, MPEG-TS and NUT use ISO 639-2 three-letter language codes, while OGM uses a free-form identifier. See also aid.\n\nExamples\n\nmpv dvd://1 alang=hu,en chooses the Hungarian language track on a DVD and falls back on English if Hungarian is not available.\n\nmpv alang=jpn example.mkv plays a Matroska file with Japanese audio.
[setting]
name = audio-file-auto
file = mpv
default = no
filter = Audio
help = Load additional audio files matching the video filename. The parameter specifies how external audio files are matched.
option = no Don't automatically load external audio files.
option = exact Load the media filename with audio file extension.
option = fuzzy Load all audio files containing media filename.
option = all Load all audio files in the current and audio-file-paths directories.
[setting]
name = audio-device
file = mpv
filter = Audio
@@ -294,86 +253,72 @@ type = string
url = https://mpv.io/manual/master/#options-audio-device
help = <name> Use the given audio device. This consists of the audio output name, e.g. alsa, followed by /, followed by the audio output specific device name. The default value for this option is auto, which tries every audio output in preference order with the default device.\nAvailable devices can be found in the context menu under:\nView > Advanced > Show Audio Devices
[setting]
name = slang
file = mpv
filter = Subtitle
type = string
help = Specify a priority list of subtitle languages to use. Different container formats employ different language codes. DVDs use ISO 639-1 two letter language codes, Matroska uses ISO 639-2 three letter language codes while OGM uses a free-form identifier. See also sid.
[setting]
name = sub-auto
file = mpv
default = exact
filter = Subtitle
help = Load additional subtitle files matching the video filename. The parameter specifies how external subtitle files are matched. exact is enabled by default.
option = no Don't automatically load external subtitle files.
option = exact Load the media filename with subtitle file extension.
option = fuzzy Load all subs containing media filename.
option = all Load all subs in the current and sub-file-paths directories.
[setting]
name = sub-font
file = mpv
filter = Subtitle
type = string
help = Specify font to use for subtitles that do not themselves specify a particular font. The default is sans-serif.
[setting]
name = sub-font-size
file = mpv
filter = Subtitle
help = Specify the sub font size. The unit is the size in scaled pixels at a window height of 720. The actual pixel size is scaled with the window height: if the window height is larger or smaller than 720, the actual size of the text increases or decreases as well. Default: 55
[setting]
name = sub-color
file = mpv
type = color
filter = Subtitle
help = Specify the color used for unstyled text subtitles.\n\nThe color is specified in the form r/g/b, where each color component is specified as number in the range 0.0 to 1.0. It's also possible to specify the transparency by using r/g/b/a, where the alpha value 0 means fully transparent, and 1.0 means opaque. If the alpha component is not given, the color is 100% opaque.\n\nPassing a single number to the option sets the sub to gray, and the form gray/a lets you specify alpha additionally.\n\nExamples\n\n1.0/0.0/0.0 set sub to opaque red\n1.0/0.0/0.0/0.75 set sub to opaque red with 75% alpha\n0.5/0.75 set sub to 50% gray with 75% alpha\n\nAlternatively, the color can be specified as a RGB hex triplet in the form #RRGGBB, where each 2-digit group expresses a color value in the range 0 (00) to 255 (FF). For example, #FF0000 is red. This is similar to web colors. Alpha is given with #AARRGGBB.\n\nExamples\n\n#FF0000 set sub to opaque red\n#C0808080 set sub to 50% gray with 75% alpha
[setting]
name = sub-border-color
file = mpv
type = color
filter = Subtitle
help = See sub-color. Color used for the sub font border. Ignored when sub-back-color is specified (or more exactly: when that option is not set to completely transparent).
[setting]
name = sub-back-color
file = mpv
type = color
filter = Subtitle
help = See sub-color. Color used for sub text background. You can use sub-shadow-offset to change its size relative to the text.
[setting]
name = fullscreen
file = mpv
default = no
filter = Screen
help = Start the player in fullscreen mode.
option = yes
option = no
[setting]
name = border
file = mpv
default = yes
filter = Screen
help = Show window with decoration (titlebar, border).
option = yes
option = no
[setting]
name = screen
file = mpv
filter = Screen
help = <0-32> In multi-monitor configurations (i.e. a single desktop that spans across multiple displays), this option tells mpv which screen to display the video on.
[setting]
name = osd-playing-msg
file = mpv
width = 300
@@ -382,65 +327,54 @@ type = string
help = Show a message on OSD when playback starts. The string is expanded for properties, e.g. osd-playing-msg='file: ${filename}' will show the message file: followed by a space and the currently played filename. For more information visit:
url = https://mpv.io/manual/master/#property-expansion
[setting]
name = osd-font-size
file = mpv
filter = Screen
help = Specify the OSD font size. See sub-font-size for details. Default: 55
[setting]
name = osd-duration
file = mpv
filter = Screen
help = Set the duration of the OSD messages in ms. Default: 1000
[setting]
name = osd-scale-by-window
file = mpv
default = yes
filter = Screen
help = Whether to scale the OSD with the window size. If this is disabled, osd-font-size and other OSD options that use scaled pixels are always in actual pixels. The effect is that changing the window size won't change the OSD font size.
option = yes
option = no
[setting]
name = autofit
file = mpv
filter = Screen
help = <int> Initial window height in percent. Default: 60
[setting]
name = autofit-image
file = mpvnet
filter = Screen
help = <int> Initial window height in percent for image files. Default: 80
[setting]
name = autofit-audio
file = mpvnet
filter = Screen
help = <int> Initial window height in percent for audio files. Default: 70
[setting]
name = autofit-smaller
file = mpv
filter = Screen
help = <int> Minimum window height in percent. Default: 10
[setting]
name = autofit-larger
file = mpv
filter = Screen
help = <int> Maximum window height in percent. Default: 80
[setting]
name = start-size
file = mpvnet
default = height-session
filter = Screen
help = Setting to remember the window size. (mpv.net specific option)
option = width-session Window width is remembered in the current session
option = width-always Window width is always remembered
option = height-session Window height is remembered in the current session
@@ -449,234 +383,191 @@ option = video Window size is set to video resolution
option = session Window size is remembered in the current session
option = always Window size is always remembered
[setting]
name = keepaspect-window
file = mpv
default = yes
filter = Screen
help = keepaspect-window will lock the window size to the video aspect. Default: yes
option = yes
option = no
[setting]
name = minimum-aspect-ratio
file = mpvnet
filter = Screen
help = <float> Minimum aspect ratio of the window. Useful to force a wider window and therefore a larger OSC. (mpv.net specific option)
[setting]
name = minimum-aspect-ratio-audio
file = mpvnet
filter = Screen
help = Same as minimum-aspect-ratio but used for audio files.
[setting]
name = remember-window-position
file = mpvnet
default = no
filter = Screen
help = Save the window position on exit. (mpv.net specific option)
option = yes
option = no
[setting]
name = snap-window
file = mpv
default = no
filter = Screen
help = Snap the player window to screen edges.
option = yes
option = no
[setting]
name = window-maximized
file = mpv
default = no
filter = Screen
help = Start with a maximized window.
option = yes
option = no
[setting]
name = start-threshold
file = mpvnet
filter = Screen
help = 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 (mpv.net specific option)
[setting]
name = taskbar-progress
file = mpv
default = yes
filter = Playback
help = Show progress in taskbar.
option = yes
option = no
[setting]
name = keep-open
file = mpv
default = no
filter = Playback
option = yes If the current file ends, go to the next file, keep the last file open.
option = no If the current file ends, go to the next file. If idle is set to no, the player exits after the last file.
option = always Playback will never automatically advance to the next file.
[setting]
name = keep-open-pause
file = mpv
default = yes
filter = Playback
help = If set to no, instead of pausing when keep-open is active, just stop at end of file and continue playing forward when you seek backwards until end where it stops again.
option = yes
option = no
[setting]
name = idle
file = mpv
default = yes
filter = Playback
help = If set to no and keep-open is also set to no, the player exits after the last file ends.
option = yes
option = no
option = once
[setting]
name = auto-play
file = mpvnet
default = no
filter = Playback
help = Sets pause=no on file load. (mpv.net specific option)
option = yes
option = no
[setting]
name = loop-file
file = mpv
filter = Playback
help = <N|inf|no> Loop a single file N times. inf means forever, no means normal playback.\n\nThe difference to loop-playlist is that this doesn't loop the playlist, just the file itself. If the playlist contains only a single file, the difference between the two option is that this option performs a seek on loop, instead of reloading the file. loop is an alias for this option.
[setting]
name = save-position-on-quit
file = mpv
default = no
filter = Playback
help = Always save the current playback position on quit. When this file is played again later, the player will seek to the old playback position on start. This does not happen if playback of a file is stopped in any other way than quitting. For example, going to the next file in the playlist will not save the position, and start playback at beginning the next time the file is played.\n\nThis behavior is disabled by default, but is always available when quitting the player with Shift+Q.
option = yes
option = no
[setting]
name = watch-later-options
file = mpv
filter = Playback
help = The options that are saved in "watch later" files if they have been changed since when mpv started. These values will be restored the next time the files are played. This is a string list option. For more information visit:
url = https://mpv.io/manual/master/#options-watch-later-options
[setting]
name = hr-seek
file = mpv
default = absolute
filter = Playback
help = Select when to use precise seeks that are not limited to keyframes. Such seeks require decoding video from the previous keyframe up to the target position and so can take some time depending on decoding performance. For some video formats, precise seeks are disabled. This option selects the default choice to use for seeks; it is possible to explicitly override that default in the definition of key bindings and in input commands.
option = yes Use precise seeks whenever possible.
option = no Never use precise seeks.
option = absolute Use precise seeks if the seek is to an absolute position in the file, such as a chapter seek, but not for relative seeks like the default behavior of arrow keys.
option = always Same as yes (for compatibility).
[setting]
name = track-auto-selection
file = mpv
default = yes
filter = Playback
help = Enable the default track auto-selection. Enabling this will make the player select streams according to aid, alang, and others. If it is disabled, no tracks are selected. In addition, the player will not exit if no tracks are selected, and wait instead (this wait mode is similar to pausing, but the pause option is not set).\n\nThis is useful with lavfi-complex: you can start playback in this mode, and then set select tracks at runtime by setting the filter graph. Note that if lavfi-complex is set before playback is started, the referenced tracks are always selected.
option = yes
option = no
[setting]
name = loop-playlist
file = mpv
filter = Playback
help = <N|inf|force|no> Loops playback N times. A value of 1 plays it one time (default), 2 two times, etc. inf means forever. no is the same as 1 and disables looping. If several files are specified on command line, the entire playlist is looped. The force mode is like inf, but does not skip playlist entries which have been marked as failing. This means the player might waste CPU time trying to loop a file that doesn't exist. But it might be useful for playing webradios under very bad network conditions.
[setting]
name = auto-load-folder
file = mpvnet
default = yes
filter = Playback
help = For single files automatically load the entire directory into the playlist. Can be suppressed via shift key. (mpv.net specific option)
option = yes
option = no
[setting]
name = input-ar-delay
file = mpv
filter = Input
help = Delay in milliseconds before we start to autorepeat a key (0 to disable).
[setting]
name = input-ar-rate
file = mpv
filter = Input
help = Number of key presses to generate per second on autorepeat.
[setting]
name = dark-mode
file = mpvnet
default = always
filter = UI
help = Changes between a light and dark theme.\nmpv.net must be restarted after a change.\nmpv.net specific option.
option = always
option = system Available on Windows 10 or higher
option = never
[setting]
name = dark-theme
file = mpvnet
filter = UI
url = https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#color-theme
url = https://github.com/mpvnet-player/mpv.net/blob/master/docs/Manual.md#color-theme
help = Color theme used in dark mode.\nmpv.net must be restarted after a change.\nmpv.net specific option. Default: dark
[setting]
name = light-theme
file = mpvnet
filter = UI
url = https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#color-theme
url = https://github.com/mpvnet-player/mpv.net/blob/master/docs/Manual.md#color-theme
help = Color theme used in light mode.\nmpv.net must be restarted after a change.\nmpv.net specific option. Default: light
[setting]
name = show-logo
file = mpvnet
default = yes
filter = UI
help = Draws the blue mpv.net logo ontop of the native OSC logo.
option = yes
option = no
[setting]
name = show-santa-logo
file = mpvnet
default = yes
filter = UI
help = Draws the blue mpv.net logo with a santa hat in december, the option is called greenandgrumpy in mpv.
option = yes
option = no
[setting]
name = screenshot-directory
file = mpv
width = 500
@@ -684,47 +575,38 @@ type = folder
filter = Screenshot
help = Store screenshots in this directory. This path is joined with the filename generated by screenshot-template. If the template filename is already absolute, the directory is ignored.\n\nIf the directory does not exist, it is created on the first screenshot. If it is not a directory, an error is generated when trying to write a screenshot.
[setting]
name = screenshot-format
file = mpv
default = jpg
filter = Screenshot
help = Set the image file type used for saving screenshots.
option = jpg
option = png
[setting]
name = screenshot-tag-colorspace
file = mpv
default = no
filter = Screenshot
help = Tag screenshots with the appropriate colorspace. Note that not all formats are supported.
option = yes
option = no
[setting]
name = screenshot-high-bit-depth
file = mpv
default = yes
filter = Screenshot
help = If possible, write screenshots with a bit depth similar to the source video. This is interesting in particular for PNG, as this sometimes triggers writing 16 bit PNGs with huge file sizes. This will also include an unused alpha channel in the resulting files if 16 bit is used.
option = yes
option = no
[setting]
name = screenshot-jpeg-source-chroma
file = mpv
default = yes
filter = Screenshot
help = Write JPEG files with the same chroma subsampling as the video. If disabled, the libjpeg default is used.
option = yes
option = no
[setting]
name = screenshot-template
file = mpv
filter = Screenshot
@@ -732,39 +614,33 @@ type = string
help = Specify the filename template used to save screenshots. The template specifies the filename without file extension, and can contain format specifiers, which will be substituted when taking a screenshot. By default, the template is mpv-shot%n, which results in filenames like mpv-shot0012.png for example.\n\nFind the full documentation here:
url = https://mpv.io/manual/master/#options-screenshot-template
[setting]
name = screenshot-jpeg-quality
file = mpv
filter = Screenshot
help = <0-100> Set the JPEG quality level. Higher means better quality. The default is 90.
[setting]
name = screenshot-png-compression
file = mpv
filter = Screenshot
help = <0-9> Set the PNG compression level. Higher means better compression. This will affect the file size of the written screenshot file and the time it takes to write a screenshot. Too high compression might occupy enough CPU time to interrupt playback. The default is 7.
[setting]
name = screenshot-png-filter
file = mpv
filter = Screenshot
help = <0-5> Set the filter applied prior to PNG compression. 0 is none, 1 is 'sub', 2 is 'up', 3 is 'average', 4 is 'Paeth', and 5 is 'mixed'. This affects the level of compression that can be achieved. For most images, 'mixed' achieves the best compression ratio, hence it is the default.
[setting]
name = cache
file = mpv
default = auto
filter = Cache
help = Decide whether to use network cache settings.
url = https://mpv.io/manual/master/#options-cache
option = yes
option = no
option = auto
[setting]
name = demuxer-max-bytes
file = mpv
filter = Demuxer
help = <bytesize> Controls how much the demuxer is allowed to buffer ahead.\nSuffixes such as KiB and MiB are supported.
url = https://mpv.io/manual/master/#options-demuxer-max-bytes
url = https://mpv.io/manual/master/#options-demuxer-max-bytes

View File

@@ -1,5 +1,5 @@
# https://github.com/stax76/mpv.net/blob/master/docs/Manual.md#input-and-context-menu
# https://github.com/mpvnet-player/mpv.net/blob/master/docs/Manual.md#input-and-context-menu
o script-message-to mpvnet open-files #menu: Open > Open Files...
V script-message-to mpvnet open-clipboard #menu: Open > Open URL or file from clipboard
@@ -24,6 +24,8 @@ _ ignore #menu: Navigate > -
Home script-message-to mpvnet playlist-first #menu: Navigate > First File
End script-message-to mpvnet playlist-last #menu: Navigate > Last File
_ ignore #menu: Navigate > -
F9 script-message-to mpvnet playlist-random #menu: Navigate > Random File
_ ignore #menu: Navigate > -
PGUP add chapter 1 #menu: Navigate > Next Chapter
PGDWN add chapter -1 #menu: Navigate > Previous Chapter
_ ignore #menu: Navigate > -
@@ -78,7 +80,7 @@ _ ignore #menu: Audio > -
Ctrl+d add audio-delay 0.1 #menu: Audio > Delay +0.1
Ctrl+D add audio-delay -0.1 #menu: Audio > Delay -0.1
KP8 cycle sub #menu: Subtitle > Cycle/Next
KP8 script-message-to mpvnet cycle-subtitles #menu: Subtitle > Cycle/Next #menu: Subtitle > Cycle/Next
v cycle sub-visibility #menu: Subtitle > Toggle Visibility
_ ignore #menu: Subtitle > -
z add sub-delay -0.1 #menu: Subtitle > Delay -0.1
@@ -115,6 +117,12 @@ Alt+1 script-message-to mpvnet window-scale 1.0 #menu: View > Zoom > 100 %
Alt+2 script-message-to mpvnet window-scale 2.0 #menu: View > Zoom > 200 %
Alt+3 script-message-to mpvnet window-scale 3.0 #menu: View > Zoom > 300 %
Alt+Left script-message-to mpvnet move-window left #menu: View > Move > Left
Alt+Right script-message-to mpvnet move-window right #menu: View > Move > Right
Alt+Up script-message-to mpvnet move-window top #menu: View > Move > Top
Alt+Down script-message-to mpvnet move-window bottom #menu: View > Move > Bottom
Alt+BS script-message-to mpvnet move-window center #menu: View > Move > Center
F8 script-message-to mpvnet show-playlist #menu: View > Show Playlist
Ctrl+p script-message-to mpvnet select-profile #menu: View > Show Profile Selection
Ctrl+P script-message-to mpvnet show-profiles #menu: View > Show Profiles
@@ -125,10 +133,9 @@ b cycle border #menu: View > Toggle Borde
Ctrl+t cycle ontop #menu: View > Toggle On Top
t script-binding stats/display-stats-toggle #menu: View > Toggle Statistics
Del script-binding osc/visibility #menu: View > Toggle OSC Visibility
i script-message-to mpvnet show-info #menu: View > Show File/Stream Info
i script-message-to mpvnet show-info #menu: View > Show Media Info
Ctrl+m script-message-to mpvnet show-media-info #menu: View > Show Media Info Advanced
p show-progress #menu: View > Show Progress
F9 script-message-to mpvnet show-media-info osd #menu: View > Show Tracks
Ctrl+m script-message-to mpvnet show-media-info #menu: View > Show Media Info
Alt+r script-message-to mpvnet show-recent #menu: View > Show Recent
` script-binding console/enable #menu: View > Advanced > Show Console
@@ -157,12 +164,13 @@ L cycle-values loop-file inf no #menu: Tools > Toggle infi
_ playlist-shuffle #menu: Tools > Shuffle Playlist
Ctrl+h cycle-values hwdec auto no #menu: Tools > Toggle Hardware Decoding
Q quit-watch-later #menu: Tools > Exit Watch Later
e run powershell -command "explorer.exe '/select,' ( \"${path}\" -replace '/', '\\' )" #menu: Tools > Show current file in File Explorer
_ script-message-to mpvnet shell-execute https://mpv.io #menu: Help > Website mpv
_ script-message-to mpvnet shell-execute https://github.com/stax76/mpv.net #menu: Help > Website mpv.net
_ script-message-to mpvnet shell-execute https://github.com/mpvnet-player/mpv.net #menu: Help > Website mpv.net
_ ignore #menu: Help > -
_ script-message-to mpvnet shell-execute https://mpv.io/manual/stable/ #menu: Help > Manual mpv
_ script-message-to mpvnet shell-execute https://github.com/stax76/mpv.net/blob/master/docs/Manual.md #menu: Help > Manual mpv.net
_ script-message-to mpvnet shell-execute https://github.com/mpvnet-player/mpv.net/blob/master/docs/Manual.md #menu: Help > Manual mpv.net
_ ignore #menu: Help > -
_ script-message-to mpvnet show-about #menu: Help > About mpv.net
@@ -179,8 +187,8 @@ Sharp script-message-to mpvnet cycle-audio
Ctrl+F11 script-message-to mpvnet playlist-add -10
Ctrl+F12 script-message-to mpvnet playlist-add 10
Alt+q script-message-to mpvnet quick-bookmark
8 cycle sub
j cycle sub
8 script-message-to mpvnet cycle-subtitles
j script-message-to mpvnet cycle-subtitles
q quit
Power quit
Play cycle pause

View File

@@ -17,7 +17,7 @@ namespace mpvnet
{
public partial class ConfWindow : Window
{
List<SettingBase> SettingsDefinitions = Conf.LoadConf(Properties.Resources.editor_conf);
List<SettingBase> SettingsDefinitions = Conf.LoadConf(Properties.Resources.editor_conf.TrimEnd());
List<ConfItem> ConfItems = new List<ConfItem>();
public ObservableCollection<string> FilterStrings { get; } = new ObservableCollection<string>();
string InitialContent;

View File

@@ -1,7 +1,6 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.Linq;
@@ -47,6 +46,7 @@ namespace mpvnet
Instance = this;
Core.FileLoaded += Core_FileLoaded;
Core.MoveWindow += Core_MoveWindow;
Core.Pause += Core_Pause;
Core.PlaylistPosChanged += Core_PlaylistPosChanged;
Core.ScaleWindow += Core_ScaleWindow;
@@ -118,7 +118,35 @@ namespace mpvnet
}
}
private void Core_PlaylistPosChanged(int pos)
void Core_MoveWindow(string direction)
{
BeginInvoke(new Action(() => {
Screen screen = Screen.FromControl(this);
Rectangle workingArea = GetWorkingArea(Handle, screen.WorkingArea);
switch (direction)
{
case "left":
Left = workingArea.Left;
break;
case "top":
Top = 0;
break;
case "right":
Left = workingArea.Width - Width + workingArea.Left;
break;
case "bottom":
Top = workingArea.Height - Height;
break;
case "center":
Left = (screen.Bounds.Width - Width) / 2;
Top = (screen.Bounds.Height - Height) / 2;
break;
}
}));
}
void Core_PlaylistPosChanged(int pos)
{
if (pos == -1)
SetTitle();
@@ -226,7 +254,7 @@ namespace mpvnet
Point pos = PointToClient(MousePosition);
float top = 0;
if (FormBorderStyle == FormBorderStyle.None)
if (!Core.Border)
top = ClientSize.Height * 0.1f;
return pos.Y > ClientSize.Height * 0.78 || pos.Y < top;
@@ -747,8 +775,7 @@ namespace mpvnet
string path = Core.GetPropertyString("path");
if ((path.Contains(":/") && !path.Contains("://")) || (path.Contains(":\\") && path.Contains("/")))
path = path.Replace("/", "\\");
path = Core.ConvertFilePath(path);
if (path.Contains("://"))
{
@@ -781,7 +808,7 @@ namespace mpvnet
string text = Core.Expand(title);
if (text == "(unavailable)")
if (text == "(unavailable)" || Core.PlaylistPos == -1)
text = "mpv.net";
Text = text;
@@ -860,6 +887,7 @@ namespace mpvnet
case 0x20b: // WM_XBUTTONDOWN
case 0x20c: // WM_XBUTTONUP
case 0x20e: // WM_MOUSEHWHEEL
case 0x2a3: // WM_MOUSELEAVE
if (mpvWindowHandle == IntPtr.Zero)
mpvWindowHandle = FindWindowEx(Handle, IntPtr.Zero, "mpv", null);
@@ -894,10 +922,6 @@ namespace mpvnet
if (CursorHelp.IsPosDifferent(LastCursorPosition))
CursorHelp.Show();
break;
case 0x2a3: // WM_MOUSELEAVE
//osc won't auto hide after mouse left window in borderless mode
Core.Command($"mouse {ClientSize.Width / 2} {ClientSize.Height / 3}");
break;
case 0x203: // WM_LBUTTONDBLCLK
{
Point pos = PointToClient(Cursor.Position);
@@ -1035,8 +1059,9 @@ namespace mpvnet
LastCursorPosition = MousePosition;
LastCursorChanged = Environment.TickCount;
}
else if (Environment.TickCount - LastCursorChanged > 1500 &&
!IsMouseInOSC() && ClientRectangle.Contains(PointToClient(MousePosition)) &&
else if (((Environment.TickCount - LastCursorChanged > 1500 &&
!IsMouseInOSC()) || Environment.TickCount - LastCursorChanged > 5000) &&
ClientRectangle.Contains(PointToClient(MousePosition)) &&
ActiveForm == this && !ContextMenu.IsVisible && !IsCommandPaletteVissible())
CursorHelp.Hide();
@@ -1210,6 +1235,8 @@ namespace mpvnet
if (!Core.ShutdownAutoResetEvent.WaitOne(10000))
Msg.ShowError("Shutdown thread failed to complete within 10 seconds.");
Core.Destroy();
}
protected override void OnMouseDown(MouseEventArgs e)

View File

@@ -69,6 +69,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />