Updated the README file with some cool gstreamer-launch cmd lines

Original commit message from CVS:
Updated the README file with some cool gstreamer-launch cmd lines
by Matthew McClintock <mattsm@mail.utexas.edu>
This commit is contained in:
Wim Taymans 2001-06-15 19:46:46 +00:00
parent 5c73a7824c
commit 07b3816510

View file

@ -8,13 +8,71 @@ feedback pipelines are the most complex.
A simple commandline looks like: A simple commandline looks like:
./launch disksrc demo.mp3 | mp3parse | mpg123 | osssink gstreamer-launch disksrc location=music.mp3 ! mad ! osssink
A more complex pipeline looks like: This plays an mp3 music file music.mp3 using libmad, and:
./launch disksrc redpill.vob | css-descramble | private_stream_1.0| \ gstreamer-launch disksrc location=music.mp3 ! mp3parse ! mpg123 ! osssink
(ac3parse | ac3dec | audioink-oss) video_0| (mpeg2dec | videosink)
Plays and mp3 music file using mpg123
You can also stream files over http:
gstreamer-launch httpsrc location=http://domain.com/music.mp3 ! mad ! osssink
And using gnome-vfs you can do the same with:
gstreamer-launch gnomevfssrc location=music.mp3 ! mad ! osssink
gstreamer-launch gnomevfssrc location=http://domain.com/music.mp3 ! mad ! osssink
And too play the same song with gnome-vfs via smb:
gstreamer-launch gnomevfssrc location=smb://computer/music.mp3 ! mad ! osssink
Here we convert a Mp3 file into an Ogg Vorbis file:
gstreamer-launch disksrc location=music.mp3 ! mad ! vorbisenc ! disksink location=music.ogg
And then we can play that file with:
gstreamer-launch disksrc location=music.ogg ! vorbisdec ! osssink
Some other useful pipelines are..
Plays wav files (currently there are no wav encoders):
gstreamer-launch disksrc location=music.wav ! parsewav ! osssink
Converts wav files into mp3 and ogg files:
gstreamer-launch disksrc location=music.wav ! parsewav ! vorbisenc ! disksink location=music.ogg
gstreamer-launch disksrc 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:
gstreamer-launch cdparanoia ! mpegaudio ! disksink location=cd.mp3
You can toy around with gstreamer-inspect to discover the settings for
cdparanoia to rip individual tracks
Record sound from your sound input and encode it into an ogg file:
gstreamer-launch osssrc ! vorbisenc ! disksink location=input.ogg
gstreamer-launch not only handles audio but video as well:
For mpeg1 files (video and audio streams respectively):
gstreamer-launch disksrc location=video.mpg ! mpeg1parse video_00! queue ! { mp1videoparse ! mpeg_play ! sdlvideosink }
gstreamer-launch disksrc location=video.mpg ! mpeg1parse audio_00! queue ! { mad ! osssink }
For mpeg2 files (video and audio streams respectively):
gstreamer-launch disksrc location=video.mpeg ! mpeg2parse video_0! queue ! { mpeg2dec ! sdlvideosink }
gstreamer-launch disksrc location=video.mpeg ! mpeg2parse private_stream_1.0! queue ! { ac3dec ! osssink }
Note: The types of audio streams in the mpeg files can vary!
gstreamer-complete gstreamer-complete
================== ==================
@ -22,8 +80,8 @@ gstreamer-complete
This is a simple utility which provides custom bash completion when This is a simple utility which provides custom bash completion when
typing gstreamer-launch commands. typing gstreamer-launch commands.
Simply run "gstreamer-compprep" to build the registry of completions, and Simply run "gstreamer-compprep" as root to build the registry of completions,
then put, in your .bashrc, and then put, in your .bashrc,
"complete -C gstreamer-complete gstreamer-launch" "complete -C gstreamer-complete gstreamer-launch"
(ensuring that gstreamer-complete is on your path). (ensuring that gstreamer-complete is on your path).
@ -37,7 +95,8 @@ gstreamer-register
This tool will perform an introspection on all available plugins and will 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 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 much faster since the gstreamer core doesn't have to bring all the plugins
files into memory at startup. files into memory at startup. As with gstreamer-compprep you need to run this
as root for it too work correctly.
gstreamer-inspect gstreamer-inspect