Audio in terminal - Debian
Posted: Tue May 15, 2012 8:07 pm
Hello all,
I have been trying to get audio to work in my Pi. In the GUI everything works now by using:
1. Boot
2. Login
3. run "sudo modprobe snd_bcm2835"
4. startx
I can play music files and sound just works great.
Now my problem. I want to play a music file from the terminal without starting X. I've tried multiple terminal music players (xmms2, mplayer, etc.) and it does not work even when I executed "sudo modprobe snd_bcm2835" right on boot.
On Mplayer i get the following error:
It does not matter if I try to play a other music format.
Is there any way I CAN play music files directly form terminal?
Thank you in advance.
Chrunchstick
I have been trying to get audio to work in my Pi. In the GUI everything works now by using:
1. Boot
2. Login
3. run "sudo modprobe snd_bcm2835"
4. startx
I can play music files and sound just works great.
Now my problem. I want to play a music file from the terminal without starting X. I've tried multiple terminal music players (xmms2, mplayer, etc.) and it does not work even when I executed "sudo modprobe snd_bcm2835" right on boot.
On Mplayer i get the following error:
Code: Select all
christiaan@raspberrypi:~$ mplayer Desktop/Hit\ the\ Floor.mp3
MPlayer 1.0rc3-4.4.4 (C) 2000-2009 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 Desktop/Hit the Floor.mp3.
Audio only file format detected.
Clip info:
Title: Hit the Floor
Artist: Linkin Park
Album: Meteora
Year: 2003
Comment:
Track: 5
Genre: Other
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 320.0 kbit/22.68% (ratio: 40000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
socket(): Address family not supported by protocol
waitpid(): No child processes
AO: [pulse] Init failed: Internal error
Failed to initialize audio driver 'pulse'
[AO_ALSA] alsa-lib: confmisc.c:768:(parse_card) cannot find card '0'
[AO_ALSA] alsa-lib: conf.c:4170:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
[AO_ALSA] alsa-lib: confmisc.c:392:(snd_func_concat) error evaluating strings
[AO_ALSA] alsa-lib: conf.c:4170:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
[AO_ALSA] alsa-lib: confmisc.c:1251:(snd_func_refer) error evaluating name
[AO_ALSA] alsa-lib: conf.c:4170:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
[AO_ALSA] alsa-lib: conf.c:4649:(snd_config_expand) Evaluate error: No such file or directory
[AO_ALSA] alsa-lib: pcm.c:2190:(snd_pcm_open_noupdate) Unknown PCM default
[AO_ALSA] Playback open error: No such file or directory
Failed to initialize audio driver 'alsa'
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
[AO SDL] using aalib audio driver.
[AO SDL] Unable to open audio: No available audio device
Failed to initialize audio driver 'sdl:aalib'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video
Exiting... (End of file)
Is there any way I CAN play music files directly form terminal?
Thank you in advance.
Chrunchstick