Can not import vlc to python program

前端 未结 2 871
萌比男神i
萌比男神i 2021-01-29 00:21

I\'m trying to reproduce a video with sound in python Tkinter through VLC, but cannot run the file since I get an error when running the line import vlc.

I have python 3

2条回答
  •  悲哀的现实
    2021-01-29 00:31

    I ended up using subprocess to run VLC through the CLI.

    import subprocess
    
    
    comand = 'vlc --play-and-exit --no-video-deco --no-embedded-video -f --one-instance --no-playlist-enqueue  assetsCNDH\\directorio.mp4'
    subprocess.run(comand, shell=True)
    

提交回复
热议问题