I would like to know if there is a way to send a message to a running process on linux ?
For example, is it possible to programmatically "pause" a video launched with mpv
.
The key "P", is set by default to pause the video.
Go to the folder where your mpv. EXE is located. Create a new folder in it, and name it "portable_config" and place the file inside that folder. This is where mpv will read your settings from.
The system-wide configuration file 'mpv. conf' is in your configuration directory (e.g. /etc/mpv or /usr/local/etc/mpv ). The user-specific one is ~/. config/mpv/mpv.
Drag the file from your favorite file manager and drop it on MPV's window. You can also drag and drop multiple files, as well as folders that contain media files MPV can recognize. Don't worry if they also contain unsupported files: MPV will skip them.
possible? if you follow ChrisK2's suggestion and add the `keep-open=yes to your mpv.conf`` file, then you won't need any special command line options. for menu control, i mean: more button for details : flip, rotate, mute, but button and not keyboard.
· Issue #2068 · mpv-player/mpv · GitHub 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?
It finds all the videos on the page and then uses an Intersection Observer to play them when they are in view, then pause them when they go out of view. You can also tweak the threshold so that the videos start to play, say when just a little of them enters the viewport, or the entire video is visible – and everything inbetween.
To control mpv
remotely (eg from another terminal session) you can also start it with the option
--input-ipc-server=/tmp/mpvsocket
and control it by issuing commands like this:
echo '{ "command": ["set_property", "pause", true] }' | socat - /tmp/mpvsocket
See man mpv
for (many) more details.
edit: see also mpv --list-properties
edit2: The most simple way I've found to "toggle" pause/play is
{"command": ["cycle", "pause"]}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With