gstreamer/tools
Steve Baker d4e56cc925 this wasn't actually needed
Original commit message from CVS:
this wasn't actually needed
2002-05-29 15:30:10 +00:00
..
.gitignore added a bunch of cvsignore stuff off of a fresh checkout and build i will win the race to max LOC changed ;-) 2002-03-25 05:01:02 +00:00
BUGS gstreamer-register -> gst-register gstreamer-launch -> gst-launch etc. 2002-02-04 20:33:14 +00:00
gst-complete.1 added xmllaunch man page 2002-01-15 16:48:38 +00:00
gst-complete.c add 'toolsdir' to the pc files add our first plugin test, which involves simply running gst-compprep, which in the co... 2002-02-16 17:53:58 +00:00
gst-compprep.1 added xmllaunch man page 2002-01-15 16:48:38 +00:00
gst-compprep.c Totally rewritten registry handling. 2002-05-08 20:40:48 +00:00
gst-inspect.1 added xmllaunch man page 2002-01-15 16:48:38 +00:00
gst-inspect.c should make stuff more legible 2002-05-28 08:56:34 +00:00
gst-launch.1 merged back fixes from release branch 2002-04-15 09:21:14 +00:00
gst-launch.c this wasn't actually needed 2002-05-29 15:30:10 +00:00
gst-register.1 added xmllaunch man page 2002-01-15 16:48:38 +00:00
gst-register.c Totally rewritten registry handling. 2002-05-08 20:40:48 +00:00
gst-xmllaunch.1 man page updates 2002-01-15 17:10:48 +00:00
Makefile.am link gst-inspect to libgstcontrol so that -inspect will show what dparams are available. I think it is ok to link he... 2002-04-14 10:11:14 +00:00
README gstreamer-register -> gst-register gstreamer-launch -> gst-launch etc. 2002-02-04 20:33:14 +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 ! disksink location=music.ogg

And then we can play that file with:

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

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

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

Converts wav files into mp3 and ogg files:

 gst-launch filesrc location=music.wav ! parsewav ! vorbisenc ! disksink location=music.ogg
 gst-launch filesrc location=music.wav ! parsewav ! mpegaudio ! disksink 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 ! disksink 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 ! disksink 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-register
==================

This tool will perform an introspection on all available plugins and will
create a registry file in /etc/gstreamer/reg.xml. Startup time will be
much faster since the gstreamer core doesn't have to bring all the plugins 
files into memory at startup. As with gst-compprep you need to run this
as root for it too work correctly.


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.