VLC Streaming command line audio... how?

4 posts
by yatahaze » Fri Aug 17, 2012 5:38 pm
At our office we use an RTP stream to re-broadcast shoutcast radio stations in sync with all the computers. (I have output chain to use, so I'm not really looking for help with VLC alone.) I'd like to have my RPi do this as well, but I have little experience with VLC on Linux, especially cvlc (I don't want to use a display/gui if possible).

I have the simple problem of just getting a regular shoutcast stream to load and to hear some audio out of VLC. With the GUI loaded I've been able to technically "play" shoutcast stations but not hear anything (but other apps can play sound). I'm wondering if I'm missing codecs or something... I don't really know what Linux requires for this sort of stuff.

Can anyone explain this to a somewhat beginner (in linux)?
Posts: 3
Joined: Fri Aug 17, 2012 5:31 pm
by yatahaze » Fri Aug 17, 2012 7:59 pm
It's very possible the sound was playing through the analog out instead of HDMI (that's what I was using at the time)... but DOSbox was playing audio through HDMI, so I'm not sure. Still, any tips are appreciated.
Posts: 3
Joined: Fri Aug 17, 2012 5:31 pm
by yatahaze » Sat Aug 18, 2012 12:25 am
pi@raspberrypi ~/temp $ cvlc tombraiderlegend_ost-croftmanor.mp3
VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e)
[0x56dff0] inhibit interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0x56dff0] main interface error: no suitable interface module
[0x56e0f8] main interface error: no suitable interface module
[0x54d8f0] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x56e0f8] dummy interface: using the dummy interface module...
[0x576f58] pulse audio output error: PulseAudio server connection failure: Connection refused
[0x576f58] alsa audio output error: cannot commit hardware parameters: Invalid argument
[0x576f58] oss audio output error: cannot open audio device (/dev/dsp)
[0x576f58] main audio output error: no suitable audio output module
[0x5e18c0] main decoder error: failed to create audio output
Segmentation fault

This is what happens during playback of an MP3... WAV files playback fine.

EDIT: Solved MP3 playback with this post: viewtopic.php?p=130502#p130502
Posts: 3
Joined: Fri Aug 17, 2012 5:31 pm
by kaedroho » Thu Aug 23, 2012 8:57 am
I would reccomend installing sox and using the "play" command.
I haven't tried this on a raspberry pi but it works well on a beagleboard and on desktops.

Code: Select all
play abc.mp3

Sox is quite a common program on linux, so you should be able to get it from the package manager

Some info: http://linux.about.com/library/cmd/blcmdl1_play.htm
Posts: 7
Joined: Sun Nov 20, 2011 5:52 pm