Record Live Streaming Radio to MP3


Hits: 621  

Sometime you want to record Live Radio Stream to MP3 file, you can find many online linux tools for recording radio stream to server and then download to your local computer.

You can use Linux “wget” or “curl”

CURL

# curl -sS -o stream.mp3 –max-time 150 http://Radio-Server:Port/stream
Bitrate: 128 kb/s [it will make approx 2MB MP3 file]

# curl -sS -o stream.mp3 –max-time 150 http://Radio-Server:Port/stream
Bitrate: 64 kb/s [it will make approx 1MB MP3 file]

FFMPEG

# ffmpeg -y -i http://Radio-Server:Port/stream stream.mp3

# ffmpeg -i http://Radio-Server:Port/stream -t 00:00:40 -acodec copy stream.mp3
[It will record MP3 file stream.mp3 of duration of 40 sec with same Radio Stream Codec Info & Bitrate]

MPLAYER & LAME

# mplayer ‘http://Radio-Server:Port/stream’ -endpos ’00:01:00′ -vo null -ao pcm:waveheader:file=stream.wav &> /dev/null
# lame stream.wav stream.mp3 &> /dev/null

WGET

# wget -O stream.mp3 “http://Radio-Server:Port/stream”

Live video stream event for online Temple or Church


Hits: 5269  

Wowza / Red5 Streaming Live Video with Flash Media Live Encoder

Live Video Stream will be coming
Wowza Live Stream Countdown

Requirements

– A computer running Windows or Apple operating system
– Software “Flash Media Live Encoder (Adobe)”
– Streaming Server (Wowza/Red5/FMS)
– Video input that is recognized by the operating system (i.e. USB camera)
– Video player: VLC or Web Player (JWplayer/Flowplayer/OSMPlayer)

1) Download the free Flash Media Live Encoder

2) Install the Flash Media Live Encoder

3) In the program
– Preset choose bandwidth
– Device Select your video/audio source device
– Choose Video Format H.264
– Choose Audio Format MP3

Enter Stream to Flash Media Server streaming data from your provider

FMS URL: rtmp://[Media-Server-IP-Address]:[Port]/live
Stream: livestream

FMLE

4) Click on “connect”
You will get a pop-up window, enter your username and password you of your received media streaming provider.

5) Click “start” and that’s all!

FMLE

6) Open stream link to your video player that has received.
rtmp://[Media-Server-IP-Address]:[Port]/live/livestream

Links
http://www.adobe.com/products/flash-media-encoder.html
http://www.jwplayer.com/wizard/

Get more help to setup Live video stream event on mobiles (iOS/Androids) using Wowza or Red5 Contact Us

phpMyStream


Hits: 4940  

phpMyStream is media re-stream panel, it use FFmpeg & rtmpdump linux utilities to take source as input then publish to other server like Red5 or Wowza.

phpMyStream

phpMyStream Server Requirement

– Web Server With Apache, PHP, MySQL
– RTMPDump
– FFmpeg
– RTMP Server (Wowza, Red5, Nginx)

phpMyStream-add-stream

RTMPDump Help

FFmpeg Help

phpMyStream-settings

Make Server for phpMyStream

Install rtmpdump
# yum install gcc
# yum install openssl-devel
# wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.2e.tar.gz
# tar xvf rtmpdump-2.2e.tar.gz
# cd rtmpdump-2.2e
# make & make install

Install FFmpeg
# yum install ffmpeg ffmpeg-devel ffmpeg-libpostproc opencore-amr

Re-Stream Commands

# rtmpdump –live -r “[Source-Input-RTMP]” -p “http://domain.tv/” -W “http://static.domain.tv/player.swf” -q | ffmpeg -i – -re -isync -acodec copy -vcodec copy -f flv “[Destination-Output-RTMP]”

# rtmpdump -r “[Source-Input-RTMP]” -p “http://www.domain.co/” -T “[Token]” -o- | ffmpeg -re -i – -isync -acodec copy -vcodec copy -f flv “[Destination-Output-RTMP]”

# ffmpeg -re -i “[Source-Input-RTMP]” -y -vcodec libx264 -acodec aac -strict -2 -ar 44100 -f flv “[Destination-Output-RTMP]”

phpMyStream set scheduled task (per minute) to process every stream that need restreaming…

* * * * * curl -s -o /dev/null http://Server-IP/phpMyStream/cron.php

Shoutcast V2 aacPlus AAC+ Player


Hits: 6394  

Shoutcast AAC+ V2

MP3 Radio Streams (Shoutcast/Icecast) are best for Radio Streaming with best bit-rate, but MP3 Streaming need license to broadcast source streams. Radio MP3 music globally play on all devices & platforms. MP3 live radio streaming easily work over HTML5/HTTP.

Whereas AAC+ live radio streaming work on over RTMP. It need flash streaming via RTMP.

Shoutcast V2 aacPlus AAC+ Stream in iOS (iPhone/iPod/iPad) using HTML5 Audio Player

<audio id=”radioaac” src=”http://radio.server.com:port/AACStream.m3u” controls=”true” style=”width:200px; height:50px;”></audio>

Note: AAC+ live streaming over RTMP, and MP3 live streaming over HTML5/HTTP.

Radio Song Album Artwork Cover by YouTube


Hits: 3909  

An album cover is the front / other side of the packaging of a commercially released audio recording product, or album.

You can find online APIs or Websites where artwork available

– Amazon
– LastFM
– Soundcloud
– Apple iTune
– Google Play
– Gracenote
– Free Music Archive

And many more ….

But YouTube is the best source where you can get Album / Song Cover Image for every Title

YouTube provide gdata API to search songs as video title to get image

Deprecated Features for YouTube API v2.0

YouTube Data API (v3)

http://gdata.youtube.com/feeds/base/videos?q=title:<search term>

youtube-artwork.php

<?php
$q = isset($_REQUEST['q'])?$_REQUEST['q']:"";

//thumbnail -> sqDefault, hqDefault

// orderby -> title, relevance, published

?>
 
 
<div id="videos"></div>
 
<!-- Include the latest jQuery library -->
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
 
<script type="text/javascript">

jQuery.getJSON('https://gdata.youtube.com/feeds/api/videos?q=<?php echo $q; ?>&max-results=1&v=2&alt=jsonc&orderby=relevance', function(data) {
    var output="<ul>";
    for (var i in data.data.items) {
        
		output+="<li><img src='" + data.data.items[i].thumbnail.hqDefault + "' /></li>";
		output+="<li>" + data.data.items[i].title + "</li>";
		
    }
	var output="</ul>";
	
    document.getElementById("videos").innerHTML=output;
	
	});

</script>

How you can get cover image?

http://www.domain.com/youtube-artwork.php?q=Ek%20Villain%20-%20Galliyan

song album artwork

PHP Get Radio Stream Type Version


Hits: 3472  

Live Audio Streaming, Internet Radio Player

Shoutcast1 Stream: http://shoutcast-server:port/;audio.mp3
Shoutcast2 Stream: http://shoutcast-server:port/streamname;audio.mp3
Icecast2 Stream: http://icecast-server:port/streamname

Shoutcast server stream need “;” OR “;audio.mp3” at end of stream URL, so change accordingly

 

<?php

function radioStreamType($stream)
{

$pp = parse_url($stream);
$type = strstr($pp[‘path’], ‘;audio.mp3’);

if($type==’;audio.mp3′)
{
if($pp[‘path’]==”/;audio.mp3″ || $pp[‘path’]==”;audio.mp3″) return “shoutcast1”;
return “shoutcast2”;
}
else
{
return “icecast”;
}
}

?>

 

shoutcast-version-1

radioStreamType(“http://shoutcast-server:port/;audio.mp3”);

shoutcast-version-2

radioStreamType(“http://shoutcast-server:port/streamname;audio.mp3”);

icecast

radioStreamType(“http://icecast-server:port/streamname”);

ICECAST SHOUTCAST METADATA

Re Stream Radio Shoutcast / Icecast using Node JS


Hits: 6017  

Re-stream Radio (Shoutcast/Icecast) Stream using Node.JS and get Metadata current playing song title… Use port forwarding to hide real shoutcast IP …. Avoid PHP script to damage Server with too many calls on radio server

Start Restream

> node radio.js

node.js>node radio.js
Server running at http://192.168.1.4:8007

Radio Stream connected!
{ ‘icy-notice1’: ‘<BR>This stream requires <a href=”http’,
‘icy-notice2’: ‘SHOUTcast Distributed Network Audio Server/Linux v1.9.8<BR>’,
‘icy-name’: ‘Radio HSL – Hit Hai Toh Bajega!’,
‘icy-genre’: ‘Indian Hindi Top40’,
‘icy-url’: ‘http’,
‘content-type’: ‘audio/mpeg’,
‘icy-pub’: ‘1’,
‘icy-metaint’: ‘32768’,
‘icy-br’: ’64’ }
StreamTitle=’Bullett Raja – Tamanche Pe Disco [1e92]’;StreamUrl=”;

Get MetaData

> node radio-metadata.js

node.js>node radio-metadata.js
Server listening on port 8079
Radio Stream connected!
StreamTitle=’Bullett Raja – Tamanche Pe Disco [1e92]’;StreamUrl=”;

Output in browser:
“StreamTitle=’Bullett Raja – Tamanche Pe Disco [1e92]’;StreamUrl=”;\u0000\u0000\u0000\u0000\u0000″

Install Centova Cast


Hits: 4410  

Centova Cast is an internet radio stream hosting control panel. It is used for hosting radio streams and manage Radio Server like ShoutCast and IceCast. You can manage Auto DJ using Centova Cast v2 Auto DJ System plus Server Control Panel.

Centova Cast Admin

System Requirements for Centova Cast: You can install it on any Linux-based servers.

Operating system: CentOS 4/5/6, RHEL, Debian Linux
Database server: MySQL v4.1+, v5.0, v5.1, or v5.5
Streaming server: SHOUTcast v2.0, SHOUTcast v1.9, IceCast v2.x
Streaming source: ices-cc, sc_trans v2.0, ices v2, ices v0.4, ezstream 0.5.3, sc_trans 0.4.0

# apt-get install liblwp-useragent-determined-perl libconfig-tiny-perl libnet-snmp-perl libxml-simple-perl libconfig-simple-perl libmp3lame-dev libxml2-dev

# apt-get install libxml2 libvorbis-dev libogg-dev libxslt1-dev libcurl3-gnutls libogg0 libspeex1 libtheora0 libvorbis0a libxslt1.1

# wget -O install.sh install.centova.com/LICENSEKEY
# chmod a+x ./install.sh

# ./install.sh –shoutcast-all
# /usr/local/centovacast/sbin/update –add shoutcast1
# apt-get install ia32-libs

# ./install.sh –icecast-all

Liquidsoap GStreamer


Hits: 5875  

LiquidSoap Liquidsoap is a programming language to manage audio and video source streams for Icecast Radio server.

Liquidsoap is a powerful and flexible language for describing, creating or transforming streams. It offers rich operators and library that you can be used for making Icecast Radio Server.

Now Play Your Favorite Radio FM Stream in HTML5 Player…..
Live Audio Streaming, Internet Radio Player

Features

* It can play icecast stream from files, playlists, directories or scripted playlists.
* Liquidsoap used for scheduling of source streams.
* It help to Mix sources streams.
* It allows queuing of user requests.
* It allows sound compression, normalization, echo, volume, Blank detection.
* It is useful for rewriting and inserting Metadata in Radio Stream.
* It can play live stream play files and streams like Last.fm.
* It can output to Radio Server Icecast/Shoutcast (MP3/Ogg).
* It also support Video streams generation.

You can use it to stream RTMP MP3 stream to Icecast/Shoutcast using mplayer, rtmpdump or gstreamer …

GStreamer- open source multimedia framework

GStreamer provide a rich library to manage streaming audio/video with complex audio (mixing) and video (non-linear editing) processing.

#!/usr/bin/liquidsoap
set(“log.file.path”,”logs/gs.log”)
set(“log.file”,true)
set(“log.stdout”,true)
….
….
gst = input.gstreamer.audio(pipeline=”playbin uri=rtmp://server.com/livestream.mp3″)
output.icecast(%mp3(), host = “localhost”, port = 8000, password = “xxxxxx”, mount = “gst stream”, fallible=true, gst)

Common Errors

File format problem can display ^M characters

😉 : set ff=unix and then : x in vi editor

init: security exit, root euid (user)

😉 you need to run liq file with non root user

the variable input.gstreamer.audio used here has not been previously defined

😉 Define variable “input.gstreamer.audio” .. .find here https://github.com/savonet/liquidsoap/tree/master/scripts

Stay connected for more Audio / Video Programming ….