Treat with Jermolene

protective, soothing, anti-bacterial

Archive for July 2009

Hacking VLC Media Player

with 2 comments

So, I’m at a Hothouse at BT’s Adastral Park campus, doing some work involving remote control of the VideoLan Media Player (aka VLC). VLC is an open source media player with support for a wide range of codecs, and with some fairly sophisticated features like stranscoding, streaming, and remote control via the integrated HTTP server. To use the latter, you need to start VLC with a special switch from the command line:

"/Applications/" --extraintf=http

Once you’ve done that, you’ll be able to interact with the player through this web interface:


VLC Web Interface

The HTTP interface also permits VLC to be controlled with simple HTTP requests. For example:

curl -g "http://localhost:8080/requests/status.xml?command=pl_stop"
curl -g "http://localhost:8080/requests/status.xml?command=pl_play"

The HTTP interface also serves static web pages, and includes a fairly rich-but-unusual macro/templating system for creating dynamic pages like the remote control interface above.

UPDATE: More useful URIs

/requests/playlist.xml - Retrieve current playlist in XML format
/requests/status.xml?command=pl_empty - Clear current playlist
/requests/status.xml?command=in_enqueue&input=<uri> - Add URI to playlist (example)
/requests/status.xml?command=in_play&input=<uri> - Add URI to playlist and start playing

Written by jermolene

July 8, 2009 at 4:45 pm

Posted in bt, development, opensource

links for 2009-07-06

leave a comment »

Written by jermolene

July 6, 2009 at 2:03 pm

Posted in Uncategorized

links for 2009-07-02

leave a comment »

Written by jermolene

July 2, 2009 at 2:04 pm

Posted in Uncategorized