vlc 3.0.8 with python wrapper hangs

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
ae.branton
New Cone
New Cone
Posts: 5
Joined: 14 Apr 2020 21:29

vlc 3.0.8 with python wrapper hangs

Postby ae.branton » 12 May 2020 23:44

Hey Guys
I have a python application that uses the VLC Ctypes bindings python api. The Application lays out X number of VLC players linked to the window and streams some RTSP streams from cameras.
Overall it works pretty well, but there is one MASSIVE issue.

When I have multiple streams going, I randomly encounter this/these error(s):
1. A stream freezes during normal playback
2. OR You view another window (ie, bring up email over the application) and when you go back to the application one or 2 videos has an "imprint" of the previous window over the player, which is no longer playing. Just showing frozen memories of the last video to be over it
3. When this happens, the python application is still responsive... for now
4. The second any action is taken on the hung VLC player, it hangs the entire python application and it must now be force killed.

These are RTSP Streams, though the same thing happened using an html stream of a .TS video file.
Its reasonably reproducable
Building these players using the vlc bindings consists of creating an instance (vlc.Instance() ) then creating a player (instance.media_player_new() ) and some media (instance.media_new())
I have tried a number of different flag combinations on the instance - but to be honest im not overly familiar with them so im not 100% sure ive tried the right things
The stream freeze in and of itself is not so upsetting - its the fact that if we try to relaod it it hangs the entire application. The only way to (sort of) get rid of it is to extract the widget that its attached to and just hide it. So you never gain the CPU/memory beack that its using, as its still open in the background, but its hung.

I have tried stopping the media, releasing the media (2 ways), pausing THEN stopping, stopping from a different thread, playing it on a differnt thread, media.parse_stop, just entirly deleting it via python (either with del, or setting the variable to none that holds it, and removing it from the player), replacing it on the player with a blank media etc. All of them result in a freeze.

The appliation is working really well, but this one freeze is kinda killing us - and I cant figure out how to solve it on the VLC side.
Does anyone have any suggestions?

Added info - everyone involved has a reasonably strong computer, and some sort of NVIDIA with a GPU (Quadro k4000 in my case, many others have far better)
I dont know if gpu/hardware accel is on in VLC, i played with some flags i researched about it but couldnt find any noticable differences so i wasnt sure if im using the right ones.
VLC 3.0.8 vinatari
Python binding version 3.0.7110
We are also using PCOIP to connect to these machines, in case that itnerferes in any way with hardware-decoding

Any suggestions welcome!

ae.branton
New Cone
New Cone
Posts: 5
Joined: 14 Apr 2020 21:29

Re: vlc 3.0.8 with python wrapper hangs

Postby ae.branton » 13 May 2020 19:25

Worth noting, i beleive this may be a bug with VLC 3.x as i just rolled my machine back to VLC 2.2.6 and its bindings for python, and so far (after 90 mins) I cannot reproduce the issue i was having above.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 59 guests