Pasting URL into mpv window causes mpv to close with no error message
mpv Information
mpv v0.40.0-dirty Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Jul 29 2025 22:35:55
libplacebo version: v7.351.0
FFmpeg version: n7.1.1
FFmpeg library versions:
libavcodec 61.19.101
libavdevice 61.3.100
libavfilter 10.4.100
libavformat 61.7.100
libavutil 59.39.100
libswresample 5.3.100
libswscale 8.3.100
Other Information
- Linux version: Manjaro Linux
- Kernel Version: 6.12.48-1-MANJARO
- GPU Model: AMD RX 570
- Mesa/GPU Driver Version: Mesa 25.2.3-arch1.2
- Window Manager and Version: IceWM 3.9.0
- Source of mpv: Manjaro package repositories
- Latest known working version: N/A
- Issue started after the following happened: N/A
Reproduction Steps
- Open mpv with a GUI (either via the .desktop file or with
mpv --player-operation-mode=pseudo-gui) - Copy any text
- Press
Ctrl+Vwhile the mpv window is focused - mpv closes
Expected Behavior
The pasted text should be handled correctly, either playing the content as expected or displaying some user-readable error message conveying what went wrong.
Actual Behavior
Attempting to paste a URL (or any text) into an mpv GUI window results in the text + (unavailable) being displayed in the top left corner of the window for a single frame before closing with no outputted error message and an exit code of 2.
Log File
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
- [x] I tested with the latest mpv version to validate that the issue is not already fixed.
- [x] I provided all required information including system and mpv version.
- [x] I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - [x] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- [x] I attached the full, untruncated log file.
- [x] I attached the backtrace in the case of a crash.
I tested this with both the latest mpv package from the Manjaro package repos and the mpv-git AUR package. Both exhibited the same issue.
--idle keeps mpv open.
Clipboard handling is not (yet) supported on X11, so this won't work on your setup. I agree mpv shouldn't quit without explanation however.
If you don't use the --input-commands option, you can use it to call different commands depending on the existence or value of properties, without using scripts. Add the following to input.conf:
Ctrl+v no-osd set input-commands '${?clipboard/text:loadfile $${clipboard/text$} append-play; show-text "+ $${clipboard/text$}"}${!clipboard/text:show-text "Failed to get clipboard text."}'; no-osd change-list input-commands clr ignore
This achieves the expected behavior to play link in clipboard, or show an error message when it is not available.
Side note: with some tricks you can achieve looping with --input-commands with stopping condition based on the existence or value of properties by changing the value of input-commands in one of the commands called. I think this makes the input.conf and --input-commands combination Turing complete in theory. For example, the following decreses volume in step of 1 in a loop until it reaches 0, printing the volume after each step:
no-osd set input-commands 'add volume -1,print-text $${volume$},no-osd change-list input-commands $${!volume==0:append$}$${?volume==0:clr$} ignore'
I think one issue is availability of the clipboard text, but even when text is available, loading invalid string will also kill mpv without any feedback to user what has happened. Or when ytdl hook fails or whatever else.