VLC is an amazing media player, or rather a
media-related Swiss army knife. It has a surprising number of different control
interfaces, some of which allow
access over a network, such as the HTTP, Telnet and RC interfaces. It also has
a Python API but just
looking at the documentation is terrifying...
I did some experimenting with controlling VLC from Python using VLC's
Remote Control Interface (see this as well), and wrote a small
proof-of-concept code snippet. Here's how to use it:
The code is not production-grade. I will not be developing this any more, so I
am putting it here for anyone to grap and hopefully do something useful with.
I've only tested this on my Ubuntu machine, and it requires both VLC and
screen to be installed. It also uses subprocess.run() to start VLC, which
is not available in any version of Python earlier than 3.5.
Here's the library/wrapper, drop it anywhere in your Python PATH: