2

I need a command or a python code to get all data like the name of the file which is playing in VLC and hour:minute:second of the video.

Sample Output:

pc@system: $ TheCommandLine

File : /home/rev/sample.mp4
Moment : 1:12:45
Title : Name Of The Movie

I would appreciate any help and resource.

Thanks.

3

VLC has interfaces, apart from the GUI, for developers to use them to control VLC. The HTTP interface is recommended for doing requests and get xml responses.

Example:

Using the GUI: Launch VLC. First set a password for the http lua module following the menu: Preferences -> all -> Main Interfaces -> Lua. Then follow View -> Add Interface -> Web and you have a web server running. You can make your requests with empty user and the password you have set, like this:

wget --user= --password=test http://127.0.0.1:8080/requests/status.xml

Have a look also to View -> Add Interface -> Console to see the available commands to control and get information from VLC. Follow the above links to see how you get or post the available commands.

You can also use the command line for the above tasks, for example to start the http server:

vlc --intf http --http-password=test

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.