VLC’s Awesome RC Interface

I have just discovered the supremely cool RC interface of vlc. Start up vlc from the console with vlc -I rc in order to get it rolling. It creates a tcp or UNIX socket-based remote control interface that you can write a TON of information to. Here’s an excerpt from the longhelp that you can get in-interface:

+----[ Remote control commands ]
|
| add XYZ  . . . . . . . . . . add XYZ to playlist
| playlist . . .  show items currently in playlist
| play . . . . . . . . . . . . . . . . play stream
| stop . . . . . . . . . . . . . . . . stop stream
| next . . . . . . . . . . . .  next playlist item
| prev . . . . . . . . . .  previous playlist item
| goto . . . . . . . . . . . .  goto item at index
| clear . . . . . . . . . . .   clear the playlist
| status . . . . . . . . . current playlist status
| title [X]  . . . . set/get title in current item
| title_n  . . . . . .  next title in current item
| title_p  . . . .  previous title in current item
| chapter [X]  . . set/get chapter in current item
| chapter_n  . . . .  next chapter in current item
| chapter_p  . .  previous chapter in current item
|
| seek X . seek in seconds, for instance `seek 12'
| pause  . . . . . . . . . . . . . .  toggle pause
| fastforward  . . . . . .  .  set to maximum rate
| rewind  . . . . . . . . . .  set to minimum rate
| faster . . . . . . . .  faster playing of stream
| slower . . . . . . . .  slower playing of stream
| normal . . . . . . . .  normal playing of stream
| f [on|off] . . . . . . . . . . toggle fullscreen
| info . . .  information about the current stream
|
| volume [X] . . . . . . . .  set/get audio volume
| volup [X]  . . . . .  raise audio volume X steps
| voldown [X]  . . . .  lower audio volume X steps
| adev [X] . . . . . . . . .  set/get audio device
| achan [X]. . . . . . . .  set/get audio channels
| menu [on|off|up|down|left|right|select] use menu
|
| marq-marquee STRING  . . overlay STRING in video
| marq-x X . . . . . . . . . . . .offset from left
| marq-y Y . . . . . . . . . . . . offset from top
| marq-position #. . .  .relative position control
| marq-color # . . . . . . . . . . font color, RGB
| marq-opacity # . . . . . . . . . . . . . opacity
| marq-timeout T. . . . . . . . . . timeout, in ms
| marq-size # . . . . . . . . font size, in pixels
|
| time-format STRING . . . overlay STRING in video
| time-x X . . . . . . . . . . . .offset from left
| time-y Y . . . . . . . . . . . . offset from top
| time-position #. . . . . . . . relative position
| time-color # . . . . . . . . . . font color, RGB
| time-opacity # . . . . . . . . . . . . . opacity
| time-size # . . . . . . . . font size, in pixels
|
| logo-file STRING . . . the overlay file path/name
| logo-x X . . . . . . . . . . . .offset from left
| logo-y Y . . . . . . . . . . . . offset from top
| logo-position #. . . . . . . . relative position
| logo-transparency #. . . . . . . . .transparency
|
| mosaic-alpha # . . . . . . . . . . . . . . alpha
| mosaic-height #. . . . . . . . . . . . . .height
| mosaic-width # . . . . . . . . . . . . . . width
| mosaic-xoffset # . . . .top left corner position
| mosaic-yoffset # . . . .top left corner position
| mosaic-align 0..2,4..6,8..10. . .mosaic alignment
| mosaic-vborder # . . . . . . . . vertical border
| mosaic-hborder # . . . . . . . horizontal border
| mosaic-position {0=auto,1=fixed} . . . .position
| mosaic-rows #. . . . . . . . . . .number of rows
| mosaic-cols #. . . . . . . . . . .number of cols
| mosaic-keep-aspect-ratio {0,1} . . .aspect ratio
|
| help . . . . . . . . . . . . . this help message
| longhelp . . . . . . . . . a longer help message
| logout . . . . .  exit (if in socket connection)
| quit . . . . . . . . . . . . . . . . .  quit vlc
|
+----[ end of help ]

With this interface, it apparently lets you do all sorts of snazzy stuff like text/logo overlays, playlist modification, playlist traversal, mosaic, and volume control. I’m really, really impressed. Why bother with scripted and programatically controlled invocations of multiple vlc processes when you can have a TCP interface to control a single process?

Either by accident or design, the playlist automatically loops when it reaches the end, which is the opposite of all other “modes” of VLC that i’ve found, such as the default interface and web interfaces (haven’t tried ncurses, but that would require tcl expect knowledge to script, heh). In combination with the ability to modify on the fly, this is exactly the behavior that anyone might need to implement infinitely looping video (such as, say, for digital advertising, or POS, or set top boxes), WITH live updates available to playlists, basically for free.

In my opinion, this is exactly the kind of platform technology that digital signage companies should be building upon and contributing to. Any of you armchair techies out there can make a good business by building video solutions on top of this capability right now. If I weren’t gainfully employed i’d be all over this right now.

4 thoughts on “VLC’s Awesome RC Interface

  1. yes you’re right it’s quite good RC’s interface but i’ve found i think an error with the option : –marq-size if i launch 2 instances of VLC with an overlay (text) and a –marq-size of for instance 40 => the size is different for the both => !!!

    Sory for my very poor english !

    If you know the key to solve my pb …

    bye ! Thelonius

  2. Can you elaborate on the method for creating a mosaic from directshow udp inputs? I have a web cam and a screen captue streaming on a local LAN. I can’t seem to get it to work. Any suggestions?

  3. Not sure, Ralph. I did mostly playlist construction for remote use, not mosaic stuff. I’d hit up the mailing list/forums for VLC.

  4. Haven’t tried it twice, but the one time I started my 1.1.0 vlc without the –loop option it properly stopped after the playlist completed – so your described behaviour, that rc loops by default, seems like a resolved bug.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.