Linux, programming, computers and life

December 21, 2007

gstreamer basic command line reminder

Filed under: CLI, linux

I recently wanted to record an audio stream. I tried audacity which somehow stopped recording after a while and then found mhwaveedit which did the job. However, i though to myself, how do i do it without GUI?
Gstreamer to the rescue! After examining man gst-launch-0.10 i found the following options.
1. Play a sound:

a: gst-launch-0.10 playbin uri=’file:///mnt/audio/1.mp3′
b: gst-launch-0.10 filesrc location=’1.ogg’ ! decodebin ! alsasink

2. record sound from the sound card

mp3: gst-launch-0.10 alsasrc ! audioconvert ! lame ! filesink location=input.mp3
ogg: gst-launch-0.10 alsasrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=input.ogg

It looks like the library is very versatile but i did not found a good tutorial how to build these command line pipes.

Technorati Tags: , , , , , ,

Comments »

The URI to TrackBack this entry is: http://linux4all.blogsome.com/2007/12/21/gstreamer-basic-command-line-reminder/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.

Get free blog up and running in minutes with Blogsome
Theme designed by Gary Rogers