Capture audio with GStreamer on PandaBoard


In this post I list some of the audio devices from where sound can be captured on the PandaBoard with Ubuntu 11.04.

Capture from a USB WebCam

To see the audio devices run the following command, or see cards listed by pactl list

cat /proc/asound/cards

Then execute a pipeline such as

gst-launch -v ! alsasrc device=hw2:0 ! audioconvert ! vorbisenc ! webmmux ! filesink location=audio.mkv

To capture using the pulsesrc element, switch to the appropriate audio input device in Sound Preferences then execute a pipeline such as

gst-launch -v ! pulsesrc ! audioconvert ! vorbisenc ! webmmux ! filesink location=audio.mkv

Capture from desktop

Capture any sound currently being played. See sources listed by pactl list for device id.

To capture audio output source on the board, you’ll need to switch to SDP4430 Analog Stereo sound output device in Sound Preferences, and use the device specified below

gst-launch -v ! pulsesrc device=alsa_output.platform-soc-audio.0.analog-stereo.monitor ! audioconvert ! vorbisenc ! webmmux ! filesink location=audio.mkv

To capture HDMI audio output source, you’ll need to switch to PandaHDMI Analog Stereo sound output device in Sound Preferences, and use the device specified below

gst-launch -v ! pulsesrc device=alsa_output.platform-soc-audio.1.analog-stereo.monitor ! audioconvert ! vorbisenc ! webmmux ! filesink location=audio.mkv

Capture from Line In

You’ll need to switch to SDP4430 Analog Stereo sound input device in Sound Preferences. To capture sound from line in (upper 3.5 mm jack of the audio connector) execute

gst-launch -v ! pulsesrc ! audioconvert ! vorbisenc ! webmmux ! filesink location=audio.mkv

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s