Support for live radio Shoutcast streams

Vangelis forthnet northmedia1 at the.forthnet.gr
Fri Dec 19 17:34:00 PST 2014


On Sat Dec 13 05:06:52 GMT 2014, I wrote:

> I was browsing the code of your latest get_iplayer commit git-d1caff0:
> "Added support for live radio Shoutcast streams"
> (snip)
> $shoutcast_mediaset = 'http-icy-aac-lc-a';
> (snip)
> you are using ONE FIXED "shoutcast_mediaset"
> (snip)
> But THERE EXIST two more "shoutcast_mediasets":
> $shoutcast_mediaset = 'http-icy-aac-lc-b'
> (snip)
> $shoutcast_mediaset = 'http-icy-he-aacv2-a'
> (snip)
> What are your thoughts on adding support
> for these additional shoutcast_mediasets?

On Sun Dec 14 15:09:39 GMT 2014, dinkypumpkin wrote:

> I've removed the Shoutcast code.
> Too many ways the BBC could blow it up
> when they begin bringing more Shoutcast streams online

Hi :-)

 I have a vested interest in the Shoutcast code, since
the default shoutcast stream for overseas IPs (i.e.
AAC-LC at 56kbps,32kHz) is somewhat better to
both flashaaclow & hlsaaclow liveradiomodes -
the only available modes overseas, which
are both HE-AACv2 at 48kbps,44.1kHz .

 I have continued trialing the shoutcast live streams;
I can safely say, after many hours of recording these
last days, that they are very reliable and solid (connectionwise),
equal (or better) to the RTMP live ones...
The same cannot be told about the HLS live streams, which,
due to their inherent fragmented nature, do not give perfect
results: a live HLS stream is a succession of small chunks
of files that FFmpeg must concatenate in real time; I have
experienced broken connections & missed fragments
(each comes with a 10sec duration); even when all works well
during recording, when playing back the saved HLS stream
I can clearly detect the points of concatenation numerous
times during the playback (more than 20 non-perfect joints
perceived during a 1hr long stream). And this is with latest
FFmpeg 2.5.
 For now, I took it upon myself to include the two additional
"shoutcast_mediasets" to DP's code; I have attached a patch,
Shoutcast.patch, to be applied to commit git-d1caff0 of the
main script, found here:

http://git.infradead.org/get_iplayer.git/blob_plain/d1caff0e19139eba4f4e6cac826a6ebf7061e295:/get_iplayer

With the patch applied,

perl get_iplayer-gd1caff0.pl --type=liveradio --pid=bbc_radio_one -i

will show (if in UK) in the "modes" line:

modes:          default: 
flashaaclow1,flashaacstd1,hlsaacstd1,hlsaacstd2,shoutca
staaclow1,shoutcastaaclow2,shoutcastaacmed1,shoutcastaacmed2,shoutcastaacstd1,sh
outcastaacstd2

shoutcastaacstd = AAC-LC 128kbps (320 for R3), 44.1 kHz
shoutcastaacmed = AAC-LC 56kbps, 32 kHz
shoutcastaaclow = HE-AACv2 48kbps, 44.1 kHz

if overseas:

modes:          default: 
flashaaclow1,hlsaaclow1,hlsaaclow2,shoutcastaaclow1,sho
utcastaaclow2,shoutcastaacstd1,shoutcastaacstd2

shoutcastaacstd = AAC-LC 56kbps, 32 kHz
shoutcastaaclow = HE-AACv2 48kbps, 44.1 kHz

perl 
get_iplayer-gd1caff0.pl --type=liveradio --pid=bbc_radio_one --modes=shoutcastaac 
 --shoutcast-liveradio-opts="-loglevel 
info" --ffmpeg-liveradio-opts="-loglevel info" --force --stop 3600

will record 1 hour's worth of R1's shoutcast (live) stream.

Thought I'd share if anyone's interested...

Merry Xmas,
V. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Shoutcast.patch
Type: application/octet-stream
Size: 5848 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/get_iplayer/attachments/20141220/911d8cd0/attachment.obj>


More information about the get_iplayer mailing list