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