Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_mpv - Video Player component based on mpv (Read 36255 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: foo_mpv - Video Player component based on mpv

Reply #75
Hi.  I have just one more item on my wish list, and then I'll stop bugging you.  How hard would it be to have the cursor disappear after about a second, except when directly over the OSC, like MPV does?  OK, I'm done.  Thanks again.

Re: foo_mpv - Video Player component based on mpv

Reply #76
Hi.  I have just one more item on my wish list, and then I'll stop bugging you.  How hard would it be to have the cursor disappear after about a second, except when directly over the OSC, like MPV does?  OK, I'm done.  Thanks again.

Oh yes, I do mean to add that still

Re: foo_mpv - Video Player component based on mpv

Reply #77
New release

Mouse wheel input is now passed through to mpv, and the volume control is added back. You can also set bindings for the mouse wheel in the input.conf file (<profile_folder>/mpv/input.conf), see the manual for reference. Note that most playback commands are different, as they have to be passed to foobar as script-messages instead of controling mpv directly. The commands you can use are:

foobar-pause
foobar-prev
foobar-next
foobar-volup
foobar-voldown
foobar-seekback
foobar-seekforward

For example I have set in input.conf:

Code: [Select]
WHEEL_UP script-message foobar-seekback
WHEEL_DOWN script-message foobar-seekforward

You can also create any configuration profile and it will be visible in the video context menu to apply at runtime. See the manual for more info. Profiles are only applied when selected, never restored (as in "profile-restore" option). You could use this to rotate videos, change aspect ratios, etc.

For example in mpv/mpv.conf:

Code: [Select]
[test profile 1]
hue=-50

[test profile 2]
hue=50

[reset]
hue=0

Note that you can also set most OSC options the standard way, which is to create a file "mpv/script-opts/osc.conf" containing options, explained here. In particular the 'box' OSC style might be better for touch screens, eg. in osc.conf add:

Code: [Select]
layout=box

Re: foo_mpv - Video Player component based on mpv

Reply #78
Your latest version works great.  And with the information you provided I was able to make some minor adjustments to suit my own personal tastes.  I can now adjust the volume from anywhere on the screen, not just with the OSC volume control.  I also changed the dead zone so the OSC doesn't pop up until I'm directly over it and changed the seek bar style to bar instead of diamond.  Since I only play local files, I can now get rid of the youtube component altogether.  Thank you so much.

Re: foo_mpv - Video Player component based on mpv

Reply #79
New release

Mouse wheel input is now passed through to mpv, and the volume control is added back. You can also set bindings for the mouse wheel in the input.conf file (<profile_folder>/mpv/input.conf), see the manual for reference. Note that most playback commands are different, as they have to be passed to foobar as script-messages instead of controling mpv directly. The commands you can use are:

foobar-pause
foobar-prev
foobar-next
foobar-volup
foobar-voldown
foobar-seekback
foobar-seekforward

For example I have set in input.conf:

Code: [Select]
WHEEL_UP script-message foobar-seekback
WHEEL_DOWN script-message foobar-seekforward

You can also create any configuration profile and it will be visible in the video context menu to apply at runtime. See the manual for more info. Profiles are only applied when selected, never restored (as in "profile-restore" option). You could use this to rotate videos, change aspect ratios, etc.

For example in mpv/mpv.conf:

Code: [Select]
[test profile 1]
hue=-50

[test profile 2]
hue=50

[reset]
hue=0

Note that you can also set most OSC options the standard way, which is to create a file "mpv/script-opts/osc.conf" containing options, explained here. In particular the 'box' OSC style might be better for touch screens, eg. in osc.conf add:

Code: [Select]
layout=box

How do I send video to external screen, preferably with a hotkwy? Thank you

Re: foo_mpv - Video Player component based on mpv

Reply #80
How do I send video to external screen, preferably with a hotkwy? Thank you

Hi, at the moment it is not possible due to oversight on my part. You can open the popup and maximise it on the external screen to show the video there, but the fullscreen mode will always appear on the main monitor. It will be fixed in the next version. I can also add a menu item so you can assign a hotkey for opening fullscreen there directly.

Re: foo_mpv - Video Player component based on mpv

Reply #81
How do I send video to external screen, preferably with a hotkwy? Thank you

Hi, at the moment it is not possible due to oversight on my part. You can open the popup and maximise it on the external screen to show the video there, but the fullscreen mode will always appear on the main monitor. It will be fixed in the next version. I can also add a menu item so you can assign a hotkey for opening fullscreen there directly.

Thank you. This is a most useful plugin.

Re: foo_mpv - Video Player component based on mpv

Reply #82
Regarding some bug report I can see on the Russian forum:

The album art view should follow the logic of the option in Preferences->Display->Selection viewers. If this is set to 'prefer currently playing track', the artwork should show the now playing track. It work this way in ColumnsUI too, so it might not match the ColumnsUI artwork panel, as that has its own logic that I haven't copied. If foo_mpv behaves differently to the Default UI artwork panel, that is a bug.



If the player seems to stop working, could you enable the option Advanced Preferences->Playback->mpv->Enable verbose console logging. Then reproduce the issue again, and copy the Console output.

Regarding slow loading of thumbnails in other album art viewers: it shouldn't freeze the UI. I think every part of the loading and decoding should be abortable in the latest version. However, if the album art viewer doesn't load the artwork asynchronously, it could freeze the UI as the thumbnailer is inherently slower that loading most other types of artwork. In particular, in the DarkOne theme, the artwork panel uses the WSH Panel function GetAlbumArtV2 to load the artwork which I think is blocking. In the spider monkey panel documentation it recommends using the async version of this function instead. So, I think it is the artwork panel's responsibility not to freeze the UI when loading a thumbnail. I am guessing that might be the issue. That artwork script could be updated to hopefully fix it.


Re: foo_mpv - Video Player component based on mpv

Reply #83
I'm trying to assign the wheel double click to work as a modifier for the next item but I can't find the appropriate key.

My input.conf has

WHEEL_UP script-message foobar-seekback
WHEEL_DOWN script-message foobar-seekforward
MOUSE_BTN0_DBL script-message foobar-next

but I have tried various numbers on the last command with no success

Re: foo_mpv - Video Player component based on mpv

Reply #84
I think middle mouse clicks aren't passed through. If you wait for the next version it handles input a bit differently and everything should work, it will be ready in a day or two.

Re: foo_mpv - Video Player component based on mpv

Reply #85
I think middle mouse clicks aren't passed through. If you wait for the next version it handles input a bit differently and everything should work, it will be ready in a day or two.

Here's hoping "Send Video To External Monitor" will make it!

Re: foo_mpv - Video Player component based on mpv

Reply #86
New release

- foo_acfu integration for update checking https://acfu.3dyd.com/
- Add option to control which files are played using a search query. By default, only files foobar identifies as having a video stream will be played. You could change the query or disable this if you are using some input component which does not provide $info(video_codec). This should improve the responsiveness of the artwork display as it will not try to load every file as a video before falling back to artwork.
- Option to disable/enable the video from the main menu. Instead of using this for automating enabling/disabling the video, if possible it would be better to use the above mentioned query feature as it will always apply before an attempt is made to load the video, whereas an external script may be applied afterwards.
- Add ability to restart mpv to reload configuration from the UI, to toggle fullscreen or open fullscreen on any particular monitor from the main menu (hold shift->View menu->mpv Commands).
- The fullscreen window will by default appear on the same monitor as the window it was created from.
- You can drag the mouse on the OSC seekbar like in standalone mpv, however seeking is heavier on the CPU and disk than with standalone mpv due to the nature of the plugin, so it might be laggy unless your PC and disk are fast.
- The popup uses foobar's icon.
- Some basic mpv options can be set from the preferences.
- Artwork mode updates if the artwork is updated (eg. choosing a new video thumbnail).
- Stub artwork is loaded if set
- You can edit mpv.conf and input.conf from the preferences, and default files will be created if none exist in the first instance.
- In panel mode, all mouse input is passed through to mpv and can be mapped in input.conf except right mouse button which is reserved for the context menu.
- In popup mode or fullscreen, keyboard input is also passed to mpv (except escape always exits fullscreen).
- Fix a bug when playing non-local files in foobar where the player would get stuck on "Preload" and not show artwork.
- Fixed issue where the displayed artwork wouldn't match the default UI art viewer.
- Network access is disabled in ffmpeg, maybe this will alleviate some hung threads or stuck artwork panels, though I couldn't reproduce this and I don't think it should be necessary. Feedback welcome. If 'stop playback when not visible' was causing problems, maybe try once more with this release.
- The OSC script will be loaded only if the file <mpv profile>/scripts/osc.lua doesn't exist. This allows you to customise the OSC while still using the preferences for it in foobar, such as enabling/disabling it per-UI-element.

- Syntax for script-messages has changed slightly, you will need to update input.conf. You can use the helpers for adding input commands in the preferences page, or reset input.conf to the default in the preferences to see some examples. You can map foobar menu or context menu commands (for the playing track) from input.conf allowing you to map any action from the player window.

- For more advanced scripting purposes, it is possible to register a titleformatting script by sending the script-message "foobar register-titleformat <script>". This title format will then be published whenever it changes for the currently displayed track via the script-message
"foobar titleformat <result>"

These two things can be used in lua scripts, eg. customising the OSC, to get information for display about the now playing track. As an example I have included a custom version of the OSC in the source tree that has a 'loved' heart button, that turns red when the current track has %loved%=1, and can be clicked to change the loved status by invoking a context menu command to run a Masstagger script, which updates the tag. To use it you would copy it to <foobar profile>/mpv/scripts/osc.lua

Please report any issues!

Re: foo_mpv - Video Player component based on mpv

Reply #87
I've been checking out your newest version and everything seems to be working great.  I was pleased to see you added options for everything I had in osc.conf and that the cursor is now hiding.  You've obviously put a great deal of effort into this.  Thank you very much.

Re: foo_mpv - Video Player component based on mpv

Reply #88
That's great. the latest version has added new features. Thank you very much for your dedication.

Re: foo_mpv - Video Player component based on mpv

Reply #89
something wrong when changing "Separate from main window" or "Always on-top" option with latest beta, I don't know how to explain but should be noticeable
my existing configuration files displayed in one line
 

Re: foo_mpv - Video Player component based on mpv

Reply #90
something wrong when changing "Separate from main window" or "Always on-top" option with latest beta, I don't know how to explain but should be noticeable
my existing configuration files displayed in one line

Hmm I don't notice anything different with the separate/always on top options, what's it doing that's strange?

And yes sorry, because I use the basic old edit box in the preferences it only recognises Windows-style line endings. You can fix manually once or if you have Notepad++ you can fix it here



Re: foo_mpv - Video Player component based on mpv

Reply #92
OK thanks, I can reproduce it, I will fix it today

Re: foo_mpv - Video Player component based on mpv

Reply #93
I'm not sure if I fixed it entirely, but please try the update



Re: foo_mpv - Video Player component based on mpv

Reply #96
I just realized there is nothing displayed on popup window title.

Re: foo_mpv - Video Player component based on mpv

Reply #97
- Add option to control which files are played using a search query. By default, only files foobar identifies as having a video stream will be played. You could change the query or disable this if you are using some input component which does not provide $info(video_codec). This should improve the responsiveness of the artwork display as it will not try to load every file as a video before falling back to artwork.
I have a video with the av1 codec, foobar plays it correctly if I uncheck the option but the plugin does not generate the thumbnail.
Thanks for your work !

Re: foo_mpv - Video Player component based on mpv

Reply #98
I see stats.lua can be activated on latest 0.6.4 beta by set keybinding manually on input.conf
for example
Code: [Select]
i script-binding stats/display-stats
I script-binding stats/display-stats-toggle
only popup window and fullscreen mode can accept keyboard input

Re: foo_mpv - Video Player component based on mpv

Reply #99
I have a video with the av1 codec, foobar plays it correctly if I uncheck the option but the plugin does not generate the thumbnail.
Thanks for your work !

Hi, you don't have to disable the option completely if you don't want. You can change it to include more files in the search query. For example include all files with an avi extension too:

Code: [Select]
"$info(video_codec)" PRESENT OR "$ext(%filename_ext%)" IS avi

or play files that you have manually tagged with an IS_VIDEO tag

Code: [Select]
"$info(video_codec)" PRESENT OR "%IS_VIDEO%" PRESENT

The thumbnail issue I can reproduce, it looks like ffmpeg doesn't find the right decoder.

I just realized there is nothing displayed on popup window title.

Noted, I broke it at some point.