Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux control a running vlc process through command line

Tags:

bash

ubuntu

vlc

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 control the volume and other features through netcat or some other command remotely. is it possible?

like image 982
Shrouk Khan Avatar asked Jan 10 '13 10:01

Shrouk Khan


People also ask

Does VLC have a CLI?

The rc module is a interactive command line interface. It allows you to type commands to make VLC do things. To start it, run vlc --intf rc . This is the default interface if no GUI environment is available.

Can you remotely control VLC?

VLC Mobile Remote android app developed by Adarsh Urs with good user interface is easy to use, includes all the basic as well as advanced controls of VLC and it is free. Setup Wizard in the app makes it easy to setup VLC and automatically connects the PC/Mac to android device.


1 Answers

If you enable the HTTP remote interface on VLC, you can control VLC remotely with a web browser, or even an app on your phone.

With the HTTP interface enabled, you can also use wget or curl commands to send commands.

For example, enable VLC's HTTP interface (default port: 8080) with "password" for a password. Then you can issue curl commands, either remotely or locally:

Curl Prefix

For brevity I will show the first part of the curl command here (the IP will most likely be your localhost, but the 8080 port is the default:

 curl -s -o /dev/null -u :password http://192.168.1.11:8080

then combine with the actions:

To pause:

.../requests/status.xml?command=pl_pause

To play:

.../requests/status.xml?command=pl_play

To play a specific playlist entry number:

.../requests/status.xml?command=pl_play&id=22

To change volume:

.../requests/status.xml?command=volume&val=133

Other command info: https://wiki.videolan.org/VLC_HTTP_requests/

like image 119
dye46 Avatar answered Oct 30 '22 14:10

dye46