Search Unity

Radio PRO - MP3 and OGG-streaming solution

Discussion in 'Assets and Asset Store' started by Stefan-Laubenberger, Jun 18, 2015.

  1. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    The new version is in the store!
     
  2. DigitalBeach

    DigitalBeach

    Joined:
    Jan 17, 2015
    Posts:
    29
  3. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    Hi

    What is your target platform?


    So long,
    Stefan
     
  4. DigitalBeach

    DigitalBeach

    Joined:
    Jan 17, 2015
    Posts:
    29
    Android / iOS
     
  5. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    Unfortunately, there is afaik no way to accomplish this with C#. There is a small possibility for AAC under Windows, but no other platforms :(

    Either you can convince the station to broadcast in MP3/OGG or you have to roll your own (native) implementation.
     
  6. shubhank008

    shubhank008

    Joined:
    Apr 3, 2014
    Posts:
    59
    This was/is playing in your demo so I purchased the asset, but now when testing in Unity itself it gives the below error.

    Stream: http://143.95.89.54:9318/
    http://143.95.89.54:9318/listen.pls
    http://143.95.89.54:9318/stream

    error:
    radio roc
    No more data to read after 0:00! Please restart this station or choose another one.

    I tried playing with buffer and chunk size to no avail, there was a buffer chunk combination that gave some other error related to authorization, even though no authorization mechanism is setup.

    Trying in Android mode.
     
  7. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    Hi

    Android 9+ and iOS 10+ are only supporting URL's with the HTTPS-protocol.
    Your station is HTTP, which won't work.

    Please consider streaming your station over Shoutcast or Radionomy, which both support HTTPS.


    Cheers
    Stefan
     
  8. shubhank008

    shubhank008

    Joined:
    Apr 3, 2014
    Posts:
    59
    Is there any alternative or solution for non https or such ? That url/stream uses shoutcast but its owned/made by my father's friend who wanted a simple app for their radio station. Unfortunately the original dev who created it and set it up is no longer in touch and they do not have any access to its server or admin panel, etc.
     
  9. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    Unfortunately, both mobile OS providers decided that HTTP is no longer "good/save" enough :(
    You have to use HTTPS for mobile nowadays.
    We can provide you some ideas on how-to start from scratch hosting your own station (if the original dev is no longer available).


    Cheers
    Stefan
     
  10. shubhank008

    shubhank008

    Joined:
    Apr 3, 2014
    Posts:
    59
    Does that include re-setting up a whole shoutcast server from scratch ? Problem is, I am pretty sure they no longer have access to their servers or current setup so that they can give me anything to re-setup or recreate a new server/shoutcast from.

    I do could set up shoutcast from scratch too but thing is their actual studio/equipment is borders apart and it seems the current setup is set to stream directly from their studio to that IP/url. TBH, I think redoing everything from scratch is gonna be just too much hassle and time taking.

    Instead, I am thinking of some middle ware "hack". Something like creating another middle layer of server with ffmpeg taking that http input and doing output on https, since I can configure my server to be https.

    Oh well, what a bummer. I will talk with him and see what he thinks. Its a bit hard to talk all this technical stuff to dads and their circles, especially in third world.
     
  11. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    Hello again

    That's unfortunate... You could try to redirect the stream under your own server via HTTPS. Something like:
    https://serverguy.com/security/redirect-http-to-https/

    But I'm not 100% if that would work.


    So long,
    Stefan
     
  12. behrouzb

    behrouzb

    Joined:
    Feb 14, 2018
    Posts:
    8
    Hello,

    We added this to our project and customized a bit, it works in the Editor, but doesn't work when run on my iPhone, what am I missing, what areas should I look at to debug this?
     
  13. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    Hi

    I assume you are trying to connect to a station via IP or HTTP-only?
    iOS and Android 9+ are only working with HTTPS.


    Cheers
    Stefan
     
  14. behrouzb

    behrouzb

    Joined:
    Feb 14, 2018
    Posts:
    8
    Hi Stephan,

    We have the HTTPS flag set, so it is only pulling HTTPS links. What else do you think the issue could be? Would you be able to do a remote session to take a quick look? This works fine in the editor but not on my iphone!
     
  15. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    Hello again

    Sure, but right now I have to go to sleep :) Please join our Discord server for a session: https://discord.gg/ZbZ2sh4

    Meanwhile, can you please send me the log from Xcode? There must be a specific warning or error.


    So long,
    Stefan
     
  16. behrouzb

    behrouzb

    Joined:
    Feb 14, 2018
    Posts:
    8
    Thanks Stefan, I'll ping you next week regarding doing a remote session. I'm going to first try to see if I can debug this with my developer.
     
    Stefan-Laubenberger likes this.
  17. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    We've just released version 2019.2.0 of Radio,
    Main changes:
    • Updated for Unity 2017.4 and higher
    • Added compatibility with assembly definitions
    • Demos: fully qualified access to classes
    • Code slightly optimized for mobile
    • Updated to Common 2019.4.0
     
  18. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    The new version is in the store!
     
  19. DesignVisionaries

    DesignVisionaries

    Joined:
    Jul 16, 2019
    Posts:
    1
    How do i get around the issue of
    Only MP3 with layer 3 specs is supported!

    Seems to only happen when i connect to the stream via android. but works fine on windows.

    I'm using broadwave which does provide an mp3 to connect to.
     
    Last edited: Sep 5, 2019
  20. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    Hi

    The sample rate of your stream is below 32000 and the decoder declares it as an invalid stream:
    upload_2019-9-6_1-19-54.png
    https://en.wikipedia.org/wiki/MP3

    Radio uses a different implementation under Windows which is more tolerant towards "exotic" sample rates (and supports MPEG-2 and even MPEG-2.5).

    Please use a stream with a valid sample rate.


    Cheers
    Stefan
     
  21. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    We've just released version 2019.2.1 of Radio.
    Main changes:
    • RadioPlayerExperimental added. It has a separate thread for the decoding which should improve the overall performance
    • RadioProviderUser: ShowFile and EditFile improved
    • Minor code improvements
    • Updated to Common 2019.4.1
     
  22. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    The new version is in the store!
     
    AFrisby likes this.
  23. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    We've just released version 2019.3.0 of Radio.
    Main changes:
    • Biggest code overhaul since the release
    • Updated to Common 2019.5.1
     
  24. Stefan-Laubenberger

    Stefan-Laubenberger

    Joined:
    May 25, 2014
    Posts:
    1,328
    The new version is in the store!