From ab472f9a48eeafdbb20f5a8a4ade624413b3a875 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Mon, 29 Nov 2004 14:16:22 +0000 Subject: [PATCH] Added a first batch of gst-launch examples, as provided by ronald and other from the devel-mlist Original commit message from CVS: Added a first batch of gst-launch examples, as provided by ronald and other from the devel-mlist --- ChangeLog | 6 +++ docs/manual/appendix-programs.xml | 67 ++++++++++++++++++++++++++++++- docs/manual/programs.xml | 67 ++++++++++++++++++++++++++++++- 3 files changed, 138 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc917525d6..e7c0e9be0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-29 Stefan Kost + + * docs/manual/programs.xml: + Added a first batch of gst-launch examples, as provided by Ronald + and others from the devel-mlist + 2004-11-28 Benjamin Otte * gst/gstelement.c: (gst_element_negotiate_pads): diff --git a/docs/manual/appendix-programs.xml b/docs/manual/appendix-programs.xml index c87cdf30a0..132a67da97 100644 --- a/docs/manual/appendix-programs.xml +++ b/docs/manual/appendix-programs.xml @@ -19,7 +19,7 @@ syntax. - A simple commandline looks like: + A simple commandline to play a mp3 audio file looks like: gst-launch filesrc location=hello.mp3 ! mad ! osssink @@ -33,6 +33,8 @@ gst-launch filesrc location=redpill.vob ! mpegdemux name=demux \ demux.video_00! { mpeg2dec ! xvideosink } + lists more gst-launch commandlines. + You can also use the parser in you own @@ -147,6 +149,69 @@ main (int argc, char *argv[]) + + More Examples + + This chapter collects some more complex pipelines. The examples are split into several lines, + so make sure to include the trailing backslashes. + + + Play a remote mp3 audio file: + +gst-launch gnomevfssrc location=http://www.server.org/hello.mp3 ! mad ! alsasink + + + + Play a local mp3 audio file with visualisation: + +gst-launch filesrc location=Hello.mp3 ! mad ! tee name=t ! \ + { queue ! osssink } \ + { t. ! queue ! synaesthesia ! ffmpegcolorspace ! xvimagesink } + + + + Play a local ogg audio file: + +gst-launch filesrc location=file.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioscale ! alsasink + + + + Play a local ogg video file: + +gst-launch filesrc location=file.ogg ! oggdemux name=demux \ + { demux. ! queue ! theoradec ! ffmpegcolorspace ! videoscale ! xvimagesink } \ + { demux. ! queue ! vorbisdec ! audioconvert ! audioscale ! alsasink } + + + + Play a local avi video file: + +gst-launch filesrc location=video.avi ! mpegdemux name=demux \ + demux.audio_00! { queue ! ac3parse ! a52dec ! osssink } \ + demux.video_00! { queue ! mpeg2dec ! xvideosink } + + + + Transcoding an audio file from one format into another: + +gst-launch filesrc location=file.ogg ! oggdemux ! vorbisdec ! audioconvert ! flacenc ! filesink location=file.flac + + + + Transcoding an dvd video into a ogg video: + +gst-launch-0.8 oggmux name=mux ! filesink location=/tmp/file.ogg \ + { dvdreadsrc location=/dev/cdrom ! dvddemux name=demux.audio_00 ! \ + { queue ! a52dec ! audioconvert ! rawvorbisenc ! queue ! mux. } \ + { demux.video_00 ! queue ! mpeg2dec ! ffcolorspace ! videoscale ! video/x-raw-yuv,width=384,height=288 ! tee name=t ! \ + { queue ! theoraenc ! queue ! mux. } \ + } \ + } \ + { t. ! queue ! ffcolorspace ! ximagesink } + + + + diff --git a/docs/manual/programs.xml b/docs/manual/programs.xml index c87cdf30a0..132a67da97 100644 --- a/docs/manual/programs.xml +++ b/docs/manual/programs.xml @@ -19,7 +19,7 @@ syntax. - A simple commandline looks like: + A simple commandline to play a mp3 audio file looks like: gst-launch filesrc location=hello.mp3 ! mad ! osssink @@ -33,6 +33,8 @@ gst-launch filesrc location=redpill.vob ! mpegdemux name=demux \ demux.video_00! { mpeg2dec ! xvideosink } + lists more gst-launch commandlines. + You can also use the parser in you own @@ -147,6 +149,69 @@ main (int argc, char *argv[]) + + More Examples + + This chapter collects some more complex pipelines. The examples are split into several lines, + so make sure to include the trailing backslashes. + + + Play a remote mp3 audio file: + +gst-launch gnomevfssrc location=http://www.server.org/hello.mp3 ! mad ! alsasink + + + + Play a local mp3 audio file with visualisation: + +gst-launch filesrc location=Hello.mp3 ! mad ! tee name=t ! \ + { queue ! osssink } \ + { t. ! queue ! synaesthesia ! ffmpegcolorspace ! xvimagesink } + + + + Play a local ogg audio file: + +gst-launch filesrc location=file.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioscale ! alsasink + + + + Play a local ogg video file: + +gst-launch filesrc location=file.ogg ! oggdemux name=demux \ + { demux. ! queue ! theoradec ! ffmpegcolorspace ! videoscale ! xvimagesink } \ + { demux. ! queue ! vorbisdec ! audioconvert ! audioscale ! alsasink } + + + + Play a local avi video file: + +gst-launch filesrc location=video.avi ! mpegdemux name=demux \ + demux.audio_00! { queue ! ac3parse ! a52dec ! osssink } \ + demux.video_00! { queue ! mpeg2dec ! xvideosink } + + + + Transcoding an audio file from one format into another: + +gst-launch filesrc location=file.ogg ! oggdemux ! vorbisdec ! audioconvert ! flacenc ! filesink location=file.flac + + + + Transcoding an dvd video into a ogg video: + +gst-launch-0.8 oggmux name=mux ! filesink location=/tmp/file.ogg \ + { dvdreadsrc location=/dev/cdrom ! dvddemux name=demux.audio_00 ! \ + { queue ! a52dec ! audioconvert ! rawvorbisenc ! queue ! mux. } \ + { demux.video_00 ! queue ! mpeg2dec ! ffcolorspace ! videoscale ! video/x-raw-yuv,width=384,height=288 ! tee name=t ! \ + { queue ! theoraenc ! queue ! mux. } \ + } \ + } \ + { t. ! queue ! ffcolorspace ! ximagesink } + + + +