diff --git a/tools/README b/tools/README index 6771d23c6e..d7585cc670 100644 --- a/tools/README +++ b/tools/README @@ -64,13 +64,13 @@ Record sound from your sound input and encode it into an ogg file: 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 } + gstreamer-launch disksrc location=video.mpg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink } + gstreamer-launch disksrc location=video.mpg ! mpegdemux 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 } + gstreamer-launch disksrc location=video.mpeg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink } + gstreamer-launch disksrc location=video.mpeg ! mpegdemux private_stream_1.0! { queue ! ac3dec ! osssink } Note: The types of audio streams in the mpeg files can vary! diff --git a/tools/gstreamer-launch.c b/tools/gstreamer-launch.c index e50db14cbd..9d0a13c25d 100644 --- a/tools/gstreamer-launch.c +++ b/tools/gstreamer-launch.c @@ -167,7 +167,10 @@ main(int argc, char *argv[]) arg_search(GST_BIN(pipeline),"xid",xid_handler,NULL); fprintf(stderr,"RUNNING pipeline\n"); - gst_element_set_state (pipeline, GST_STATE_PLAYING); + if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS) { + fprintf(stderr,"pipeline doesn't want to play\n"); + exit (-1); + } g_idle_add(idle_func,pipeline); #ifdef USE_GLIB2