Package: televlc
televlc###################################################################################********############################*****************#############################*********##*********################################*********###############<-------->############**************##############*#########************************************************#########************************************************########***************************####******************####*********########***********#########*******************############################***************############################************************Python library to controlVLC media playervia telnet protocolInstallation~$pipinstalltelevlcUsageCreating a vlc instance and interface, then connectingimporttelevlc# Initialize the vlc objectvlc=televlc.VLC()# Open a VLC instance and create the telnet interfacevlc.start_telnet_interface()# Connect to the telnet interfacevlc.connect_to_telnet_interface()# Run a command (volume up)vlc.do(["volup","50"])# Disconnect from telnet interfacvlc.disconnect_from_telnet_interface()# orvlc.do(["exit"])# or end VLC instance and telnet interfacevlc.do(["shutdown"])Connecting to an existing vlc instance and interfacecreate the vlc instance and interface in the terminal~$vlc--extraintf--telnet--telnet-passwordmyPassword--telnet-hostmyHost--telnet-portmyPortconnect via pythonimporttelevlc# Set the interface dataPASSWORD=myPasswordHOST=myHostPORT=myPort# Initialize the vlc objectvlc=televlc.VLC(PASSWORD,HOST,PORT)# Run a commandcommand=["volup","50"]vlc.do(command)# Quitvlc.disconnect_from_telnet_interface()Commandscommanddescriptionadd XYZadd XYZ to playlistenqueue XYZqueue XYZ to playlistplaylistshow items currently in playlistsearch [string]search for items in playlist (or reset search)delete [X]delete item X in playlistmove [X][Y]move item X in playlist after Ysort keysort the playlistsd [sd]show services discovery or toggleplayplay streamstopstop streamnextnext playlist itemprevprevious playlist itemgoto, gotoitemgoto item at indexrepeat [on off]toggle playlist repeatloop [on off]toggle playlist looprandom [on off]toggle playlist randomclearclear the playliststatuscurrent playlist statustitle [X]set/get title in current itemtitle_nnext title in current itemtitle_pprevious title in current itemchapter [X]set/get chapter in current itemchapter_nnext chapter in current itemchapter_pprevious chapter in current itemseek Xseek in seconds, for instance `seek 12'pausetoggle pausefastforwardset to maximum raterewindset to minimum ratefasterfaster playing of streamslowerslower playing of streamnormalnormal playing of streamrate [playback_rate]set playback rate to valueframeplay frame by framefullscreen, f, F [on off]toggle fullscreeninfo [X]information about the current stream (or specified id)statsshow statistical informationget_timeseconds elapsed since stream's beginningis_playing1 if a stream plays, 0 otherwiseget_titlethe title of the current streamget_lengththe length of the current streamvolume [X]set/get audio volumevolup [X]raise audio volume X stepsvoldown [X]lower audio volume X stepsachan [X]set/get stereo audio output modeatrack [X]set/get audio trackvtrack [X]set/get video trackvratio [X]set/get video aspect ratiovcrop, crop [X]set/get video cropvzoom, zoom [X]set/get video zoomvdeinterlace [X]set/get video deinterlacevdeinterlace_mode [X]set/get video deinterlace modesnapshottake video snapshotstrack [X]set/get subtitle trackvlmload the VLMdescriptiondescribe this modulehelp, ? [pattern]a help messagelonghelp [pattern]a longer help messagelocklock the telnet promptlogoutexit (if in a socket connection)quitquit VLC (or logout if in a socket connection)shutdownshutdown VLC