PirateBox Radio... smoking smiley

Posted by drhitchcock 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
PirateBox Radio... smoking smiley
May 11, 2012 02:20PM
So...

I run an internet radio station via Shoutcast streaming codecs and I was wondering if anyone out there knows if it might be possible to stream via a a TL-MR3020 with PirateBox installed? From my very limited knowledge I would say that it's just a matter of doing some port forwarding. I use NIcecast on Mac OSX and that has a local server mode which puts out either an automatically assigned IP and port or a manual one.

Anyone out there know of a solution? I reckon it's totally doable winking smiley

Peace,
Dr H
Re: PirateBox Radio... smoking smiley
May 11, 2012 03:21PM
drhitchcock,
Shoutcast requires internet to stream. The Piratebox is an "Off Line" device...
I suppose you could put songs on the pirate box for people to swap or play over wifi connection. (though it would probably be painfully slow)

nothing to see here, no longer here.
Re: PirateBox Radio... smoking smiley
May 11, 2012 04:54PM
Well if Shoutcast server is up on the TL-MR3020 there shouldn't be any problem.

The biggest question is "can Shoutcast be installed on openwrt ?"

I personally don't have the answer, but some people might have ask themselves this question.
Re: PirateBox Radio... smoking smiley
May 11, 2012 05:41PM
It would hardly be worth it. The MR3020 is not device with a lot of resources for processing and or storage.

nothing to see here, no longer here.
Re: PirateBox Radio... smoking smiley
May 12, 2012 04:50AM
You can stream shoutcast over a local network.

If there was enough processing power to stream how would you got about port forwarding? You can host the shoutcast server on a computer connected to the box.
Re: PirateBox Radio... smoking smiley
May 12, 2012 03:32PM
you may install the server on the box with taking some effort in a modified package or with some stuff around the install.
The storage on the MR3020 is very limited and the CPU power too sad smiley

Matthias
Re: PirateBox Radio... smoking smiley
May 12, 2012 09:33PM
Isn't there a way to install modify OpenWRT to boot from the USB key just like we do when we try a Linux distro with a live USB ? That would solve the limited space problem...
Re: PirateBox Radio... smoking smiley
May 13, 2012 04:28AM
I cracked it! Pirate Radio on the PirateBox!!! smileys with beer

So this is how you do it, Mac OSX only unfortunately...

1. Connect to your PirateBox via wifi.
2. Open the program Nicecast or any other program that can host a local shoutcast stream server
3. Set server to 'Built in server'
4. Set the network address and port (aka IP) to the same IP as your computer. Mine was 192.168.1.27 port 8080 or 192.168.1.27:8080
5. Choose the source for your stream, I just used iTunes.
6. Hit start broadcast.
7. To tune in navigate your browser to the network address and port e.g. 192.168.1.27:8080 and it'll open in your devices media player. Some devices may need specific software. I think Android does.
8. Alternatively you can create an .m3u file and add it to your PBs files then all you have to do is open that file.

Any questions just ask smiling smiley

Peace!
Dr H
Re: PirateBox Radio... smoking smiley
May 13, 2012 07:20AM
but then it is not running on the Router itself, right?

Hosting additional stuff on servers in piratebox.lan is always possible smiling smiley
Re: PirateBox Radio... smoking smiley
May 13, 2012 07:44AM
Totally, it would be cool if it could be hosted off the actual device.

I guess you could use an icecast server. It could potentially play the mp3s uploaded to the flash drive in order or shuffled.

You could make it an option when you install it like how you already have the option to install file sharing or file sharing and chat.

Although it's beyond my skill level. Is there anyone in the forum keen to give it a go? I'd be happy to help where I can.
Re: PirateBox Radio... smoking smiley
May 21, 2012 03:26PM
Hey I really like the idea of streaming media over PirateBox, I don't know how super practical it is over the router version, but give me PM and we can see if we can set up a version that can run on laptops.
Re: PirateBox Radio... smoking smiley
May 29, 2012 12:39AM
Happened upon this video of the MR3020 running madplay...
Re: PirateBox Radio... smoking smiley
May 29, 2012 02:14AM
Cheers Darts! Good find.

TerrorByte: I'm gonna have a geek out tonight and see if I can get this going. I'll PM you with my findings.

I've been trying to get a shoutcast encoder and server running on my wee asus netbook running crunchbang and ubuntu but with no luck. I think crunchbang has issues with the sound encoders and my netbook gets closer with ubuntu but is struggling running the OS and everything else. So MadPlay could be a good option.
Re: PirateBox Radio... smoking smiley
May 29, 2012 12:46PM
Made some more progress tonight. I got an icecast server and an encoder called ezstream running from command line in crunchbang linux / Debian. Now that I know how that works I will start trying it in a PB. Thinking about getting a tl-mr3220 so it's got a bit more range. Exciting!
Re: PirateBox Radio... smoking smiley
May 29, 2012 01:21PM
You should have a look at my mkPirateBox-Forban repository on github for an example of integration of other packages to small-disc OpenWRT.
Re: PirateBox Radio... smoking smiley
June 01, 2014 05:23PM
Thought I should revive this old thread since I've spent a couple of hours hacking on my old PirateBox (with a fresh copy of v.1.0! Looking good!) instead of reading for my exams.

I wanted to turn my little box into a local Pirate Radio station which will continuously play the music uploaded to it. So far I've managed to get icecast and ices running and my box is now streaming .ogg files!

I can post detailed instructions in a couple of days but if someone wants to have a go at it without anyone holding their hand, I can recommend this tutorial which is what I followed to make icecast and ices communicate properly. Be warned though. There's quite a few packages that needs to be installed, and a lot of dependencies to be resolved so it's probably gonna take you a couple of hours if you just go ahead and try to figure it out for yourself.

--- Edit ---
Forgot to mention... this is on a WR703N so I guess it will work on all OpenWRT devices (going to test it on the MR3020 when writing the tutorial). For you RasPirate Pi and Lap-Pirate (yes, I mean laptop PirateBox) users, I guess it's a lot more straight forward since you after all have a full Linux install to play around in.



Edited 1 time(s). Last edit at 06/01/2014 06:25PM by caretu.
Re: PirateBox Radio... smoking smiley
June 01, 2014 05:52PM
This sounds cool caretu, definitely post some instructions here if you can!
Re: PirateBox Radio... smoking smiley
June 04, 2014 06:25PM
Ok, now I've tested the setup on both my WR703N and MR3020 and so far everything works perfectly.

Head on over to my GitHub page for a tutorial and the packages that you'll need. There you'll also find a very basic script that sets everything up for you, in case you don't want to go through the tutorial and just want to try it out in a flash. Please read the information marked as important.
Re: PirateBox Radio... smoking smiley
June 05, 2014 04:52PM
Thanks for posting this tutorial caretu, I've added info and links on our PirateBox OpenWrt Mods page.

Matthias and I will review it and we'll consider adding this feature to our next release...



Edited 1 time(s). Last edit at 06/06/2014 03:33AM by darts.
Re: PirateBox Radio... smoking smiley
June 06, 2014 07:41AM
Hi caretu,
I had a short review on your instructions. It seems you are refreshing the kernel with a trunk version.. and copy it to the USB-extend root... ehm, why?
which package is pulling those dependencies? Are they really necessary?
What about using - at least - the latest stable release with AA - OpenWRT?

Is the log folder (itself) generated dynamically ?
Wouldn't you need to create it, would you?


Beside those questions, a nice mod, which we even can provide as an auto-install-addon-version winking smiley (or as a stand-alone solution)

Matthias
Re: PirateBox Radio... smoking smiley
June 06, 2014 02:07PM
Hi, Matthias. Thanks for reviewing my little hack smiling smiley

When it comes to using trunk instead of the stable release... that's just me following a link to the openwrt downloads page and not paying attention to which version I was downloading. The package that required a kernel refresh was kmod-sound-core, but that's a result of using the trunk version.

I've just finished trying it out with the packages from the stable branch and it all works... without any need for a kernel refresh. The repo has been updated with packages from here. I've also included a dependency tree for those interested.

As of installing everything to extend root... that's because there's not enough space on the device to install everything, so instead of deciding what to install where I just decided to install everything to ext. Advice on where to install the different packages would be appreciated smiling smiley

The log folder is not dynamically generated so yes, you would need to create it if you're following along with the tutorial instead of downloading and installing the provided zip-file, which already contains the log folder. The tutorial has been updated.
Re: PirateBox Radio... smoking smiley
June 06, 2014 02:29PM
Ok, thanks for fixing the trunk thing. smiling smiley

Can you find out which package is the reason for: kmod-sound-core ?

Matthias
Re: PirateBox Radio... smoking smiley
June 06, 2014 03:11PM
kmod-sound-core is required by alsa-lib, which again is required by ices. I've listed all the dependencies in a tree below:

icecast
 |
  ----- libcurl
  ----- libxslt

ices
 |
  ----- libshout
 |       |
 |        ----- libspeex
 |        ----- libtheora
 |        ----- libvorbisidec
 |
  ----- alsa-lib
         |
          ----- kmod-sound-core
         |       |
         |        ----- kmod-input-core
         |
          ----- librt


Re: PirateBox Radio... smoking smiley
June 06, 2014 03:44PM
Interesting, thank you!
Re: PirateBox Radio... smoking smiley
June 13, 2014 06:53AM
Hi! Can anyone be kind enough to explain or make a video demonstrating how this works? Really interested in this.

Are the Ices and IceGenerator also installed into the PB? If so, wouldn't that make any connected client a DJ as well?

Thank you.
Re: PirateBox Radio... smoking smiley
June 14, 2014 12:53AM
Have you seen the tutorial? Read the important information at the beginning, download the zip-file and extract it to the USB-stick you use with your PB, then connect the USB to the PB and power it up. Follow the instructions in the "Using the setup script" section, and then move on to "Add some tunes".

If you follow along with the tutorial and keep the default settings, you should be up and running in less than 5 minutes. smiling smiley

Ices and Icecast will be installed to the USB-stick, as there's not enough space on the router itself for all that's needed. Clients that connect to the PB will have no direct control over the music played, since you have to be logged in to the box in order to start, stop or configure the services. Anyone who connects can upload music though, and if the music is in .ogg format you can add it to the playlist. I've been meaning to write a little script that will periodically check the Shared folder for any new music and automatically add it to the playlist, but for now you have to do it manually.

If you have any problems getting it to work, just post your questions here or send me a PM.
Re: PirateBox Radio... smoking smiley
June 14, 2014 06:38AM
Thank you! I did get that part about setting up and installing the Ices and Icecast on the USB of the PB.

My mistake probably was in thinking that we needed an Icecast-specific program (like a codec) installed on the client's device first before getting the media player to listen/control the playlist.

Guess I'm really just new to internet radio hosting in general, hence the question. I do like the fact that clients can upload .oggs to be included in the playlist. Gives you a feel of what they want to hear.

So in comparison, is the Control of the Icecast Playlist just like the Admin controls of the PB Kareha board where only authorized individuals can access the main commands?

Thank you so much!
Re: PirateBox Radio... smoking smiley
June 15, 2014 08:17PM
Aha. No, any program capable of playing a .ogg network stream should be able to connect to the stream. I've tried VLC, mplayer, ogg123 and Firefox in Linux and on Android and they've all worked perfectly.

I've never used the Kareha board so I don't know how it compares to Icecast. I'm just going by the assumption that the only person capable of modifying files stored on the PB is the root-user, so in order to edit the configuration files for Icecast and Ices you need to be logged in as root. The Icecast service needs to be run by the user "icecast", but it's not possible to log in as this user, so again, only root can start and stop the services.
Re: PirateBox Radio... smoking smiley
June 19, 2014 03:30PM
Hi All, Fyi I've moved this thread to our new Mods and Themes thread.
Re: PirateBox Radio... smoking smiley
September 05, 2014 06:16PM
Hello !
Great hack really !

I have tested it on my MR3020 with the last piratebox 1.0.

Actually, when i run the setup.sh, no error appears. all it's ok, it says ; installing in ext ..

A create the playlist, like in the tuto, and i put some music with the commands etc ...

after run :
icecast -b -c icecast.xml
ices ices.xml


When i try to [192.168.1.1]
it says The file you requested could not be found

All the config in ice.xml are ok

I have cheked the file icecast.xml and in are :
<basedir>/opt/icecast/latest/share/icecast</basedir>
<webroot>/opt/icecast/latest/share/icecast/web</webroot>

But on my piratebox, /opt/icecast/ doesnt exist

I have tested to install manually all packages, but same problem.

Thanks in advance smiling smiley