OpenWrt Forum Archive

Topic: Yet another Internet radio

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

This project is another Internet radio, but (of course) IMHO is the best one smile

It is built using a TPLink MR3020 with extroot, usb sound card and usb hub, gstreamer is used to play the streams.
Some good things are "imported" from other free projects, and also some original ideas are there, if you do some digging (after all, there is only a web server and a few other files involved). I think you'll like it.

What makes it different:
- it has a fairly complete and easy to use web “remote control” (see bellow), so you can control it entirely from your smartphone/laptop, including connecting to another access-point (think mobility), adding/removing streams and playlists (pls, m3u, xsfp)  from the interface, etc
- it can also be controlled without web access from the physical button (basic control only, using the physical button available on the router – next radio station, mute, reboot)
- information about currently playing song are extracted from the stream (every 3 seconds)
- knows all popular radio streaming formats (many projects on the Internet understand only mp3 streams, whether or not it is specified by the authors)
Link
https://yunofun.wordpress.com/yet-anoth … radio-box/
https://github.com/c2sandu/webradio/

I'll deliver a step by step guide as soon as I have more time.

Enjoy smile

Radio

Version 2 is out, now with installer script!

The changes are not spectacular at interface level, but the main change is the addition of the installer script. I think this is better and easier than the promised step-by-step guide smile

The script installs the prerequisites - kmod-usb-audio kmod-sound-core alsa-utils gstreamer gstreamer-utils and so on - then downloads web interface files from Github and installs them in /www (pay attention that it overwrites existing files in /www). In this way you are ready to go in minutes.

https://yunofun.wordpress.com/2015/11/1 … er-script/

You need to have a functional extroot filesystem (in order to have enough room for the needed packages). It should work on all routers provided that it has a functional extroot filesystem and of course USB audio hardware.

If you are familiar with Easy Extroot, the radio installer script is included by default in Easy Extroot v2 - /etc/init.d/radio

https://yunofun.files.wordpress.com/2015/11/radio.png

https://yunofun.files.wordpress.com/2015/11/install.jpg

Have fun! smile

A nice project, but I wouldn't even touch it, ATM. If I may make some suggestions. You should improve file structure in such a way that its installation won't over write any existing files, except to amend / remove during installation / removal procedures, respectively.

As stated above, only files in /www are overwritten (the web interface), if having the same name (index.html and index.cgi are probable replaced if they exist). Of course, you cannot have a functional web interface if copying only partially the web files!

Beside those files in /www, no other files are overwritten. Only rc.local is appended with a command to start the player at startup.

Also, the scripts informs the user that it overwrites files in the /www directory (see above) and the whole script is easy to read so you can see what it does behind the scenes.

Anyway, thanks a lot for the feedback, I'll think about some improvements based on your comment.

Hint:
You might use dnsmasq-option: local=/radio/
And modify /www/index.html to check for domain "radio", to redirect to your files.
Like this in /www/index.html:
<BODY>
<script type="text/javascript">
var currentLoc = window.location;
if (currentLoc == "http://control.radio/")
        window.location='radiocontrol.php';
else if (currentLoc == "http://control.radio")
        window.location='radiocontrol.php';
</script>

Then user can browse to "control.radio", radiocontrol.php is started, and you do not interfere with standard index.html.

The discussion might have continued from here.