Skip to content

VLC Streaming RTSP causes services to stop working because something isn't cleaning the connections up

We use VLC as a service to host music to play back to callers when in queue. The callers queue and every 150s the call will reprocess some code which causes the stream to restart each 150s as well. This is causing the vlc processes to leave opened ports on the windows server until it fills up and eventually causes the vlc stream to stop playing or to play garbled messages. It didn't do this until version 3, but we aren't allowed to have version 2 in our environment because of the vulnerabilities.

Here is a sample of the windows service we create: F:\GCTI\Genesys_MOH\vlc\vlc.exe -I ntservice --ntservice-install --ntservice-name="Genesys MOH Default 8947" --ntservice-options="F:\GCTI\Genesys_MOH\8947_Main_CS.xspf --no-qt-privacy-ask --no-qt-error-dialogs --loop --rtsp-timeout=-1 --sout=#gather:rtp{sdp=rtsp://:8947/} --sout-keep" vlc://quit

Here is what our application connects to in order to playback the music stream:

rtsp://ctimiq1.bcbst.com:8947/

We use currports and can see 1000s of opened ports but the connections are no longer active. screenshot

Service is running on windows 2019 currently.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information