Just moozing

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

gstreamer sinks (and T)

with 2 comments

gstreamer-logoContinuing my gstreamer project I need two sinks, one to show stuff on the screen, i.e. xvimagesink, and one to save it to file, i.e. filesink.


Output to screen

This is a the basic gui output sink.

gst-launch videotestsrc ! xvimagesink

Included here mostly for completeness.


Saving to files

This is a recap of an old blog post of mine on gstreamer. It has a section on debugging (hint: –gst-debug-level=3).

Filesink is one of the core sinks, and it is used a lot.

gst-launch videotestsrc ! theoraenc ! oggmux ! filesink location=testmovie.ogg

Break it using ctrl+c. This will produce a nice video with the test source.


Sending stuff in two directions

I want to use this to save a stream while continuously using it. The plugin to use is called tee.

gst-launch videotestsrc ! tee name=t ! queue ! xvimagesink t. ! queue ! theoraenc ! oggmux ! filesink location=testmovie.ogg

Using tee, I create a pipe called t. It gets send to xvimagesink, and I specify that it is the one to go into theoraenc.

The queue pads are a buffering system, and without it, the video is a still image.




Written by moozing

August 19, 2015 at 12:00

Posted in Tech

Tagged with ,

2 Responses

Subscribe to comments with RSS.

  1. […] like video sources and sinks, gstreamer has audio sources and […]

  2. […] Recording, storing to file and splitting streams are discussed in my previous posts here and here. […]

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: