Linux control a running vlc process through command line

后端 未结 4 2040
别跟我提以往
别跟我提以往 2021-01-05 03:15

is there any way to control an already running VLC player on ubuntu. For example, i am trying to start a vlc video full screen with a default audio.

and then contro

4条回答
  •  独厮守ぢ
    2021-01-05 03:27

    The script player control from exic's answer is just a wrapper for some dbus commands. To use them without the script, try the following:

    dbus-send --type=method_call --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
    

    The last PlayPause can be replaced with, e.g., Play, Pause, Previous, Next.

    If you have qdbus installed, it can be used as an alternative to dbus-send:

    qdbus org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
    

    A list of all available calls can be obtained by leaving out the last argument:

    qdbus org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2
    

提交回复
热议问题