Python Shoutcast Client
Posted: 10 Feb 2023 19:18
I hope this is an easy one. I need to connect to a Shoutcast stream that may or may not be live, but will be live soon. I am using Python with Python-VLC.
If I connect to a live stream, it plays fine with this error
[00000160436e5360] prefetch stream error: unimplemented query (264) in control
I'm not concerned about that as it plays fine. The dead stream responds with this
[000002847da34e10] access stream error: HTTP 401 error
[000002847da2bce0] main input error: Your input can't be opened
[000002847da2bce0] main input error: VLC is unable to open the MRL 'https://sh.fl-us.audio-stream.com/#####/#####'. Check the log for details.
There is no need for authorization, which most of the docs refer to about the HTTP 401 error. I have tried more than a dozen VLC set/get/audio functions to test for a working stream. All my attempts return identical results for the live and the dead stream. What test should I be doing to recognize the lack of audio and retry in 30 seconds for a new attempt?
If I connect to a live stream, it plays fine with this error
[00000160436e5360] prefetch stream error: unimplemented query (264) in control
I'm not concerned about that as it plays fine. The dead stream responds with this
[000002847da34e10] access stream error: HTTP 401 error
[000002847da2bce0] main input error: Your input can't be opened
[000002847da2bce0] main input error: VLC is unable to open the MRL 'https://sh.fl-us.audio-stream.com/#####/#####'. Check the log for details.
There is no need for authorization, which most of the docs refer to about the HTTP 401 error. I have tried more than a dozen VLC set/get/audio functions to test for a working stream. All my attempts return identical results for the live and the dead stream. What test should I be doing to recognize the lack of audio and retry in 30 seconds for a new attempt?