### Install python-vlc via pip Source: https://python-vlc.readthedocs.io/en/latest Use the pip package manager to install the python-vlc module. ```bash pip install python-vlc ``` -------------------------------- ### Use vlc instance wrapper methods Source: https://python-vlc.readthedocs.io/en/latest Example of manually creating a vlc.Instance with specific arguments and using it to manage media and players. ```python >>> import vlc >>> instance = vlc.Instance('--no-audio', '--fullscreen') >>> player = instance.media_player_new() >>> player.audio_get_volume() 50 >>> media = instance.media_new('file:///tmp/foo.avi') >>> media.get_mrl() 'file:///tmp/foo.avi' >>> player.set_media(m) >>> player.play() ``` -------------------------------- ### Use vlc wrapper classes Source: https://python-vlc.readthedocs.io/en/latest Example of using the MediaPlayer wrapper class, which automatically instantiates a default vlc.Instance. ```python >>> import vlc >>> player = vlc.MediaPlayer('file:///tmp/foo.avi') >>> player.play() >>> player.get_instance() # returns the corresponding instance ``` -------------------------------- ### Access raw libvlc methods Source: https://python-vlc.readthedocs.io/en/latest Example of calling libvlc methods directly as attributes of the vlc module. ```python >>> import vlc >>> vlc.libvlc_get_version() '3.0.0-rc2 Vetinari' >>> exc = vlc.VLCException() >>> instance = vlc.libvlc_new(0, [], exc) >>> instance >>> vlc.libvlc_audio_get_volume(instance, exc) 50 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.