views:

187

answers:

3

I'm trying to use VLC's python bindings to create my own little video player. The demo implementation is quite simple and nice, but it requires all the keyboard commands to be typed into the console from which the script was run.

Is there any way I can handle keyboard input also when the video player itself has focus? Specifically, I care about controlling the video while in fullscreen mode.

Perhaps there's a way to keep the keyboard focus in the console (or maybe another window) while showing the video?

I'm using Windows XP, if that has any relevance.

+1  A: 

The best way to control VLC from Python is to talk via the web interface. I tried to get the VLC Python bindings to work and it was more trouble than it's worth, especially for cross-platform stuff. Just use wireshark or something similar to see what the web interface commands look like(they're very simple). I'm using twisted to do the HTTP GETs but you could use the built-in urllib2.

Ryan Nowakowski
Oops... just realized that this may not actually answer the question asked.
Ryan Nowakowski
Still useful information. Are you sure you're talking about the new python bindings, with ctypes, and not the old one?
itsadok
It's been forever since I've tried the VLC bindings... I don't remember which ones they were. The HTTP stuff worked so well that I didn't even look back.
Ryan Nowakowski
+1  A: 

looks like there's no native way. you could fake it by adding "global" key bindings or by capturing events like "MediaPlayerForward" and just remember "oh that means they probably hit the space bar" (or what not) and respond accordingly. GL! -r

rogerdpack
see my other below
rogerdpack
A: 

Ok here is their official answer:

http://forum.videolan.org/viewtopic.php?f=32&t=82807

rogerdpack