Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard capture doesn't work #86

Open
dzanellato opened this issue Dec 11, 2022 · 8 comments
Open

Clipboard capture doesn't work #86

dzanellato opened this issue Dec 11, 2022 · 8 comments

Comments

@dzanellato
Copy link

  1. OS name: Linux Mint
  2. OS version: 21
  3. mpv version: 0.35.0

Describe the bug
clipboard capture doesn't work (I used a str file subtitle and mkv embedded subtitles)

To Reproduce
turn on autocopy or press Ctrl+c

Expected behavior
subtitle line is copied to clipboard

@tatsumoto-ren
Copy link
Member

tatsumoto-ren commented Dec 11, 2022

It works for me so it's hard to tell why it's not working for you. Clipboard autocopy relies on xclip (wl-copy on wayland). Maybe you don't have that installed.

@kooped
Copy link

kooped commented Jan 16, 2023

I am having the same problem with the clipboard too

OS: Ubuntu 22.04.1 LTS
MPV: 0.35.0

I have found a work around for now by hard coding the xclip string in platform/nix.lua

local handle = io.popen('xclip -i -selection clipboard', 'w')

Is there a way to debug? I can provide you what the clip variable holds if needed

@tatsumoto-ren
Copy link
Member

Here clip gets set to the same value you have posted. Does it get set to something else for you? You can call print(clip) in the code to confirm.

@kooped
Copy link

kooped commented Jan 17, 2023

Thanks for the information. I was getting wl-clip. It turns out that on Ubuntu you will need to install the wl-clipboard package to get wl-clip when running Wayland. I wonder if it is worth updating the readme with this

https://askubuntu.com/questions/1370796/pass-is-missing-wl-copy-after-upgrade-to-21-10

@tatsumoto-ren
Copy link
Member

tatsumoto-ren commented Jan 17, 2023

If you're running wayland instead of Xorg, wl-clip (wl-clipboard) is a requirement. We have already listed it here, but I agree that the instructions could be more verbose.

However, if you're running Xorg, but mpvacious still thinks you're running Wayland, then you must have the WAYLAND_DISPLAY env var set. Normally it shouldn't be set in Xorg environments. If that's the case, we should find a more reliable way to detect Wayland.

@dzanellato
Copy link
Author

Hello guys. Sorry about the late answer.

I can copy subtitles to the clipboard only if I use an external one.
For instance, I can't copy the embedded subtitles of an mkv file to the clipboard. Also, the embedded subtitles of an mkv file only show when the cursor mouse hovers over the top of the mpv's window.

Is this behavior expected?

@tatsumoto-ren
Copy link
Member

the embedded subtitles of an mkv file only show when the cursor mouse hovers over the top of the mpv's window.

This is the default behavior for secondary subtitles. You can change it in settings.

I can't copy the embedded subtitles

Maybe the track is sub/sup instead of srt or ass.

@dzanellato
Copy link
Author

Thank you very much for your help.
mpvacious is amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants