# Error with shoutcast radio stream

**URL:** <https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465>\
**Category:** FMOD Engine\
**Created:** [November 24, 2020, 2:06pm UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465 "2020-11-24T14:06:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![stargx](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@stargx](https://qa.fmod.com/u/stargx)\
**Post date:** [November 24, 2020, 2:06pm UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/1 "2020-11-24T14:06:38Z")

</div>

I’m trying to play a shoutcast radio stream.

Using the following code and a shoutcast URL results in an HTTP error:

result = system-\>createStream(“[http://yp.shoutcast.com/sbin/tunein-station.pls?id=1817772](http://yp.shoutcast.com/sbin/tunein-station.pls?id=1817772)”, FMOD\_DEFAULT, NULL, &musicSound);

However, using VLC to find the location url does work:

result = system-\>createStream(“[http://78.47.158.100:8080/dance.mp3](http://78.47.158.100:8080/dance.mp3)”, FMOD\_DEFAULT, NULL, &musicSound);

The docs say FMOD should work with shoucast and .pls files.  
Any ideas?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [November 25, 2020, 12:42am UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/2 "2020-11-25T00:42:16Z")

</div>

Have you tried our net\_stream example?

There is some extra code required for reading the entries in a playlist, then opening those streams.  
The example shows how to do that.

---

<div class="post-metadata">

**Author:** ![stargx](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@stargx](https://qa.fmod.com/u/stargx)\
**Post date:** [November 25, 2020, 11:21am UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/3 "2020-11-25T11:21:57Z")

</div>

Hi Mathew,

I’ve tried the net\_steam example and that failed also. Here are my findings:

1. The example URL works fine.

2. The shoutcast URL ( [http://yp.shoutcast.com/sbin/tunein-station.pls?id=1817772](http://yp.shoutcast.com/sbin/tunein-station.pls?id=1817772) ) fails with ‘Error 19 Unsupported file or audio format’  
However, I can see that it’s trying to connect to ‘31.12.71.119:80’ which seems to be a placeholder shouctcast page and not an actual radio address.

3. Direct URL to the station does work ( [http://78.47.158.100:8080/dance.mp3](http://78.47.158.100:8080/dance.mp3) ). So the above format error does not apply to the actual station.

4. Another example URL ( [http://www.defjay.de/listen.pls](http://www.defjay.de/listen.pls) ) fails with generic ‘Error 21 - HTTP Error’

All of the above URLs work fine with BASS net radio code, so something is not quite right in the FMOD code.

Any ideas?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [November 25, 2020, 11:57pm UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/4 "2020-11-25T23:57:06Z")

</div>

I have found an internal error in our processing of server response headers causing this to all fall over. It’s an easy fix and will be corrected in our next release. The issue is isolated to that server and any others that work the same way, unfortunately there is no work around.

---

<div class="post-metadata">

**Author:** ![stargx](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@stargx](https://qa.fmod.com/u/stargx)\
**Post date:** [November 26, 2020, 8:30am UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/5 "2020-11-26T08:30:34Z")

</div>

Great, glad you’ve found a fix.  
Is there an ETA on the next release?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [November 26, 2020, 11:03pm UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/6 "2020-11-26T23:03:59Z")

</div>

Should be about 2 to 3 weeks away.

---

<div class="post-metadata">

**Author:** ![iADBE](https://avatars.discourse-cdn.com/v4/letter/i/8e7dd6/32.png) [@iADBE](https://qa.fmod.com/u/iADBE)\
**Post date:** [February 11, 2022, 10:07pm UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/7 "2022-02-11T22:07:32Z")

</div>

Hi im still having issued with the net\_stream example i keep getting FMOD\_ERR\_NET\_URL

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [February 14, 2022, 11:12pm UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/8 "2022-02-14T23:12:10Z")

</div>

Hi, this means the URL you passed in couldnt be resolved.  
This is an error from getaddrinfo(). Check your URL formatting, and if you want the specific gettaddinfo error, please use the logging version of FMOD to see what the error was. This will be in an fmod.log file or your debug tty depending on your settings.

---

<div class="post-metadata">

**Author:** ![iADBE](https://avatars.discourse-cdn.com/v4/letter/i/8e7dd6/32.png) [@iADBE](https://qa.fmod.com/u/iADBE)\
**Post date:** [February 17, 2022, 7:00pm UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/9 "2022-02-17T19:00:28Z")

</div>

Definitely was the issue. Following the net\_stream example, it just passed a string in to the createSound function. I didn’t know i had to encode that string into a UTF8 format. After doing that stream worked like a charm.

TY.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [February 20, 2022, 10:38pm UTC](https://qa.fmod.com/t/error-with-shoutcast-radio-stream/16465/10 "2022-02-20T22:38:56Z")

</div>

you dont require utf8 but if you have special characters or maybe a slash the wrong way around it is possible that worked around it by encoding it.
