paplay music.mp3
注意:
1.此命令每次只能执行一句,多个终端不可同时执行,若同时执行,会依次等待
2.该命不能以root身份执行,保险起见,指定用户执行,如
sudo -u $USER paplay music.mp3
安装
sudo apt-get install sox
播放
play music.mp3
注意:此命令支持同时执行,也不需要指定用户执行,并且可以显示音频文件的基本信息,如
play WARN alsa: can't encode 0-bit Unknown or not applicable
HighAlarm.wav:
File Size: 737k Bit Rate: 1.41M
Encoding: Signed PCM
Channels: 2 @ 16-bit
Samplerate: 44100Hz
Replaygain: off
Duration: 00:00:04.18
In:100% 00:00:04.18 [00:00:00.00] Out:184k [ | ] Hd:4.3 Clip:0
Done.
“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
标 题:ubuntu用命令播放音频文件