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 · 16 comments
Open

Clipboard capture doesn't work #86

dzanellato opened this issue Dec 11, 2022 · 16 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.

@ZiVan21Ft
Copy link

ZiVan21Ft commented Jun 20, 2024

In windows 10 not work clipboard.i test press c then ctrl + v text not appear.

@tatsumoto-ren
Copy link
Member

related: #123 and #125

@ZiVan21Ft
Copy link

I updated mpvacious but not work clipboard but when I press c on the mpv player appear text but not work on outer environment of mpv player.i used clipboard Inserter and texthooker page but there no text output.

@tatsumoto-ren
Copy link
Member

@ZiVan21Ft instead of the system clipboard it is recommended to send subtitle lines directly to GoldenDict using this guide.

Hopefully the issue with the clipboard will be resolved in the future though.

@ZiVan21Ft
Copy link

ZiVan21Ft commented Jun 20, 2024

@ZiVan21Ft instead of the system clipboard it is recommended to send subtitle lines directly to GoldenDict using this guide.

Hopefully the issue with the clipboard will be resolved in the future though.

I downloaded Luaforwindows then updated powershell 7.X next I removed entire folder of mpvacious in the next step I move older's script of subs2srs.lua to /scripts
Thanks! It's worked to me

@tatsumoto-ren
Copy link
Member

Maybe powershell needs to be updated for the clipboard to work then. Several people have reported that the clipboard doesn't work with powershell.

@borbrudar
Copy link

borbrudar commented Nov 2, 2024

Doesn't seem to work for me on Wayland (Arch), more precisely it works if I Ctrl+C but not otherwise. autoclip is set to yes and autoclip_method is set to clipboard,track is .srt and I have installed wl-clipboard, so it should be working...Is there perhaps a fix or a workaround?

EDIT: works, seems I made a mistake in the path when creating the config file so mpvacious wasn't picking it up. Thanks for the awesome program!

@tatsumoto-ren
Copy link
Member

In v0.37 the config file gets created automatically if it doesn't exist.

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

5 participants