marzzzello / mpv_thumbnail_script

A Lua script to show preview thumbnails in mpv's OSC seekbar, sans external dependencies (fork)
GNU General Public License v3.0
278 stars 20 forks source link

Failed #16

Closed george-emerald closed 2 years ago

george-emerald commented 2 years ago

It failed to generate the thumbnails and says that the output file is missing. How do I fix this?

marzzzello commented 2 years ago

Please use the issue template

C0D3D3V commented 2 years ago

Please send the console output of mpv --msg-level=all=debug YOUR_VIDEO.mp4

george-emerald commented 2 years ago

I didn't see any template.

How do I send that? I told you the error it's giving me is that the output file is missing in the console (~) though.

C0D3D3V commented 2 years ago

Indeed @marzzzello there are no templates xD

@george-emerald run the command in the terminal mpv --msg-level=all=debug YOUR_VIDEO.mp4 then copy all the output here and add this: ``` above and bellow the copy pasted terminal output

Replace YOUR_VIDEO.mp4 with the path to your video that fails

george-emerald commented 2 years ago

Don't I have to add mpv to my path to call it in the terminal? Do you know how I do that on Mac OS?

C0D3D3V commented 2 years ago

I would think mpv is already in your path, depending on how you installed it.

But I found this https://github.com/mpv-player/mpv/issues/572#issuecomment-35679696

george-emerald commented 2 years ago

It says no such file, even though I moved it to the corresponding folder.

C0D3D3V commented 2 years ago

You can view the contents of a application bundle by a ctrl-click (right-click) on the application and select "Show Package Contents", then navigate to the Contents > MacOS folder where the applications executable is.

Send next time the commands you have tested out, how else should we know what you have done? What have you tried? Test: /Applications/mpv.app/Contents/MacOS/mpv --msg-level=all=debug YOUR_VIDEO.mp4 and send a screenshot of it

george-emerald commented 2 years ago

It says no matches found Screenshot 2022-05-14 at 16 02 36 .

C0D3D3V commented 2 years ago

run this as administrator: ln -s "/Applications/mpv.app/Contents/MacOS/mpv" ~/bin/mpv or change this line: https://github.com/marzzzello/mpv_thumbnail_script/blob/ee487f1c6b5b3813305fe3db3167714cd8068f40/src/thumbnailer_server.lua#L30 to "/Applications/mpv.app/Contents/MacOS/mpv",

george-emerald commented 2 years ago

Running that command in terminal produces a file not found error. Reminder that I'm running Mac OS.

I can't find that line in my mpv server lua. It's different than what's displayed there.

C0D3D3V commented 2 years ago

then open a issue on mpv github and ask how to add mpv to your path on MacOS

george-emerald commented 2 years ago

What about my second response? Why can't I find the line on my server lua?

C0D3D3V commented 2 years ago

it is line number 493 in the latest release... But if you can not run /Applications/mpv.app/Contents/MacOS/mpv it will not help

george-emerald commented 2 years ago

Why was this closed? It's not resolved.

C0D3D3V commented 2 years ago

Have you opened an issue on the mpv repo?

george-emerald commented 2 years ago

No, but what does that have to do with this being closed when it's not resolved?

marzzzello commented 2 years ago

We can't help you without the debug log. I'm not using macOS so I don't know how to start mpv from terminal there. Maybe you find sth in the mpv docs or on Google. Other things we need to know: How did you install mpv? What version of mpv and mpv_thumbnail_script are you using?

george-emerald commented 2 years ago

I installed mpv through the official build for Mac OS listed in mpv.io. I'm using the latest version of both mpv and your script. And can't you do something using the regular mpv log?

marzzzello commented 2 years ago

It looks like mpv is not in your PATH. The script calls mpv to generate thumbnails. Make sure that you can call mpv in a terminal. As /bin is usually always in your PATH you can also create a symlink to /bin/mpv like this: ln -s /path/to/mpv /bin/mpv I don't know where mpv installed itself to maybe something like /Applications/mpv.app/Contents/MacOS/mpv

george-emerald commented 2 years ago

I have added that exact path to my paths using terminal but I still can't call it. Screenshot 2022-09-01 at 23 30 09

george-emerald commented 2 years ago

I acutally succeeded in adding it to path let's see if it works now.

george-emerald commented 2 years ago

It doesn't work, but now I can sent you the output of the command you requested: https://pastebin.com/raw/ap6fZnzi

marzzzello commented 2 years ago

Looks like the thumbnails are generated. Have you set osc=no in mpv.conf? And can you remove the sub_select and autoload script for testing?

george-emerald commented 2 years ago

Yes I have set osc=no. So this is what happens, if I call it and run the debug command like you instructed, it opens the file and generates the thumbnails normally. But if I just open up a video, it fails.

marzzzello commented 2 years ago

If you call it from the command line the PATH is correct but if you call from other apps then the PATH is not correct. How did you set the PATH? Is it system wide? Did you reboot afterwards?

george-emerald commented 2 years ago

I set the path by running sudo nano /etc/paths/, inputting my password and adding this path to my paths /Applications/mpv.app/Contents/MacOS.

george-emerald commented 2 years ago

If I call mpv with a file it opens it up and generates thumbnails like normal. But if try to just open a file, it fails.

marzzzello commented 2 years ago

Did you reboot? Or relogin

george-emerald commented 2 years ago

I rebooted but I've made some changes. I'll reboot again and get back to you.

george-emerald commented 2 years ago

OK, so I rebooted again and the behaviour is the same: if I call mpv on the terminal with a file it generates, but if I just open a file it fails.

marzzzello commented 2 years ago

I have added that exact path to my paths using terminal but I still can't call it. Screenshot 2022-09-01 at 23 30 09

I just see that the path you used ends with /mpv is that a directory or the mpv binary? You need to use the path to the directory where the binary is inside If that doesn't work then you can try to symlink mpv to /bin/mpv or /usr/local/bin/mpv

george-emerald commented 2 years ago

I fixed it by editing the line in the server script where it calls mpv to the directory where the mpv executable is.

marzzzello commented 2 years ago

That's also a way to do it