Wednesday, May 12, 2010

GStreamer Rulez!

I heard about GStreamer every now and then but I didn't really know what it is about. Today I decided to check it out. It is awesome! :) To get excited about it check the notes below...

My environment: Ubuntu 9.10, with installed gstreamer and additional plugins (gstreamer0.10-plugins-gl, frei0r-plugins)

Below you can find instructions how to add a repository with additional plugins:
https://launchpad.net/~gstreamer-developers/+archive/ppa/

About GStreamer:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-gstreamer.html

GStreamer:
http://www.gstreamer.net/

List of all gstreamer plugins - including effects, etc.:
http://gstreamer.freedesktop.org/documentation/plugins.html

Other blogs which were very helpful:
http://vimeo.com/groups/14747/videos/6673554 - this contains a sample video
http://bluwiki.com/go/GStreamer
http://www.twm-kd.com/computers/software/webcam-and-linux-gstreamer-tutorial/

Now the best part. Playing with videos!

Here is the original video:


The line below will turn a video into a cartoon:
$ gst-launch-0.10 filesrc location=Elphel_RV_2.ogg ! decodebin ! ffmpegcolorspace ! frei0r-filter-cartoon ! ffmpegcolorspace ! xvimagesink


The line below will add some plasma effect:
$ gst-launch-0.10 filesrc location=Elphel_RV_2.ogg ! decodebin ! ffmpegcolorspace ! frei0r-filter-distort0r ! ffmpegcolorspace ! xvimagesink

The line below will play the video on the cube rotating above the mirror and save it as .ogg file:
$ gst-launch-0.10 filesrc location=Elphel_RV_2.ogg ! decodebin ! glupload ! glfiltercube ! glfilterglass ! gldownload ! queue ! ffmpegcolorspace ! theoraenc ! queue ! oggmux ! filesink location=Elphel_RV_2_cube_glass.ogg

The line below will play the video on the cube rotating above the mirror:
$ gst-launch-0.10 filesrc location=Elphel_RV_2.ogg ! decodebin ! glupload ! glfiltercube ! glfilterglass ! gldownload ! queue ! ffmpegcolorspace ! xvimagesink


For more info about plugins run:
$ gst-inspect-0.10 glfiltercube

Beside .ogg also other formats are supported, for example mp4.


No comments: