gstreamer/tools
Thijs Vermeir 78bb15ec47 tools/gst-plot-timeline.py: Fix parsing of log messages
Original commit message from CVS:
* tools/gst-plot-timeline.py:
Fix parsing of log messages
2008-07-02 12:23:12 +00:00
..
.gitignore ignore more 2005-06-17 09:12:33 +00:00
BUGS gstreamer-register -> gst-register gstreamer-launch -> gst-launch etc. 2002-02-04 20:33:14 +00:00
gst-feedback-m.m tools/gst-feedback-m.m: Don't only use unversioned tools, try versioned tools as well (#345086). 2006-06-21 10:14:00 +00:00
gst-feedback.1.in tools/gst-feedback.1.in: Fix typo: s/feeback/feedback/ (#133494). 2006-03-21 15:42:02 +00:00
gst-indent don't mix tabs and spaces 2004-03-15 19:27:17 +00:00
gst-inspect.1.in tools/gst-inspect.1.in: Document --print-all and --print-plugin-auto-install-info command line options in man page. 2007-07-25 22:29:57 +00:00
gst-inspect.c tools/gst-inspect.c: If possible print the element type of GValueArray properties. 2008-05-28 10:44:15 +00:00
gst-launch.1.in tools/gst-launch.1.in: Forgot to also add the envvar docs here. 2008-04-25 13:09:40 +00:00
gst-launch.c tools/gst-launch.c: Dump one graph per pipeline state-change and state change name (if GST_DEBUG_DUMP_DOT_DIR is set). 2008-02-05 09:24:18 +00:00
gst-plot-timeline.py tools/gst-plot-timeline.py: Fix parsing of log messages 2008-07-02 12:23:12 +00:00
gst-run.c tools/gst-run.c: Include <unistd.h> conditionally on HAVE_UNISTD_H as elsewhere. 2008-04-26 00:13:03 +00:00
gst-typefind.1.in tools/: cleanup man-pages, remove reference to gst-register, document env-vars 2006-01-12 16:31:35 +00:00
gst-typefind.c tools/: Call g_thread_init() really really early, before any other GLib function (see #342564 and recent discussion o... 2007-01-05 15:55:16 +00:00
gst-xmlinspect.1.in tools/: cleanup man-pages, remove reference to gst-register, document env-vars 2006-01-12 16:31:35 +00:00
gst-xmlinspect.c tools/gst-xmlinspect.c: De-cruft a bit. If no argument is specified, print all elements in 2008-04-12 20:52:58 +00:00
gst-xmllaunch.1.in tools/: cleanup man-pages, remove reference to gst-register, document env-vars 2006-01-12 16:31:35 +00:00
gstreamer-completion tools/gstreamer-completion: Replacement for gst-complete written in sh and sed. Only completes names of features, bu... 2005-12-25 03:45:45 +00:00
Makefile.am tools/: Don't create a customised man page based on the host architecture, describe the default registry path generic... 2007-05-02 17:09:30 +00:00
README tools/: cleanup man-pages, remove reference to gst-register, document env-vars 2006-01-12 16:31:35 +00:00
tools.h tools/: Fix up includes: need to include stdlib.h in tools.h for exit(). 2006-05-09 10:53:18 +00:00
xml2text.xsl - indentation fixes 2003-02-21 19:41:02 +00:00

gst-launch
================

This is a tool that will construct pipelines based on a command-line
syntax.  The syntax is rather complex to enable all the features I want it
to have, but should be easy to use for most people.  Multi-pathed and
feedback pipelines are the most complex.

A simple commandline looks like:

 gst-launch filesrc location=music.mp3 ! mad ! osssink

This plays an mp3 music file music.mp3 using libmad, and:

 gst-launch filesrc location=music.mp3 ! mp3parse ! mpg123 ! osssink

Plays and mp3 music file using mpg123

You can also stream files over http:

 gst-launch httpsrc location=http://domain.com/music.mp3 ! mad ! osssink

And using gnome-vfs you can do the same with:

 gst-launch gnomevfssrc location=music.mp3 ! mad ! osssink
 gst-launch gnomevfssrc location=http://domain.com/music.mp3 ! mad ! osssink

And too play the same song with gnome-vfs via smb:

 gst-launch gnomevfssrc location=smb://computer/music.mp3 ! mad ! osssink

Here we convert a Mp3 file into an Ogg Vorbis file:

 gst-launch filesrc location=music.mp3 ! mad ! vorbisenc ! filesink location=music.ogg

And then we can play that file with:

 gst-launch filesrc location=music.ogg ! oggdemux ! vorbisdec ! audioconvert ! osssink

Some other useful pipelines are..
Plays wav files (currently there are no wav encoders):

 gst-launch filesrc location=music.wav ! wavparse ! osssink

Converts wav files into mp3 and ogg files:

 gst-launch filesrc location=music.wav ! wavparse ! vorbisenc ! filesink location=music.ogg
 gst-launch filesrc location=music.wav ! wavparse ! mpegaudio ! filesink location=music.mp3

You can also use lame for mp3 encoding if you have it installed, it does a 
much better job than mpegaudio.

Rips all songs from cd and saves them into a mp3 file:

 gst-launch cdparanoia ! mpegaudio ! filesink location=cd.mp3

You can toy around with gst-inspect to discover the settings for 
cdparanoia to rip individual tracks

Record sound from your sound input and encode it into an ogg file:

 gst-launch osssrc ! vorbisenc ! filesink location=input.ogg

gst-launch not only handles audio but video as well:
For mpeg1 files (video and audio streams respectively):

 gst-launch filesrc location=video.mpg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink }
 gst-launch filesrc location=video.mpg ! mpegdemux audio_00! { queue ! mad ! osssink }

for mpeg1 with both audio and video (for glib2):

 gst-launch filesrc location=video.mpg ! mpegdemux name=demux video_00! { queue ! mpeg2dec ! sdlvideosink } demux.audio_00! { queue ! mad ! osssink }

for mpeg1 with both audio and video (for gtk1.2, the shim doesn't handle the 'name' property yet):

 gst-launch filesrc location=video.mpg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink } mpegdemux0.audio_00! { queue ! mad ! osssink }

For mpeg2 files (video and audio streams respectively):
 
 gst-launch filesrc location=video.mpeg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink }
 gst-launch filesrc location=video.mpeg ! mpegdemux private_stream_1.0! { queue ! a52dec ! osssink }

for mpeg2 with both audio and video (glib2):

 gst-launch filesrc location=video.mpg ! mpegdemux name=demux video_00! { queue ! mpeg2dec ! sdlvideosink } demux.private_stream_1.0! { queue ! a52dec ! osssink }

Note: The types of audio streams in the mpeg files can vary!

For an avi file (DivX, mjpeg,...)

 gst-launch filesrc location=video.avi ! avidecoder video_00! { queue ! sdlvideosink } avidecoder0.audio_00! { queue ! osssink }



gst-complete
==================

This is a simple utility which provides custom bash completion when
typing gst-launch commands. 

Simply run "gst-compprep" as root to build the registry of completions,
and then put, in your .bashrc,
"complete -C gst-complete gst-launch"
(ensuring that gst-complete is on your path).

You can then enjoy context sensitive tab-completion of gst-launch
commands.



gst-inspect
=================

Allows you to check the properties of plugins and elements.

 ./gst-inspect 
 
will show all the plugins available and the elements they contain.

 ./gst-inspect <pluginname/elementname>

shows more info about the plugin/element.



gst-xmlinspect
=================

Dump properties of plugins and elements in an xml format. You can 
transform the xml to something else with an appropriate stylesheet.

 ./gst-xmlinspect <elementname> | xsltproc xml2text.xsl -