mpv-osc-tethys
mpv-osc-tethys copied to clipboard
Request: Thumbfast support
When using the new thumbnail script, thumbfast.lua it didn't generate any thumbnails, I figured it may be because this script uses mpv_thumbnail_script. I was wondering if it would be possible to either replace mpv_thumbnail_script or add support to thumbfast.lua.
- osc.lua: https://github.com/po5/thumbfast/commit/d72b88c831abf2802d27fd0f7291bb604cedf23a
- progressbar: https://github.com/po5/thumbfast/commit/13084536fc45f5d111d55b79af9a7f76b34b01cc
- uosc: https://github.com/tomasklaen/uosc/pull/213
Hmm, so it spawns a mpv background process with an open pipe. When you need the thumbnail, it will send a seek command to the pipe which draws the thumbnail to file. Neat.
if os_name == "Windows" then
seek_command = {"cmd", "/c", "echo "..command.." > \\\\.\\pipe\\" .. options.socket}
elseif os_name == "Mac" then
-- this doesn't work, on my system. not sure why.
seek_command = {"/usr/bin/env", "sh", "-c", "echo '"..command.."' | nc -w0 -U " .. options.socket}
else
seek_command = {"/usr/bin/env", "sh", "-c", "echo '" .. command .. "' | socat - " .. options.socket}
I have nc in OpenSUSE Tumbleweed, but don't have socat apparently. I'll give it a try sometime.
Thank you for looking into it!