backports and fixes
[platform/upstream/gstreamer.git] / tools / gst-launch.1
1 .TH "GStreamer" "1" "March 2001"
2 .SH "NAME"
3 gst\-launch \- build and run a GStreamer pipeline
4 .SH "SYNOPSIS"
5 \fBgst\-launch\fR \fI[OPTION...]\fR PIPELINE\-DESCRIPTION
6 .SH "DESCRIPTION"
7 .LP 
8 \fIgst\-launch\fP is a tool that is used to build and run a basic \fIGStreamer\fP pipeline.
9
10 A simple commandline looks like:
11
12  gst\-launch filesrc location=music.mp3 ! mad ! osssink
13
14 This plays an mp3 music file music.mp3 using libmad, and:
15
16  gst\-launch filesrc location=music.mp3 ! mp3parse ! mpg123 ! osssink
17
18 Plays and mp3 music file using mpg123
19
20 You can also stream files over http:
21
22  gst\-launch httpsrc location=http://domain.com/music.mp3 ! mad ! osssink
23
24 And using gnome\-vfs you can do the same with:
25
26  gst\-launch gnomevfssrc location=music.mp3 ! mad ! osssink
27  gst\-launch gnomevfssrc location=http://domain.com/music.mp3 ! mad ! osssink
28
29 And too play the same song with gnome\-vfs via smb:
30
31  gst\-launch gnomevfssrc location=smb://computer/music.mp3 ! mad ! osssink
32
33 You can also stream your mpeg 1 system streams from one machine to another using RTP by:
34  
35  gst\-launch rtprecv media_type=mpeg1_sys ! mpegdemux video_%02d! { queue ! mpeg2dec ! xvideosink } mpegdemux0.audio_%02d! { queue ! mad ! osssink }
36
37 on the receiver end and:
38
39  gst\-launch filesrc location=mpeg1system.mpeg ! mpegparse ! rtpsend ip=IPorHostname
40
41 on the transmitter end.
42
43 Here we convert a Mp3 file into an Ogg Vorbis file:
44
45  gst\-launch filesrc location=music.mp3 ! mad ! vorbisenc ! disksink location=music.ogg
46
47 Or converting from mp3 to Flac:
48  gst\-launch filesrc location=claptrap.mp3 ! mad ! flacenc ! disksink location=test.flac
49
50 And then we can play that file with:
51
52  gst\-launch filesrc location=music.ogg ! vorbisdec ! osssink
53
54 Some other useful pipelines are..
55 Plays wav files (currently there are no wav encoders):
56
57  gst\-launch filesrc location=music.wav ! parsewav ! osssink
58
59 Converts wav files into mp3 and ogg files:
60
61  gst\-launch filesrc location=music.wav ! parsewav ! vorbisenc ! disksink location=music.ogg
62  gst\-launch filesrc location=music.wav ! parsewav ! mpegaudio ! disksink location=music.mp3
63
64 You can also use lame for mp3 encoding if you have it installed, it does a 
65 much better job than mpegaudio.
66
67 Rips all songs from cd and saves them into a mp3 file:
68
69  gst\-launch cdparanoia ! mpegaudio ! disksink location=cd.mp3
70
71 You can toy around with gst\-inspect to discover the settings for 
72 cdparanoia to rip individual tracks
73
74 Record sound from your sound input and encode it into an ogg file:
75
76  gst\-launch osssrc ! vorbisenc ! disksink location=input.ogg
77
78 gst\-launch not only handles audio but video as well:
79 For mpeg video files (here outputing to aasink) :
80
81  gst\-launch filesrc location=JB_FF9_TheGravityOfLove.mpg ! mpegdemux video_%02d! { queue ! mpeg2dec ! aasink }
82
83 For vob files (here outputting image to sdlvideosink): 
84  gst\-launch filesrc location=/flflfj.vob ! mpegdemux video_%02d! { queue ! mpeg2dec ! sdlvideosink }
85
86 Play a mpeg movie with sound using the sdlvideosink:
87  gst\-launch filesrc location=movie.mpg ! mpegdemux video_%02d! { queue ! mpeg2dec ! sdlvideosink } mpegdemux0.audio_%02d! { queue ! mad ! osssink }
88
89 Playing a avi movie would be done with something like this:
90 gst\-launch filesrc location=movie.avi ! avidemux video_%02d! { queue ! windec ! sdlvideosink }
91
92 See other docs, examples, and the source for description on how to
93 create a PIPELINE\-DESCRIPTION.
94 .
95 .SH "OPTIONS"
96 .l
97 \fIgst\-launch\fP accepts the following options:
98 .TP 8
99 .B  \-\-help
100 Print help synopsis and available FLAGS
101 .TP 8
102 .B  \-\-gst\-info\-mask=FLAGS
103 \fIGStreamer\fP info flags to set (list with \-\-help)
104 .TP 8
105 .B  \-\-gst\-debug\-mask=FLAGS
106 \fIGStreamer\fP debugging flags to set (list with \-\-help)
107 .TP 8
108 .B  \-\-gst\-mask=FLAGS
109 \fIGStreamer\fP info and debugging flags to set (list with \-\-help)
110 .TP 8
111 .B  \-\-gst\-plugin\-spew
112 \fIGStreamer\fP info flags to set
113 Enable printout of errors while loading \fIGStreamer\fP plugins
114 .TP 8
115 .B  \-\-gst\-plugin\-path=PATH
116 Add directories separated with ':' to the plugin search path
117 .SH "SEE ALSO"
118 .BR gst\-complete (1),
119 .BR gst\-register (1),
120 .BR gst\-inspect (1)
121 .SH "AUTHOR"
122 The GStreamer team at http://gstreamer.net/