Listen Digitally Imported Radio from CLI (without premium!)

mplayer http://pub7.di.fm/di_ambient_aac?1 -user-agent "AudioAddict-di/3.2.0.3240 Android/5.1"
This commands does just two things: fakes user agent (the one was taken from recent Android app) and sends the (possibly) listener ID (it can be any - I put "1" here because it works like a charm - after the name of stream ?1 as you can see). Look for the list of stations here: http://pub7.di.fm Or here: https://goo.gl/pdhhpQ Best regards, sxiii :)
Sample Output
Name   : Ambient - DIGITALLY IMPORTED - a blend of ambient, downtempo, and chillout
Genre  : Electronic Ambient Downtempo
Website: http://www.di.fm
Public : no
Bitrate: 64kbit/s
Cache size set to 320 KBytes
Cache fill:  0.00% (0 bytes)   
ICY Info: StreamTitle='Vangelis - Sushi Bar - Damask Rose (OST Blade Runner)';StreamUrl='';
Cache fill:  5.00% (16384 bytes)   

AAC file format detected.
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 56.60.100 (external)
[aac @ 0x7fa1abf39540]element type mismatch 1 != 0
AUDIO: 44100 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->352800)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 44100Hz 2ch floatle (4 bytes per sample)
Video: no video
Starting playback...

2
By: sxiii
2016-04-29 23:41:17

What Others Think

Also, to make a list of available streams, you can use command from here: http://www.commandlinefu.com/commands/view/11921/mpd-digitally-imported If somebody knows anything about premium streams I would be greatful to know how to connect to them.
sxiii · 125 weeks and 1 day ago
Seems somebody has made a list (which does NOT require to send any user agent nor ID!) publically available here: https://gist.github.com/sim642/4f73e3e145fd1eac8c39
sxiii · 125 weeks and 1 day ago
Alternatively, you could replace mplayer with mpv
nomasteryoda · 120 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: