source: trunk/third/gstreamer/tools/README @ 18714

Revision 18714, 4.4 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18713, which included commits to RCS files with non-trunk default branches.
Line 
1gst-launch
2================
3
4This is a tool that will construct pipelines based on a command-line
5syntax.  The syntax is rather complex to enable all the features I want it
6to have, but should be easy to use for most people.  Multi-pathed and
7feedback pipelines are the most complex.
8
9A simple commandline looks like:
10
11 gst-launch filesrc location=music.mp3 ! mad ! osssink
12
13This plays an mp3 music file music.mp3 using libmad, and:
14
15 gst-launch filesrc location=music.mp3 ! mp3parse ! mpg123 ! osssink
16
17Plays and mp3 music file using mpg123
18
19You can also stream files over http:
20
21 gst-launch httpsrc location=http://domain.com/music.mp3 ! mad ! osssink
22
23And using gnome-vfs you can do the same with:
24
25 gst-launch gnomevfssrc location=music.mp3 ! mad ! osssink
26 gst-launch gnomevfssrc location=http://domain.com/music.mp3 ! mad ! osssink
27
28And too play the same song with gnome-vfs via smb:
29
30 gst-launch gnomevfssrc location=smb://computer/music.mp3 ! mad ! osssink
31
32Here we convert a Mp3 file into an Ogg Vorbis file:
33
34 gst-launch filesrc location=music.mp3 ! mad ! vorbisenc ! disksink location=music.ogg
35
36And then we can play that file with:
37
38 gst-launch filesrc location=music.ogg ! vorbisdec ! osssink
39
40Some other useful pipelines are..
41Plays wav files (currently there are no wav encoders):
42
43 gst-launch filesrc location=music.wav ! parsewav ! osssink
44
45Converts wav files into mp3 and ogg files:
46
47 gst-launch filesrc location=music.wav ! parsewav ! vorbisenc ! disksink location=music.ogg
48 gst-launch filesrc location=music.wav ! parsewav ! mpegaudio ! disksink location=music.mp3
49
50You can also use lame for mp3 encoding if you have it installed, it does a
51much better job than mpegaudio.
52
53Rips all songs from cd and saves them into a mp3 file:
54
55 gst-launch cdparanoia ! mpegaudio ! disksink location=cd.mp3
56
57You can toy around with gst-inspect to discover the settings for
58cdparanoia to rip individual tracks
59
60Record sound from your sound input and encode it into an ogg file:
61
62 gst-launch osssrc ! vorbisenc ! disksink location=input.ogg
63
64gst-launch not only handles audio but video as well:
65For mpeg1 files (video and audio streams respectively):
66
67 gst-launch filesrc location=video.mpg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink }
68 gst-launch filesrc location=video.mpg ! mpegdemux audio_00! { queue ! mad ! osssink }
69
70for mpeg1 with both audio and video (for glib2):
71
72 gst-launch filesrc location=video.mpg ! mpegdemux name=demux video_00! { queue ! mpeg2dec ! sdlvideosink } demux.audio_00! { queue ! mad ! osssink }
73
74for mpeg1 with both audio and video (for gtk1.2, the shim doesn't handle the 'name' property yet):
75
76 gst-launch filesrc location=video.mpg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink } mpegdemux0.audio_00! { queue ! mad ! osssink }
77
78For mpeg2 files (video and audio streams respectively):
79 
80 gst-launch filesrc location=video.mpeg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink }
81 gst-launch filesrc location=video.mpeg ! mpegdemux private_stream_1.0! { queue ! a52dec ! osssink }
82
83for mpeg2 with both audio and video (glib2):
84
85 gst-launch filesrc location=video.mpg ! mpegdemux name=demux video_00! { queue ! mpeg2dec ! sdlvideosink } demux.private_stream_1.0! { queue ! a52dec ! osssink }
86
87Note: The types of audio streams in the mpeg files can vary!
88
89For an avi file (DivX, mjpeg,...)
90
91 gst-launch filesrc location=video.avi ! avidecoder video_00! { queue ! sdlvideosink } avidecoder0.audio_00! { queue ! osssink }
92
93
94 
95gst-complete
96==================
97
98This is a simple utility which provides custom bash completion when
99typing gst-launch commands.
100
101Simply run "gst-compprep" as root to build the registry of completions,
102and then put, in your .bashrc,
103"complete -C gst-complete gst-launch"
104(ensuring that gst-complete is on your path).
105
106You can then enjoy context sensitive tab-completion of gst-launch
107commands.
108
109
110gst-register
111==================
112
113This tool will perform an introspection on all available plugins and will
114create a registry file in /etc/gstreamer/reg.xml. Startup time will be
115much faster since the gstreamer core doesn't have to bring all the plugins
116files into memory at startup. As with gst-compprep you need to run this
117as root for it too work correctly.
118
119
120gst-inspect
121=================
122
123Allows you to check the properties of plugins and elements.
124
125 ./gst-inspect
126 
127will show all the plugins available and the elements they contain.
128
129 ./gst-inspect <pluginname/elementname>
130
131shows more info about the plugin/element.
132
133
Note: See TracBrowser for help on using the repository browser.