Re: Support for live radio Shoutcast streams
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@56kbps,32kHz) is somewhat better to both flashaaclow hlsaaclow liveradiomodes - the only available modes overseas, which are both HE-AACv2@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. Shoutcast.patch Description: Binary data ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: Support for live radio Shoutcast streams
On 13/12/2014 05:06, Vangelis forthnet wrote: I was browsing the code of your latest get_iplayer commit git-d1caff0: Added support for live radio Shoutcast streams I've removed the Shoutcast code. Too many ways the BBC could blow it up when they begin bringing more Shoutcast streams online, which is a headache I don't need. I'll probably bring it back at some point after the BBC makes its changes. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: Support for live radio Shoutcast streams
They're already available (but as AAC, not MP3), search for 'BBC AAC streams'. You need to point your player to the .pls playlist URL for each stream, the access token contained within is uniquely generated per access and has an immediate expiry. IIRC the playlist files basically link to the CDN P Q endpoints through a couple of different routes. Most stations are 128kbps AAC LC, Radio 3's also available as 320kbps. On 13 December 2014 06:03:30 Vangelis forthnet northmed...@the.forthnet.gr wrote: Now that I remembered, http://www.bbc.co.uk/blogs/internet/posts/BBC-Radio-to-stop-supporting-Windows-Media-on-December-31st We will provide a SHOUTcast mp3 stream of all our radio stations so that live radio will continue to work on internet radio devices for another year or two. This mp3 stream will be up and running before support for Windows Media is switched off. Has anyone been able to find more info on this/sniff any of those streams? Or is it still too soon? V. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Re: Support for live radio Shoutcast streams
On Sun Dec 14 23:41:56 GMT 2014, Christopher Woods wrote: They're already available (but as AAC, not MP3) Hello, Christopher. These Shoutcast AAC streams have been available (though kept semi-clandestine by the beeb) for more than three and a half years, see: http://forums.digitalspy.co.uk/showthread.php?s=0ed858cc0d2f88baedb7e055be968598t=1473061 and you can rest assured I made good use of them, both for listening and for recording (!). My impression is from reading the BBC Blog entry I referenced earlier in this thread that they are planning to issue new MP3 Shoutcast streams as a substitute for the WMA live streams - to be killed on Dec 31st - for older digital devices that still rely on them and are not compatible with the AAC codec. We'll have to wait and see what they'll do; maybe as yet another cost cutting measure they'll convert the existing Shoutcast AAC streams to Shoutcast MP3 ones (quite easy to do) and keep the higher quality AAC codec only for AppleHLS streams (already in use), AdobeHDS ones (announced for sometime in 2015) and MPEG-DASH ones (already experimented with). Cheers ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer
Support for live radio Shoutcast streams
Hello dinkypumpkin :-) I was browsing the code of your latest get_iplayer commit git-d1caff0: Added support for live radio Shoutcast streams http://git.infradead.org/get_iplayer.git/blobdiff/97967add4aaa8e3950221e70f8548a46f0ae01fb..d1caff0e19139eba4f4e6cac826a6ebf7061e295:/get_iplayer @@ -7245,11 +7251,12 @@ sub get_stream_data { (snip) + my $media_stream_shoutcast_prefix; (snip) + my ($mediaset, $mobile_mediaset, $shoutcast_mediaset); @@ -7257,10 +7264,12 @@ sub get_stream_data { (snip) + $shoutcast_mediaset = 'http-icy-aac-lc-a'; (snip) + $media_stream_shoutcast_prefix = http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/$shoutcast_mediaset/vpid/;; # $verpid @@ -7411,6 +7427,20 @@ sub get_stream_data { (snip) + # shoutcastaachigh + if ( $mattribs-{bitrate} = 192 ) { (snip) + # shoutcastaacstd + } elsif ( $mattribs-{bitrate} = 96 ) { I won't pretend I fully understand all the code in this commit, but AFAICT you are using ONE FIXED shoutcast_mediaset - as you surely know, the mediaselector/5 API (I'll call it ms5) uses geo-location; for all National Radios but Radio 3, ms5, when tried from a UK IP, returns streams which have a real bitrate of 128kbps@44.1kHz; e.g. http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/vpid/bbc_radio_one whereas Radio 3: http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/vpid/bbc_radio_three may return media bitrate=128 but the real bitrate of the stream is 320kbps@44.1kHz. (you can check the stream in an audio player - I used Winamp VLC). IIUIC, the code would declare all streams as being shoutcastaacstd. Now the situation is quite different for overseas IPs (yes, the beeb does offer Shoutcast streams internationally...); When I try the BBC Radio 1 ms5 URL above from my non-UK IP, this is what I get: media bitrate=128 encoding=aac kind=audio service=pc_stream_audio_simulcast_nonuk_a_lm_p010 type=audio/x-scplsconnection authExpires=2014-12-13T05:16:52+00:00 authExpiresOffset=6516 href=http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio1_p?s=1418434096e=1418448496h=b83f3eace614bf5e621a6cf9911e83c6; priority=5 protocol=http supplier=ll_icy/connection authExpires=2014-12-13T05:06:13+00:00 authExpiresOffset=5877 href=http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio1_q?s=1418434096e=1418448496h=2fdb80f2ac297da7bd0d147aa032eb6f; priority=10 protocol=http supplier=ll_icy2//media Again, media bitrate=128 is MISLEADING, since the Int'l shoutcast streams for all National Radios (Radio 3 included) are 56kbps@32kHz (you can try the intl stream yourself - it even works without the auth-token). But THERE EXIST two more shoutcast_mediasets: $shoutcast_mediaset = 'http-icy-aac-lc-b' This one ONLY WORKS for UK IPs, revealing 56kbps@32kHz streams for all National Radios (identical specswise to the overseas streams, but different to them): http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-b/vpid/bbc_radio_three where the statement media bitrate=56 is indeed true! (when tried from a non-UK IP, you get: error id=geolocation/ ) What shoutcastradiomode would your code assign to these streams? $shoutcast_mediaset = 'http-icy-he-aacv2-a' This third and final one works the same for UK and non-UK IPs, producing data for Shoutcast streams that are 48kbpsHE-AACv2@44.1kHz (these are different streams for UK overseas): http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-he-aacv2-a/vpid/bbc_radio_one What are your thoughts on adding support for these additional shoutcast_mediasets? And I don't know if it's the same thing, but Winamp reports the streaming servers as being Limecast 2.0.0 - is this a Limelight server using the Shoutcast protocol? @@ -10151,6 +10188,183 @@ sub get { (snip) +package Streamer::shoutcast; What I currently do for recording these streams is: 1. Download via browser and save this pls file: http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-aac-lc-a/vpid/bbc_radio_one/format/pls.pls 2. Open in an editor copy the href value (I usually copy the href value of supplier=ll_icy2; this is a backup stream not used very much by clients and less prone to breakage...) 3. Use ffmpeg to dump: ffmpeg -i http://bbcmedia.ic.llnwd.net/stream/bbcmedia_intl_lc_radio1_p; -c:a copy -bsf:a aac_adtstoasc BBC Radio 1 Live.m4a Does your code do pretty much the same? + # Convert aac to aac/mp4a/mp3 (snip) + if ( $opt-{aactomp3} ) { Would you consider transcoding in real-time? If I record a 2 hour live programme, why wait an additional time (especially on low end machines) for the transcoding to complete? For the live rtmp streams we have to also call FFmpeg for on-the-fly
Re: Support for live radio Shoutcast streams
Now that I remembered, http://www.bbc.co.uk/blogs/internet/posts/BBC-Radio-to-stop-supporting-Windows-Media-on-December-31st We will provide a SHOUTcast mp3 stream of all our radio stations so that live radio will continue to work on internet radio devices for another year or two. This mp3 stream will be up and running before support for Windows Media is switched off. Has anyone been able to find more info on this/sniff any of those streams? Or is it still too soon? V. ___ get_iplayer mailing list get_iplayer@lists.infradead.org http://lists.infradead.org/mailman/listinfo/get_iplayer