<div dir="ltr">You need to do as Andrey suggested and retrieve the contents of the PMT, which will give you the audio and video PIDs corresponding to program #1 and program #2. I can see from your pipelines that you've use the same audio and video PIDs in each decode pipeline (audio_0025 and video_0022) - these should be different for program #1 and program #2. <br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 9 November 2013 18:34, Yashil <span dir="ltr"><<a href="mailto:yashil1@yahoo.com" target="_blank">yashil1@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thank you Andrey. Now I can use the following pipeline to play audio and<br>
video of program #2 in mpts_out.ts example file.<br>
<br>
gst-launch-1.0 filesrc location="D:/mpts_out.ts" ! tsdemux program-number=2<br>
name=demux demux.audio_0025 ! queue ! decodebin ! audioconvert !<br>
audioresample ! autoaudiosink demux.video_0022 ! queue ! decodebin !<br>
videoconvert ! videoscale ! autovideosink<br>
<br>
But when I want to play program #1's audio and video, it fails:<br>
<br>
gst-launch-1.0 filesrc location="D:/mpts_out.ts" ! tsdemux program-number=1<br>
name=demux demux.audio_0025 ! queue ! decodebin ! audioconvert !<br>
audioresample ! autoaudiosink demux.video_0022 ! queue ! decodebin !<br>
videoconvert ! videoscale ! autovideosink<br>
<div class="im">Setting pipeline to PAUSED ...<br>
Pipeline is PREROLLING ...<br>
</div>ERROR: from element /GstPipeline:pipeline0/GstTSDemux:demux: Internal data<br>
stream error.<br>
Additional debug info:<br>
mpegtsbase.c(1307): mpegts_base_loop ():<br>
/GstPipeline:pipeline0/GstTSDemux:demux: No program activated before EOS<br>
ERROR: pipeline doesn't want to preroll.<br>
<div class="im">Setting pipeline to NULL ...<br>
Freeing pipeline ...<br>
<br>
</div>"Media Player Classic" plays well audio and video of program #1 of this .ts<br>
file by default.<br>
<br>
Also I was able to play video part of program #1 using the following<br>
command:<br>
gst-launch-1.0 filesrc location="D:/mpts_out.ts" ! tsdemux program-number=1<br>
<div class="im">! decodebin ! videoconvert ! autovideosink<br>
<br>
</div>Now problem 1 is: Playback of audio for program #2 is not smooth and I get<br>
intermittent audio cuts.<br>
Problem 2: How I can play audio of program #1 along with it's video?<br>
<br>
I am using Windows 8 and I have installed gstreamer 1.2.0 including all<br>
plugins. K-Lite Codec Pack is also installed.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Taking-a-chosen-program-a-v-from-multiprogram-MPEG-TS-freezes-tp4662381p4663210.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Taking-a-chosen-program-a-v-from-multiprogram-MPEG-TS-freezes-tp4662381p4663210.html</a><br>
<div class="im HOEnZb">Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br></div>