How to programmatically control simple VLC actions

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
spection
Blank Cone
Blank Cone
Posts: 46
Joined: 04 Feb 2009 03:07
Operating System: Windows

How to programmatically control simple VLC actions

Postby spection » 21 Jul 2019 02:06

I want to programmatically control any one of several separate instances of VLC/VLC Portable playing one video each under 64-bit Windows 7 or 10 (I've already learned that I don't want to use playlists). I only need to accomplish simple things, such Pausing / Playing (not toggling; I need to be sure of the state I've set), and setting the video to display full screen or normal windowed. That's it. No streaming or other more complex actions.

Although it shouldn't matter for this question, I will be coding in AutoIt, which used to have a user-defined function set for controlling VLC, but it doesn't work with versions later than 1.x. But I don't think that's going to be a problem because I'm not going to try using that, and I'm confident that I can do what needs to be done in AutoIt. I thought global hotkeys might be the way to go, but since there can be multiple instances of VLC, there's no way to specify which instance the hotkey is to be directed at.

I've looked at the command line interface, but since there will be multiple separate instances I couldn't learn how to direct a command line at only one specific already-playing instance. But maybe it's easy -- does anyone know how to do things like definitely pause a video that might be already paused?

An alternative might be the ActiveX interface, but try as I might I can find no information on how to do that without a browser (but AutoIt can definitely issue URL-type commands). A complicating factor might be that no matter what I try, I cannot connect to localhost on any of my Windows computers via HTTP (or that interface might be the way to go).

Which interface would you recommend I use?

THANKS!

Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 7 guests