Author Topic: Check if Internet stream exists  (Read 210 times)

atza

  • Posts: 116
Check if Internet stream exists
« on: 21 Apr '17 - 14:57 »
I have a huge list of internet radio stations (m3u,pls...).Many of them don't work. How can I bulk check all of them? The one sure way to do it is to open each with BASS_StreamCreateURL and hear if there is something playing. But that would take too much time. I used link checker on all of them to get their headers but again many of them return Status 200:OK but actually they are not playing.

So is there a reliable  way of checking streams validity without actualy opening them with BASS_StreamCreateURL ? Or can I use BASS_StreamCreateURL in many threads so I can check say 20 URLs at a time in 20 threads?
Hope I explained well the problem...

Ian @ un4seen

  • Administrator
  • Posts: 20152
Re: Check if Internet stream exists
« Reply #1 on: 21 Apr '17 - 16:12 »
It is fine to call BASS_StreamCreateURL simultaneously in multiple threads, so you could indeed do that to test the URLs. As you won't be playing the streams, you could use the BASS_STREAM_DECODE flag to save some resources when doing that, and also disable pre-buffering by setting BASS_CONFIG_NET_PREBUF to 0 (via BASS_SetConfig).

atza

  • Posts: 116
Re: Check if Internet stream exists
« Reply #2 on: 25 Apr '17 - 07:26 »
Hi i did it with streams it works very fast. Two problems occure though:
1- Sometimes I get wmvcore.dll access violation crash (on wma streams).
2.- On some streams I get imediate "timeout" error even though limit is default-5seconds.(it occurs more often with largge number of streams 100+ for example)

Any sugesstions? Maybe I can skip chacking wma streams and get back to them later but how I know in advance which will be wma?

Ian @ un4seen

  • Administrator
  • Posts: 20152
Re: Check if Internet stream exists
« Reply #3 on: 25 Apr '17 - 14:47 »
1- Sometimes I get wmvcore.dll access violation crash (on wma streams).

Please provide a URL that the problem happens with, to reproduce the problem.

2.- On some streams I get imediate "timeout" error even though limit is default-5seconds.(it occurs more often with largge number of streams 100+ for example)

I will send you a debug version to get some more info on that.

atza

  • Posts: 116
Re: Check if Internet stream exists
« Reply #4 on: 26 Apr '17 - 06:56 »
Meanwhile I cleaned up my code a little and now I can't reproduce neither of errors..Guess it was just me,sorry for bothering you,thanks