-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Terminal input is ignored when playing stdin #4190
Comments
If you use stdin to stream data into mpv, you obviously cannot use stdin to send keyboard input to mpv at the same time. Either use the window, or have a look at the JSON IPC, if you need to read from stdin while also controlling the player somehow. |
FWIW, |
Or use a FIFO to pipe the steam to mpv as "file". |
The fact that mpv expects input from stdin instead of tty when being run from a terminal (what you seem to suggest is happening) is exactly the problem. |
There's a cleaner workaround which doesn't require creating temporary files.
Or, using pipes:
That's still a pretty clumsy way of doing that. If I had to do that every time I wanted to pipe something to less, I'd |
Does If/How it makes sense to possibly do this by default is still up for discussion. |
It probably won't read terminal input from this option. |
zsh and I think bash will do the fd dance for you with `mpv <(some-command)`
… On Feb 28, 2017, at 06:28, hxka ***@***.***> wrote:
Or use a FIFO to pipe the steam to mpv as "file".
There's a cleaner workaround which doesn't require creating temporary files.
mpv /proc/self/fd/3 3<some-streamable-file
Or, using pipes:
some-command | mpv /proc/self/fd/3 3<&0 0</dev/tty
That's still a pretty clumsy way of doing that. If I had to do that every time I wanted to pipe something to less, I'd cut my veins.
―
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
By default it makes sense to open /dev/tty instead of expecting stdin to provide user input. |
Fixes mpv-player#4190 This allows you to use terminal input even if you've piped something into mpv.
Fixes #4190 This allows you to use terminal input even if you've piped something into mpv.
mpv version and platform
mpv git-6028244160 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
built on Mon Feb 27 22:36:29 MSK 2017
Platform is Linux
Reproduction steps
mpv --vo=null - < some-streamable-file
(--vo=null is to keep mpv from creating a window which would be able to receive input)
Expected behavior
Controls (e.g. space, p, q, etc) work
Actual behavior
Any input is ignored
Log file
output.txt
(I ran mpv, tried pressing some keys, closed it with ^C)
The text was updated successfully, but these errors were encountered: