Just moozing

Before you can check your notes, you must make them…

gstreamer audio

leave a comment »

Just like video sources and sinks, gstreamer has audio sources and sinks.


Simple record to file

I found an example on stackoverflow.

gst-launch-0.1 autoaudiosrc ! audioconvert ! vorbisenc ! \
  oggmux ! filesink location="sit.ogg"

It works nicely, but I have a distrust of “autodetection”, so I used this trick to generate a graph of my system.

audio-stream-exampleIt tells me that it uses the alsasrc to record sound, and other interesting information about defaults, like 44.1kHz sampling rate.

Record video and audio

With some inspiration from here and from my sinks post, we make the stream

gst-launch videotestsrc ! theoraenc ! \
  oggmux name=mux \
    ! filesink location=testmovie.ogg \
    audiotestsrc ! decodebin ! audioconvert ! vorbisenc ! queue ! mux.

And the result using videotestsrc combined with audiotestsrc, is being send back to the old days of nothing on TV.


Written by moozing

August 20, 2015 at 12:00

Posted in Tech

Tagged with ,

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: