Comments (20)
Yes
from thumbfast.
Does the script work fine after running that command?
I guess we just have to make more of an effort to find the actual path to the mpv executable.
This is also an issue on Windows for users that haven't added mpv to path.
from thumbfast.
This is also an issue on Windows for users that haven't added mpv to path.
No, as a windows portable mpv user, I can confirm that the script works well even though out of PATH.
from thumbfast.
It is, for those who don't have it in path and are launching mpv from outside its own directory.
eko: Does replacing "mpv"
with "/Applications/mpv.app/Contents/MacOS/mpv"
on this line also work?
Line 293 in 14b6a1e
Will try to add auto detection of the currently running executable path for a not-too-messy solution.
from thumbfast.
eko: Does replacing "mpv" with "/Applications/mpv.app/Contents/MacOS/mpv" on this line also work?
hooke007/MPV_lazy#186 (comment)
We actually tested before and it worked.
The only problem is the bundle app can be placed anywhere, we didn't find the solution to check it.
from thumbfast.
The docs mention ~~osxbundle/
for Mac and ~~exe_dir/
for Windows.
from thumbfast.
see mpv-player/mpv#10009 ~~exe_dir/
couldn't work for me.
Another info we noticed in that thread is the old thumbnailer(worker) doesn't have this issue(Mac).
from thumbfast.
Another info we noticed in that thread is the old thumbnailer(worker) doesn't have this issue.
At first glance this uses the exec_path
variable which is user-defined, with a default value of
((os.getenv('PWD') or mp.get_property('working-directory')) .. ':' .. os.getenv('PATH'))
I've used functionally similar code before, but I don't know if that's enough to find the mpv path on Mac.
from thumbfast.
We already have the PID. There has got to be a way of getting the path from the pid on every OS. On linux readlink /proc/<pid>/exe
gives you the executable path, but no idea how to do it on mac or windows.
from thumbfast.
on my arch system:
$ ps -o comm= -p PIDHERE
mpv
$ which mpv
/usr/bin/mpv
Is that enough on Mac?
stackoverflow says this could work:
realpath /proc/PIDHERE/exe
from thumbfast.
ln -s /Applications/mpv.app/Contents/MacOS/mpv /usr/local/bin
Yes, after running this command it works well on my Mac.
from thumbfast.
Can you install thumbfast from the mac-test
branch (https://github.com/po5/thumbfast/blob/mac-test/thumbfast.lua), and try the following:
Open a file in mpv through the terminal, hover on the timeline once.
Copy the PID displayed in terminal.
Open a second terminal, don't close mpv.
Run realpath /proc/PID_HERE/exe
(replace PID_HERE)
Run ps -o comm= -p PID_HERE
(replace PID_HERE)
Run which RESULT_OF_PREVIOUS_COMMAND
(replace RESULT_OF_PREVIOUS_COMMAND with result of ps
command above)
Post the output of the 3 commands you ran.
Hopefully that will get us the path to mpv, wherever it happens to be installed, on a Mac system.
from thumbfast.
/Applications/mpv.app/Contents/MacOS/mpv /Volumes/USB/Downloads/星际穿越.mkv
Cannot find main.* for any supported scripting backend in: /Users/huangjiajia/.config/mpv/scripts
[thumbfast] script-opts/thumbfast.conf:8 unknown key 'tnpath', ignoring
[thumbfast] script-opts/thumbfast.conf:29 unknown key 'min_duration', ignoring
[thumbfast] script-opts/thumbfast.conf:31 unknown key 'precise', ignoring
[thumbfast] script-opts/thumbfast.conf:33 unknown key 'frequency', ignoring
[uosc] script-opts/uosc.conf:126 unknown key 'font_height_to_letter_width_ratio', ignoring
[thumbfast] PID 6850
Open second terminal:
huangjiajia@huangjiajiadeMacBook-Pro ~ % realpath /proc/6850/exe
realpath: /proc/6850/exe: No such file or directory
huangjiajia@huangjiajiadeMacBook-Pro ~ % ps -o comm= -p 6850
/Applications/mpv.app/Contents/MacOS/mpv
huangjiajia@huangjiajiadeMacBook-Pro ~ % which /Applications/mpv.app/Contents/MacOS/mpv
/Applications/mpv.app/Contents/MacOS/mpv
from thumbfast.
What about the ps+which commands (:
from thumbfast.
I reedited, please take a look.
from thumbfast.
Seems like ps -o comm= -p PID_HERE
would do the trick! Thanks for helping out.
from thumbfast.
Does the script work out of the box on the latest commit?
from thumbfast.
Weird thing, when hovering on the timeline, there's one more mpv icon popped up on dock, like this:
from thumbfast.
Weird thing, when hovering on the timeline, there's one more mpv icon popped up on dock, like this:
Is there a solution to this?
Whenever thumbnails get generated playing any video in MacOS, I get 2 more MPV icons in dock.
Kinda irritating.
from thumbfast.
Another info we noticed in that thread is the old thumbnailer(worker) doesn't have this issue(Mac).
I've been able to set up a Mac VM and try this out. It doesn't even work out of the box, and the reason it doesn't generate extra icons is because it uses ffmpeg by default?
I'll commit a solution that properly picks up on the symlink if the user made it.
from thumbfast.
Related Issues (20)
- Syncplay bug HOT 3
- Disable thumbfast for images
- Support to pause video when show thumbnails
- no thumbnail on youtube stream HOT 2
- osc.lua often does not appear. HOT 7
- Offset thumbnail decorations with MPV-EASY HOT 9
- Add a command to manually toggle thumbnail generation
- Request patch for this OSC HOT 3
- Thumbnails have wrong colors for Dolby Vision files HOT 19
- [Feature Request] thumbnails while streaming youtube videos HOT 3
- Thumbnails grid as a preview of the whole video HOT 2
- Thumbnail show a still picture, it does not change when I move the mouse over the seekbar HOT 7
- Is this script no longer being maintained? HOT 6
- To many events queued HOT 15
- Thumbnail gets separated from background and stays visible HOT 2
- Adding a license HOT 19
- Different height and width in windowed? HOT 2
- Script plays on audio playback when audio=no
- Timing information HOT 3
- How to change the interval between thumbnails? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thumbfast.