You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most likely will work if it detects Mac OS but it's returning xclip which is Linux. This is on a Mac OS Monterey 12.6.8
2.890][v][cplayer] Starting screenshot: '/tmp/mpv-screenshot.jpeg'
[ 2.891][d][cplayer] Run command: script-binding, flags=73, args=[name="clipshot/clipshot-subs"]
[ 2.892][v][screenshot] using 2 threads for scaling
[ 2.915][v][screenshot] Using zimg.
[ 2.924][d][screenshot] mapped color params:
[ 2.924][d][screenshot] trc = iec61966-2-1
[ 2.924][d][screenshot] primaries = bt709
[ 2.924][d][screenshot] range = pc
[ 2.924][d][screenshot] colorspace = bt470bg
[ 2.924][d][screenshot] chroma_location = center
[ 2.945][i][cplayer] Screenshot: '/tmp/mpv-screenshot.jpeg'
[ 2.946][d][cplayer] Run command: run, flags=64, args=[command="xclip", args="-sel", args="c", args="-t", args="image/jpeg", args="-i", args="/tmp/mpv-screenshot.jpeg"]
If I manually do it it works just fine osascript -e 'set the clipboard to (read (POSIX file "/Users/username/Desktop/mpv-shot0001.jpg") as JPEG picture)'
I use this clipshot on Linux Mint and it works great.
Possible Fix
Not sure how to use SmartCopyPaste code to change it to get Wayland and not just Linux.
if not o.device or o.device == 'auto' then
if os.getenv('windir') ~= nil then
o.device = 'windows'
elseif os.execute '[ -d "/Applications" ]' == 0 and os.execute '[ -d "/Library" ]' == 0 or os.execute '[ -d "/Applications" ]' == true and os.execute '[ -d "/Library" ]' == true then
o.device = 'mac'
else
o.device = 'linux'
end
Some more detect OS code
-- this code was taken from mpv's console.lua:
-- https://github.com/mpv-player/mpv/blob/master/player/lua/console.lua
local function detect_platform()
local o = {}
-- Kind of a dumb way of detecting the platform but whatever
if mp.get_property_native('options/vo-mmcss-profile', o) ~= o then
return 'windows'
elseif mp.get_property_native('options/macos-force-dedicated-gpu', o) ~= o then
return 'macos'
elseif os.getenv('WAYLAND_DISPLAY') then
return 'wayland'
end
return 'x11'
end
No response
Operating System(s)
Windows
Linux
macOS
MPV version
0.36
Lua version
No response
The text was updated successfully, but these errors were encountered:
Script(s)
clipshot.lua
Description
Most likely will work if it detects Mac OS but it's returning xclip which is Linux. This is on a Mac OS Monterey 12.6.8
If I manually do it it works just fine
osascript -e 'set the clipboard to (read (POSIX file "/Users/username/Desktop/mpv-shot0001.jpg") as JPEG picture)'
osascript -e 'clipboard info'
JPEG picture, 32754, «class 8BPS», 884810, GIF picture, 124456, «class jp2 », 100608, TIFF picture, 2081938, «class PNGf», 220769, «class BMP », 2080134, «class TPIC», 712791
I use this clipshot on Linux Mint and it works great.
Possible Fix
Not sure how to use SmartCopyPaste code to change it to get Wayland and not just Linux.
Some more detect OS code
No response
Operating System(s)
MPV version
0.36
Lua version
No response
The text was updated successfully, but these errors were encountered: