I am attempting to control VLC from python (fullscreen playback) using the python bindings vlc.py.
I am unsure where to install the vlc.py module and hoping someone can help. I'm on MacOs, VLC 2.0.9, Python 2.7.3.
The documentation for vlc.py is generally very good but the installation instructions less so.
I'm aware that the Lua code modules live inside VLC.app/Contents/MacOs/share/lua and wonder if the vlc.py module should be placed somewhere similar?
At the moment I am running the vlc.py module in the same directory as my test script - and outside of the VLC.app directories and although the python is executing without errors it isn't playing the video or returning any parameters about the specified mp4 file.
so the following test script
Code: Select all
import vlc
def setup_player(filename):
vlc_instance = vlc.Instance('--no-audio', '--fullscreen')
player = vlc_instance.media_player_new()
media = vlc_instance.media_new(filename)
player.set_media(media)
print media.get_mrl() # File location to get title
print player.get_length() #Time duration of file -1 means there is no media
print player.get_state() #Player's state
player.play()
setup_player('foo.mp4')
Code: Select all
file:///Users/admin/Sites/pythontest/foo.mp4
-1
State.NothingSpecial
Apologies for a banal question! Any help very gratefully received.