Announcement

Collapse
No announcement yet.

ANNOUNCE: iHeartRadio to play US live iHeart radio stations

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ANNOUNCE: iHeartRadio to play US live iHeart radio stations

    This plugin enables listening to many iHeart live US stations. This is a LMS plugin which means a local LMS is required - it does not work with mysqueezebox.com connected devices.
    To install - add the respositry URL below to the LMS WebUI/Settings/Plugins "Additional Respositories" at the bottom of the page.

    The plugin provides two menus
    * a keyword search - seems to match a word in station name, callsign or description.
    * browse by genre

    Each iHeart station may have a number of "playable" URLs but not all LMS version and players can play all types of URL.

    A station on a menu is a playlist of the station's URLs ordered by probably most playable first.

    Once playing a user can save as a Favorite.

    The URLs are ordered as follows: Shoutcast, Secure Shoutcast, HLS, secure HLS, PLS, STW and secure STW

    Shoutcast URls are "normal" http streams with audio in MP3 or AAC.
    Secure Shoutcast URls are https streams with audio MP3 or AAC - these require a version of LMS that supports "https" to proxy the streram.
    HLS and Secure HLS streams are Apple HLS (i.e.m3u8) they will require PlayHLS plugin (and ffmpge/avconv) to be installed to be playable. iHeart HLS are "special "and do not play properly (e.g. gaps, interleaved audio).
    PLS stream are streams which are pls playlist format - the actual stream may be in the format of any of the above 4 streams.
    STW and secure STW - these are streamtheworld URLs which may or may not work as they are old.

    iHeart API may also provides rtmp and flv Flast stream but these are not playable on LMS.

    A user can drill down the Station instead of playing and copy an URL into a Favorite. Only Shoutcast URLs found by this plugin will be playable on a device connected to mysqueezebox.com assuming the shoutcast URL has been copied as a mysqeueezebox favorite.

    Repository URL
    http://downloads.sourceforge.net/pro...radio-repo.xml

    Edit
    A more reliable repository URL is

    Last edited by bpa; 2020-02-22, 10:00. Reason: Added comment about HLS streams

    #2
    Place holder for any additional notes.

    Comment


      #3
      Excellent, thanks!

      Comment


        #4
        Couple of thoughts.
        • The couple of searches I did worked fine.
        • Is there anyway to pull the artwork out of the stream from the HLS data?
        • HLS streams are sometimes interrupted, like it is not looking ahead far or often enough. More info below


        The link that you are using is the plain link for the HLS stream. it only returns a little data. Only one .aac link and is also missing all of the track data.
        Code:
        [email protected]:~/tmp$ curl 'https://c13.prod.playlists.ihrhls.com/1781/playlist.m3u8'
        #EXTM3U
        #EXT-X-STREAM-INF:BANDWIDTH=49000,CODECS="mp4a.40.5"
        https://c13.prod.playlists.ihrhls.com:443/1781/playlist.m3u8?listeningSessionID=5a2f3a4d999cee15_1450234_m4TK3mAw__0000000JYJB&downloadSessionID=0
        Where as if you look a the web player, it gets much more data in the m3u8 file.
        Code:
        [email protected]:~/tmp$ curl 'https://c13.prod.playlists.ihrhls.com/1781/playlist.m3u8?listeningSessionID=5a2f3a4d999cee15_1449282_W3dgrdta__0000000XQHB&downloadSessionID=0&at=0&clientType=web&fb_broadcast=0&init_id=8169&modTime=1514493833507&pname=OrganicWeb&profileid=390169794&birthYear=null&territory=US&host=webapp.US&listenerId=1499618675991_72232&uid=1499618675631&age=null&gender=null&amsparams=playerid%3AiHeartRadioWebPlayer%3Bskey%3A1514493833&terminalid=159&awparams=g%3Anull%3Bn%3Anull%3BcompanionAds%3Atrue&playedFrom=303&devicename=web-desktop'
        #EXTM3U
        #EXT-X-TARGETDURATION:11
        #EXT-X-MEDIA-SEQUENCE:1
        #EXTINF:10,title="Treasure",artist="Bruno Mars",url="song_spot=\"M\" MediaBaseId=\"1917138\" itunesTrackId=\"0\" amgTrackId=\"-1\" amgArtistId=\"0\" TAID=\"337578\" TPID=\"20634088\" cartcutId=\"6010447001\" amgArtworkURL=\"http://assets.iheart.com/images/1080/MI0003501559\" length=\"00:02:10\" unsID=\"-1\""
        http://c13hlsmaster103.ihrprod.net:80/1781/eVByy5eLm92-151449456-10031.aac
        #EXTINF:10,title="Treasure",artist="Bruno Mars",url="song_spot=\"M\" MediaBaseId=\"1917138\" itunesTrackId=\"0\" amgTrackId=\"-1\" amgArtistId=\"0\" TAID=\"337578\" TPID=\"20634088\" cartcutId=\"6010447001\" amgArtworkURL=\"http://assets.iheart.com/images/1080/MI0003501559\" length=\"00:02:10\" unsID=\"-1\""
        http://c13hlsmaster103.ihrprod.net:80/1781/xitkVve13I-151449457-9984.aac
        #EXTINF:10,title="Treasure",artist="Bruno Mars",url="song_spot=\"M\" MediaBaseId=\"1917138\" itunesTrackId=\"0\" amgTrackId=\"-1\" amgArtistId=\"0\" TAID=\"337578\" TPID=\"20634088\" cartcutId=\"6010447001\" amgArtworkURL=\"http://assets.iheart.com/images/1080/MI0003501559\" length=\"00:02:10\" unsID=\"-1\""
        https://cdn-chunks.prod.ihrhls.com/1781/dl1cEbjC1Yb-151449458-9984.aac
        [email protected]:~/tmp$
        I pulled this link from the web player, and while it was still valid, I loaded that in to LMS, and that hls stream plays stable.
        piCorePlayer a small player for the Raspberry Pi in RAM.
        Homepage: https://www.picoreplayer.org

        Please donate if you like the piCorePlayer

        Comment


          #5
          Originally posted by paul- View Post
          Couple of thoughts.
          • The couple of searches I did worked fine.
          • Is there anyway to pull the artwork out of the stream from the HLS data?
          • HLS streams are sometimes interrupted, like it is not looking ahead far or often enough. More info below
          This plugin has nothing to do with HLS. The plugin is just to do with finding the URLs for a iHeart station. It also loads the artwork associated with the URLs. The subsequent display of artwork, metadata is dependent on the LMS implementation of the playing stream format - not this plugin.

          I don't want this thread sidetracked discussing stream format such as HLS, STW or Flash and LMS implementations..

          The implementation of HLS would be best handled by a new native HLS plugin. There is a minimal version in the BBCiPlayer plugin but it is sufficient for BBC. HLS has many versions and AFAICT they are not documented. If someone chose to implement a full HLS plugin, it would be reasonable amount of work and could be discussed in a different thread. HLS is chunked http - where the m3u8 "file" is refreshed with new URLs regularly (e.g. every 6 secs) and the audio sytream ios made up of small http files of about 6 secs durations. The playHLS plugin offloads the implementation by using ffmpeg. The BBCiPlayer Perl implementation of HLS exposed "shortcomings" within LMS resulting in poor playback on some OSs.
          Last edited by bpa; 2017-12-28, 21:22.

          Comment


            #6
            To clarify the URLs that iHeart supplies that the plugin puts into a playlist. The follow is one station entry - the "streams" array is the one of interest.

            Code:
                {
                  "id": 1781,
                  "score": 0,
                  "name": "MIX 107.7",
                  "responseType": "LIVE",
                  "description": "Dayton's Variety Station",
                  "band": "FM",
                  "callLetters": "WMMX-FM",
                  "logo": "http:\/\/i.iheart.com\/v3\/re\/assets\/images\/8c5f9c8e-6dea-4bfc-88fa-e9249bf07ea3.png",
                  "freq": "107.7",
                  "cume": 113700,
                  "countries": "US",
                  "streams": {
                    "hls_stream": "http:\/\/c13.prod.playlists.ihrhls.com\/1781\/playlist.m3u8",
                    "shoutcast_stream": "http:\/\/c13icyelb.prod.playlists.ihrhls.com\/1781_icy",
                    "secure_rtmp_stream": "rtmp:\/\/cp20022.live.edgefcs.net\/live\/[email protected]",
                    "secure_hls_stream": "https:\/\/c13.prod.playlists.ihrhls.com\/1781\/playlist.m3u8",
                    "secure_shoutcast_stream": "https:\/\/c13icy.prod.playlists.ihrhls.com\/1781_icy"
                  },
                  "isActive": true,
                  "modified": "1503157180427",
                  "markets": [
                    {
                      "name": "DAYTON-OH",
                      "marketId": "171",
                      "sortIndex": 2,
                      "city": "Dayton",
                      "stateId": 41,
                      "stateAbbreviation": "OH",
                      "cityId": 171,
                      "country": "US",
                      "countryId": 1,
                      "primary": true,
                      "origin": true
                    }
                  ],
                  "genres": [
                    {
                      "id": 8,
                      "name": "Mix & Variety",
                      "sortIndex": 60,
                      "primary": true
                    }
                  ],
                  "esid": "1334",
                  "feeds": {
                    "site_id": "1898",
                    "feed": "www.iheart.com\/live\/1781\/"
                  },
                  "format": "ACHOTMODERN",
                  "provider": "Clear Channel",
                  "rds": "WMMX-FM Dayton",
                  "website": "www.mix1077.com",
                  "social": {
                    "twitter": "mix1077",
                    "facebook": "mix1077"
                  },
                  "adswizz": {
                    "publisher_id": "7991",
                    "adswizzHost": "false",
                    "enableAdswizzTargeting": "false"
                  },
                  "adswizzZones": {
                    "audio-fill-zone": "36998",
                    "audio-zone": "37000",
                    "optimized-audio-fill-zone": "37001",
                    "audio-exchange-zone": "36999",
                    "display-zone": "37002"
                  },
                  "callLetterAlias": "WMMX-FM",
                  "callLetterRoyalty": "WMMX-FM",
                  "fccFacilityId": "1904",
                  "rdsPiCode": "15A7"
                }
            Last edited by bpa; 2017-12-29, 12:19. Reason: edited to supply WMMX-FM details (1781)

            Comment


              #7
              Well as long as they keep the ICY streams going, it’s no big deal. I just assumed they would be dropping them.

              Thanks for putting this together.
              piCorePlayer a small player for the Raspberry Pi in RAM.
              Homepage: https://www.picoreplayer.org

              Please donate if you like the piCorePlayer

              Comment


                #8
                Originally posted by paul- View Post
                Well as long as they keep the ICY streams going, it’s no big deal. I just assumed they would be dropping them.
                I cannot play iHeart stream from web site or apps but I can play many stations (but not all) using URL directly so the main purpose of the plugin is providing simple access.

                Shoutcast and possibly pls are usually there for legacy internet radio devices who do not support HLS.

                I'd expect HLS is the basis for the iHeart closed future. The additional metdata info on EXTINF lines are iHeart specific. I think the gaps in m3u8 playback are there to discourage the use of non iHeart players such as ffmpeg as I get the same gaps with VLC with the "vanilla" m3u8 URL

                If there was demand/need I might see oif the BBCiPlayer HLS can be modified to play iHeart streams but at the moment with only 11 downloads - I doubt it.

                Comment


                  #9
                  I suspect you are right on the modified HLS, ffmpeg 2.8 would work okay, but have drop outs. 3.4 would only play the first set of files and then error out. Other web based HLS streamers seem to play the stream okay. Wish my perl(Plugin) skills were better to play with it.
                  piCorePlayer a small player for the Raspberry Pi in RAM.
                  Homepage: https://www.picoreplayer.org

                  Please donate if you like the piCorePlayer

                  Comment


                    #10
                    Originally posted by paul- View Post
                    I suspect you are right on the modified HLS, ffmpeg 2.8 would work okay, but have drop outs. 3.4 would only play the first set of files and then error out. Other web based HLS streamers seem to play the stream okay. Wish my perl(Plugin) skills were better to play with it.
                    Which web based players ? It may help if they are in Javascript - the iHeart one is a Flash based player.

                    I suspect the gaps are to allow ad insertion and streaming is in conjunction with adswizz (see http://www.adswizz.com/clear-channel...e-its-digital/ )

                    Comment


                      #11
                      Yes, they are flashed based (hlsplayer.net was one). The gaps I'm talking about are during the middle of the song, not really a gap but like the stream pauses for a while and then restarts in place. Nothing unusual in the ffmpeg debug output when this happens.
                      piCorePlayer a small player for the Raspberry Pi in RAM.
                      Homepage: https://www.picoreplayer.org

                      Please donate if you like the piCorePlayer

                      Comment


                        #12
                        Originally posted by paul- View Post
                        Yes, they are flashed based (hlsplayer.net was one). The gaps I'm talking about are during the middle of the song, not really a gap but like the stream pauses for a while and then restarts in place. Nothing unusual in the ffmpeg debug output when this happens.
                        I also heard the gaps in the middle and after playing for a long time I got two ads interleaved - something went badly wrong. When played with VLC and enabling message window to DEBUG - "underflow" and other errors (ADTS multiframe errors) occur. It's possible the stream is "stealing" time between segments broadcast to allow for ad insertion later.

                        There have been a few post on ffmpeg about audio gaps - noting this problem but they seem to resolve it.

                        Comment


                          #13
                          Thank you for a fabulous plugin! It's just what I've been hoping for and it works great!

                          Comment


                            #14
                            Thank you!

                            Many thanks for submitting this. iHeart seems to be gobbling up more and more stations. Just recently I lost two that I frequently listen to. This plugin solved my problem.

                            My previous solution to the issue was to run the station stream on a computer, then use the WaveInput plugin to listen on my Squeezebox players. This iHeart plugin is much cleaner.

                            Comment


                              #15
                              Many thanks for this.

                              I got an error 503 bad gateway when I first tried it yesterday, but it's working fine now. For my stations all seem to work initially but the HLS and Secure HLS have breaks every 30 - 60 seconds. The station artwork is displayed on my controller display but reverts to the antenna picture sometimes
                              This on my QNAP which is my main music server.
                              I have some old SB2 players - it works fine on that also (not HLS), and displays the track correctly. I have some old SLIMP3's and will try one of them later.

                              On the Odroids runing MAX2PLAY I cannot play the HLS streams. Maybe that's an FFMPEG thing - I do have your PLAYHLS plugin installed but I do not think I copied FFMPEG modules in (do I have to?)

                              Anyway, for now, I am more than happy. 11 downloads? Give it time...

                              This is great example of the power of the Squeezebox system. How many 15 year old streaming music devices can play iHeart radio streams? Sadly, this power is also what killed it because it's hard to force people to keep buying expensive new players.
                              3 of every player ever sold back to SLIMP3 (missed Booms)

                              Comment

                              Working...
                              X