I am trying to play videos in VLC player via the python module "python-vlc" and the video player disappears immediately after launching.
Here is the code:
import vlc
media = vlc.MediaPlayer("video.mp4")
media.play()
When running this, the VLC player opens for a second, and displays the correct size dimensions for the video file I'm calling ("video.mp4"), but immediately disappears (i.e. closes) as soon as it launches.
Details about my setup:
- Windows 64-bit
- VLC Player 64-bit
- Visual Studio w/ virtual environment
- Python 3.9.6
There is a similar issue here, where the proposed solution is to delete some kind of vlc cache, but I'm not sure how to apply it to my context. Maybe my problem is due to something else.
Also: the video file in question is present in the project's root directory.
Any help would be greatly appreciated.