Listen to radio with mplayer and mpv

Audio editors, music players, video players, burning software, etc.
Post Reply
Message
Author
labbe5
Posts: 2159
Joined: Wed 13 Nov 2013, 14:26
Location: Canada

Listen to radio with mplayer and mpv

#1 Post by labbe5 »

https://opensource.com/article/18/12/linux-toy-mplayer

Puppy and Debiandog have already Gnome mplayer.

MPlayer has a slew of command-line options to set depending on your situation. I wanted to listen to the local college radio station here in Raleigh (88.1 WKNC, they're pretty good!), and so after grabbing the streaming URL from their website, all that took to get my radio up and running, no GUI or web player needed, was:

$ mplayer -nocache -afm ffmpeg http://wknc.sma.ncsu.edu:8000/wknchd1.mp3

Further reading :
How To Record Internet Audio With Audacity
https://websetnet.net/how-to-record-int ... -audacity/
3 Audacity Tips to Enhance Your Recorded Interviews
https://www.makeuseof.com/tag/3-audacit ... interview/
Last edited by labbe5 on Tue 29 Oct 2019, 11:35, edited 2 times in total.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Good reminder, labbe5, but that's nothing new, you know.

Users can do the same with mpv with less fuss, e.g.:

Code: Select all

mpv --quiet http://laut.fm/twentysound
(If one likes music from 20th Century composers.)

Or even with SoundXchange's play. Open a (wide!) console and type:

Code: Select all

play -t mp3 --buffer 2048 http://5.152.208.98:8058 bass +3
The above will play medieval music and songs from up to a thousand years ago
on Internet radio, if you're wondering what those strange sounds are!

But thanks for your searches, and keep'em coming! :)

Happy New Year!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Salut labbe5.

A fun script using play and links:

Code: Select all

#!/bin/sh
# play_AncientFM.sh
#
# (c) musher0, 2017-11-09, 19 h 57.
#
####
psawk () { ps | awk '$4=="play" { print $1 }'; }

if [ "`psawk`" ];then
     kill -s 15 `psawk`
else
     links2 -g http://www.ancientfm.com/nowplaying.php?host=www.simplexstream.com&port=8058 &

     URL="http://5.152.208.98:8058"

     x=380;y=115 # "$x"
     GEOM="g 79x2+$x+$y" # -$x-$y" # selon la taille de la fonte # 315+0" # pour monaco 13

     COLR="bg "#271F0C" -fg wheat -bd "#BDBDBD"" # -fg black

     TRNSP="tr -tint AntiqueWhite4 -sh 80"
# Autres essais # bg black -fg cornsilk -tint firebrick4

     FNT="fn xft:LibrisADF:italic:pixelsize=11:antialias=true:hinting=true"
     # Monaco # AkizaSans

     FadE="fade 200 -fadecolor "#94A495""

     ICN="icon /root/my-documents/icons/VieuxRadio.png"
# "icon /usr/local/lib/X11/mini-icons/xterm16-inv.xpm"
#    /usr/local/lib/X11/mini-icons/mini-term.xpm" # -$ICN

     rxvt -cd /mnt/home/Musique/Radios -b 18 -sr -T "Ancient FM -- $URL" -$ICN -$COLR -$TRNSP -$FNT -$FadE -$GEOM -e play -t mp3 --buffer 2048 $URL bass +3
     # -iconic # +sb
# &>/dev/null # ouvrir si fermé
fi
Substitute your favorite channel and play list, of course.

Tah-dah.
Attachments
play-and-links.jpg
(Partial view)
(165.78 KiB) Downloaded 246 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply