I am trying to write some python code to interact with VLC media player. I'm having an issue where if I run player.play(), VLC launches and plays correctly, but the process gets blocked and I can't continue the code.
If I run this in interactive shell I have the same issue. If I press enter or cntrl + c on my keyboard, I get a prompt and can continue coding, and the video keeps playing and everything works. Why do I have to press enter to continue the process? How can I get around this?
player = vlc.MediaPlayer()
player.set_media(vlc.Media(file_path))
player.play()
0
>>> [000070b0b00072a0] gl gl: Initialized libplacebo v4.192.1 (API v192)
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
[000070b0b00072a0] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
[000070b06da28a20] main video output error: video output creation failed
[000070b0e19d8100] main decoder error: failed to create video output
[000070b0cd98c280] gl gl: Initialized libplacebo v4.192.1 (API v192)
[000070b0e19d8100] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library 470.199.02 Thu May 11 11:44:38 UTC 2023 for hardware decoding
At this point, the process is blocked.