Mpv: [Feature Request] Play from clipboard

Created on 27 Dec 2018  ·  4Comments  ·  Source: mpv-player/mpv

It would be nice to have an option to play a video/URL which is in clipboard — this would allow making a keybinding/shortcut which would make 'play in MPV' one-click option. See below:

Current workflow

  1. Find video
  2. Copy URL address
  3. Open terminal
  4. Type mpv "
  5. Paste address
  6. Type "
  7. When finished, close terminal

Proposed workflow

  1. Find video
  2. Copy URL address
  3. Press a key combination of your choice, which would call mpv --from-clipboard and play the video

New feature

Flag --from-clipboard should be added, which would basically append "<clipboard content>".

If such behaviour is already possible, please let me know because I couldn't find it in the mpv manual.

Most helpful comment

There's existing script for this: https://github.com/jonniek/mpv-scripts/raw/master/appendURL.lua (win/linux/mac)

Just changed last line to mp.add_key_binding("ctrl+v", "appendURL", append)

All 4 comments

How about using mpv $(xclip -o).

Or if you don't have xclip but xsel installed, you can do mpv $(xsel -bo).

What I think might be useful thought is a play from clipboard keybinding for the pseudo-gui, mostly on Windows, since drag-and-dropping URLs can be a bit awkward for those people.

Thank you @j605 and @CounterPillow! Your suggestions work like charm!

I'll leave this open for now, but if somebody wants to close it, be my guest.

There's existing script for this: https://github.com/jonniek/mpv-scripts/raw/master/appendURL.lua (win/linux/mac)

Just changed last line to mp.add_key_binding("ctrl+v", "appendURL", append)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yuvadm picture yuvadm  ·  3Comments

fitipe picture fitipe  ·  3Comments

sant527 picture sant527  ·  4Comments

SPDurkee picture SPDurkee  ·  3Comments

422658476 picture 422658476  ·  3Comments