Pause programmatically video player mpv

后端 未结 3 1394
慢半拍i
慢半拍i 2020-12-29 09:23

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 w

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-29 10:01

    kill -s STOP $(pidof mpv) and kill -s CONT $(pidof mpv)

    or better :

    xdotool key --window "$(xdotool search --class mpv)" p

    The key "P", is set by default to pause the video.

提交回复
热议问题