NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
1 2 3 4 5 … 93 Next »
Windows FM Radio support in v5.

 
  • 0 Vote(s) - 0 Average
Windows FM Radio support in v5.
pkscout
Offline

Senior Member

USA
Posts: 439
Threads: 48
Joined: May 2014
#121
2023-01-29, 12:40 AM
I'm trying to get internet radio working in my Docker container with the nextradio stuff, but the zip I found doesn't have the sh files, just the batch files. I saw a mention in this thread of something on the beta forum, but I don't seem to have access to that. Is there somewhere I can get the sh files? If push comes to shove I can probably figure out what the batch file is doing and write an sh file, but I'd like to not duplicate work that has already been done.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,330
Threads: 865
Joined: May 2006
#122
2023-01-29, 01:18 AM
I never finished NextRadio for Linux given nobody wanted it before. Only SDR radio and Analog radio are working ok. Looking at what I did for Windows try this. This takes the last line when multiple lines are available.

Code:
mapfile -t radiotime < <(curl -s "http://opml.radiotime.com/Tune.ashx?id=$1&formats=mp3,aac")
ffmpeg -v panic -i "$radiotime" -acodec aac -ab 256000 -f mpegts -

Don't forget to chmod +x the file and the install script won't work in Dockers without python3

Martin
pkscout
Offline

Senior Member

USA
Posts: 439
Threads: 48
Joined: May 2014
#123
2023-01-29, 05:44 PM
(2023-01-29, 01:18 AM)mvallevand Wrote: I never finished NextRadio for Linux given nobody wanted it before.  Only SDR radio and Analog radio are working ok.  Looking at what I did for Windows try this.  This takes the last line when multiple lines are available.

Code:
mapfile -t radiotime < <(curl -s "http://opml.radiotime.com/Tune.ashx?id=$1&formats=mp3,aac")
ffmpeg -v panic -i "$radiotime" -acodec aac -ab 256000 -f mpegts -

Don't forget to chmod +x the file  and the install script won't work in Dockers without python3

Martin

Well, that was a little bit of an adventure.  I got the script to generate the Extras file on my Mac laptop with one small path change, then just did a search and replace to get the right path to the script on Docker.  That wasn't the exciting part though.  At first I had a few stations (including the one I really wanted) that wouldn't stream.  After doing some more digging, apparently some of the radio stations on RadioTime return a playlist instead of a stream URL.  I modified the script to account for that (as best I could), so it looks like this now:
Code:
mapfile -t radiotime < <(curl -s "http://opml.radiotime.com/Tune.ashx?id=$1&formats=mp3,aac")
mapfile -t playlist < <(curl -s "$radiotime")
playlisturl=${playlist[1]}
if [ "$playlisturl" = "" ];
then
    url=$radiotime
else
    if [[ $playlisturl != http* ]];
    then
        s="${playlisturl%%=*}"
        url="${playlisturl:$(( ${#s} + 1 ))}"
    else
        url = $playlisturl
    fi
fi
ffmpeg -v panic -i "$url" -acodec aac -ab 256000 -f mpegts -

It works, but if the playlist returns stray too much from what I saw (i.e. the line "[playlist]" followed by lines of urls or things that say FileX=URL), it won't work.  But it's enough for now.  We rarely actually listen to the radio, but there are a couple stations we like, so it's nice to have them hooked to NextPVR (and then into Kodi).  Plus it gave me a half day project to chew on.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,330
Threads: 865
Joined: May 2006
#124
2023-01-29, 05:48 PM
Do you have the s#### ID for that channel?

Martin
pkscout
Offline

Senior Member

USA
Posts: 439
Threads: 48
Joined: May 2014
#125
2023-01-29, 06:54 PM
(2023-01-29, 05:48 PM)mvallevand Wrote: Do you have the s#### ID for that channel?

Martin

The one that was definitely giving me an issue was S30999 (it's 102.9 WMGK which does "classic" rock that is from the 80's - which frankly hurts me a little that they call it classic rock).  I think there might have been one or maybe two others that weren't streaming during testing, but I can't remember which ones, and I didn't feel like going through every station again.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,330
Threads: 865
Joined: May 2006
#126
2023-01-29, 08:13 PM
Ok yes the streamtheworld URL's are funny that way because they have those big CDN lists. I do have another function that resolves playlist but it gets complicated and sub only support m3u8 playlists.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (13): « Previous 1 … 9 10 11 12 13
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  FM tuner support in NextPVR? Goongyae 2 288 2022-11-23, 01:22 PM
Last Post: mvallevand
  IPTV like stream from Sound Card input - FM Radio Project NumberFive 3 200 2022-11-20, 04:28 PM
Last Post: mvallevand
  IPTV Pretuning and Internet Radio mvallevand 5 2,160 2019-02-04, 12:02 AM
Last Post: mvallevand
  Problems with Windows UWP App spitefulgod 4 3,062 2016-12-15, 08:35 PM
Last Post: spitefulgod
  Any ideas about programming for Windows Firewall? bgowland 4 4,512 2014-04-10, 09:05 AM
Last Post: bgowland
  Windows Shortcuts ACTCMS 4 1,944 2012-03-24, 12:22 AM
Last Post: mvallevand
  Creating a Windows service McBainUK 8 2,434 2011-03-30, 03:29 AM
Last Post: mvallevand
  Which channel logo image formats does npvr support? bgowland 2 1,535 2011-03-06, 05:43 AM
Last Post: bgowland
  Webservice API to support Android App development Barsk 4 2,542 2010-10-19, 07:31 AM
Last Post: Barsk
  Using Windows file system shortcuts ACTCMS 0 1,413 2010-01-26, 11:45 PM
Last Post: ACTCMS

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode