Is there a way to get the currently playing item in the vlc media player using command line or python in ubuntu ?
VLC has a mini web server included that supports macros that you can use to query the current item, time left, etc.
Although this is far from perfect, VLC ships with a little HTTP server integrated. It is used both to stream using HTTP, and for the HTTP remote control interface. To start VLC with the HTTP interface, use:
To get the current playlist item and time position, Try creating an html file containing this :
The method to get the current URI is really dirty, but I don't think we have a better one at the moment.
Place this file in the HTTP interface path (/usr/share/vlc/http, or /usr/local/share/http probably, or share/http in the source tree if you're running an uninstalled version).
Then, you can use