AttributeError: module 'vlc' has no attribute 'Instance'
Posted: 27 Nov 2020 08:28
I have both vlc 4.0 64 bit and python 3 64 bit..install those python module properly....but have error when exec it. spend few days...install and uninstall , can't fix it...
anyone can help?
Error as below
vlc_instance = vlc.Instance(vlc_option)
AttributeError: module 'vlc' has no attribute 'Instance'
anyone can help?
Error as below
vlc_instance = vlc.Instance(vlc_option)
AttributeError: module 'vlc' has no attribute 'Instance'
Code: Select all
#pip install pafy
#pip install youtube_dl
#pip install python-vlc
import pafy
import vlc
import time
vlc_option = '--video-filter=invert'
#player = vlc.MediaPlayer("/path/to/file.flac")
url = """https://youtu.be/xxxxxxxx"""
vid = pafy.new(url)
best = vid.getbest()
best_player = best.url
vlc_instance = vlc.Instance(vlc_option)