Ubuntu笔记本 在终端 听 收音机

使用两个命令:
sudo apt-get install mplayer
mplayer -nocache -afm ffmpeg http://wknc.sma.ncsu.edu:8000/wknchd1.mp3

hairui@hadoop:~$ sudo apt-get install mplayer
[sudo] hairui 的密码: 
正在读取软件包列表... 完成
正在分析软件包的依赖关系树        
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  ocl-icd-libopencl1
使用'sudo apt autoremove'来卸载它(它们)。
将会同时安装下列软件:
  esound-common libaudiofile1 libenca0 libesd0 libvorbisidec1
建议安装:
  pulseaudio-esound-compat mplayer-doc netselect | fping
下列【新】软件包将被安装:
  esound-common libaudiofile1 libenca0 libesd0 libvorbisidec1 mplayer
升级了 0 个软件包,新安装了 6 个软件包,要卸载 0 个软件包,有 39 个软件包未被升级。
需要下载 2,520 kB 的归档。
解压缩后会消耗 6,065 kB 的额外空间。
您希望继续执行吗? [Y/n] Y
获取:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-updates/universe amd64 libaudiofile1 amd64 0.3.6-2ubuntu0.16.04.1 [94.4 kB]
获取:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial/universe amd64 esound-common all 0.2.41-11 [9,558 B]
获取:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial/universe amd64 libesd0 amd64 0.2.41-11 [16.7 kB]
获取:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial/universe amd64 libenca0 amd64 1.18-1 [53.8 kB]
获取:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-updates/universe amd64 libvorbisidec1 amd64 1.0.2+svn18153-0.2+deb7u1build0.16.04.1 [71.1 kB]
获取:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial-updates/universe amd64 mplayer amd64 2:1.2.1-1ubuntu1.1 [2,274 kB]
已下载 2,520 kB,耗时 34秒 (73.6 kB/s)                                         
正在选中未选择的软件包 libaudiofile1:amd64。
(正在读取数据库 ... 系统当前共安装有 303179 个文件和目录。)
正准备解包 .../libaudiofile1_0.3.6-2ubuntu0.16.04.1_amd64.deb  ...
正在解包 libaudiofile1:amd64 (0.3.6-2ubuntu0.16.04.1) ...
正在选中未选择的软件包 esound-common。
正准备解包 .../esound-common_0.2.41-11_all.deb  ...
正在解包 esound-common (0.2.41-11) ...
正在选中未选择的软件包 libesd0:amd64。
正准备解包 .../libesd0_0.2.41-11_amd64.deb  ...
正在解包 libesd0:amd64 (0.2.41-11) ...
正在选中未选择的软件包 libenca0:amd64。
正准备解包 .../libenca0_1.18-1_amd64.deb  ...
正在解包 libenca0:amd64 (1.18-1) ...
正在选中未选择的软件包 libvorbisidec1。
正准备解包 .../libvorbisidec1_1.0.2+svn18153-0.2+deb7u1build0.16.04.1_amd64.deb  ...
正在解包 libvorbisidec1 (1.0.2+svn18153-0.2+deb7u1build0.16.04.1) ...
正在选中未选择的软件包 mplayer。
正准备解包 .../mplayer_2%3a1.2.1-1ubuntu1.1_amd64.deb  ...
正在解包 mplayer (2:1.2.1-1ubuntu1.1) ...
正在处理用于 libc-bin (2.23-0ubuntu10) 的触发器 ...
正在处理用于 man-db (2.7.5-1) 的触发器 ...
正在处理用于 mime-support (3.59ubuntu1) 的触发器 ...
正在设置 libaudiofile1:amd64 (0.3.6-2ubuntu0.16.04.1) ...
正在设置 esound-common (0.2.41-11) ...
正在设置 libesd0:amd64 (0.2.41-11) ...
正在设置 libenca0:amd64 (1.18-1) ...
正在设置 libvorbisidec1 (1.0.2+svn18153-0.2+deb7u1build0.16.04.1) ...
正在设置 mplayer (2:1.2.1-1ubuntu1.1) ...
正在处理用于 libc-bin (2.23-0ubuntu10) 的触发器 ...
hairui@hadoop:~$ mplayer
Creating config file: /home/hairui/.mplayer/config
MPlayer 1.2.1 (Debian), built with gcc-5.4.0 (C) 2000-2016 MPlayer Team
Usage:   mplayer [options] [url|path/]filename

Basic options: (complete list in the man page)
 -vo         select video output driver ('-vo help' for a list)
 -ao         select audio output driver ('-ao help' for a list)
 vcd://  play (S)VCD (Super Video CD) track (raw device, no mount)
 dvd://  play DVD title from device instead of plain file
 -alang/-slang    select DVD audio/subtitle language (by 2-char country code)
 -ss    seek to given (seconds or hh:mm:ss) position
 -nosound         do not play sound
 -fs              fullscreen playback (or -vm, -zoom, details in the man page)
 -x  -y     set display resolution (for use with -vm or -zoom)
 -sub       specify subtitle file to use (also see -subfps, -subdelay)
 -playlist  specify playlist file
 -vid x -aid y    select video (x) and audio (y) stream to play
 -fps x -srate y  change video (x fps) and audio (y Hz) rate
 -pp     enable postprocessing filter (details in the man page)
 -framedrop       enable frame dropping (for slow machines)

Basic keys: (complete list in the man page, also check input.conf)
 <-  or  ->       seek backward/forward 10 seconds
 down or up       seek backward/forward  1 minute
 pgdown or pgup   seek backward/forward 10 minutes
 < or >           step backward/forward in playlist
 p or SPACE       pause movie (press any key to continue)
 q or ESC         stop playing and quit program
 + or -           adjust audio delay by +/- 0.1 second
 o                cycle OSD mode:  none / seekbar / seekbar + timer
 * or /           increase or decrease PCM volume
 x or z           adjust subtitle delay by +/- 0.1 second
 r or t           adjust subtitle position up/down, also see -vf expand

 * * * SEE THE MAN PAGE FOR DETAILS, FURTHER (ADVANCED) OPTIONS AND KEYS * * *

hairui@hadoop:~$ mplayer -nocache -afm ffmpeg http://wknc.sma.ncsu.edu:8000/wknchd1.mp3
MPlayer 1.2.1 (Debian), built with gcc-5.4.0 (C) 2000-2016 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing http://wknc.sma.ncsu.edu:8000/wknchd1.mp3.
Resolving 127.0.0.1 for AF_INET6...

Couldn't resolve name for AF_INET6: 127.0.0.1
Connecting to server 127.0.0.1[127.0.0.1]: 39953...

Name   : WKNC 88.1 FM HD-1 Raleigh, N.C.
Genre  : College Radio
Public : yes
Bitrate: 128kbit/s
Cache size set to 0 KBytes
Cannot seek backward in linear streams!
Cannot seek backward in linear streams!
Audio only file format detected.
==========================================================================
Trying to force audio codec driver family ffmpeg...
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 56.60.100 (external)
AUDIO: 44100 Hz, 2 ch, floatle, 128.0 kbit/4.54% (ratio: 16000->352800)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)
==========================================================================
AO: [pulse] 44100Hz 2ch floatle (4 bytes per sample)
Video: no video
Starting playback...

ICY Info: StreamTitle='Yves Tumor - Honesty';
A: 219.4 (03:39.4) of -0.0 (unknown)  3.6% 


MPlayer interrupted by signal 2 in module: play_audio
A: 219.6 (03:39.6) of -0.0 (unknown)  3.6% 

Exiting... (Quit)
hairui@hadoop:~$ 

你可能感兴趣的:(ubuntu16.04)