Is there a way to get the currently playing item in the vlc media player using command line or python in ubuntu ?
Current Item in VLC media player using command line
command linevlc-media-player
command linevlc-media-player
Is there a way to get the currently playing item in the vlc media player using command line or python in ubuntu ?
Best Answer
VLC has a mini web server included that supports macros that you can use to query the current item, time left, etc.
Read here.
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
wget http://vlc_streamer:8080/your_file