<div dir="ltr"><div><div><div><div><div><div><div>Hi Jesper.<br><br></div>Thanks for the info. Very helpful and very useful.<br><br></div>Now for the other end, the consuming or decoding end. I assume I can do something similar with tsdemux.<br><br></div>  gst-launch-v udpsrc ..... ! mtsdemux program-number=10 ! .....<br><br></div>Haven't tested it yet, but it'll be close I think.<br><br></div>What if you want to control what program number to decode in a decodebin. Is there a less known, less documented way to parse this information to decodebin? I remember there is a way to set some parameters of a bin in GStreamer, however I have never found the formal documentations for that.<br><br></div>best regards.<br><br></div>Peter Maersk-Moller<br><div><div><div><div><br><br><br><div><br>Is there a way to filter which PID gets decoded when using decodebin or tsdemux<br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 27, 2015 at 9:39 AM, Jesper Larsen <span dir="ltr"><<a href="mailto:knorr.jesper@gmail.com" target="_blank">knorr.jesper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Well, my knowledge was just increased. You can actually set the prog-map preoperty using gst-launch<br><br>gst-launch-1.0 -v videotestsrc name=vsrc1 is-live=true do-timestamp=true
 ! x264enc ! queue ! h264parse ! muxer.sink_300 mpegtsmux name=muxer prog-map=program_map,sink_300=10,sink_301=11 ! queue ! 
tcpserversink host=0.0.0.0 sync-method=2 recover-policy=keyframe 
port=5000  videotestsrc name=vsrc2 is-live=true do-timestamp=true ! 
x264enc ! queue ! h264parse ! muxer.sink_301<br><br></div>This will put the video on PID 300 on program number 10, and PID 301 on program 11.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 27, 2015 at 8:12 AM, Jesper Larsen <span dir="ltr"><<a href="mailto:knorr.jesper@gmail.com" target="_blank">knorr.jesper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div>You can set the PID when requesting a sink pad from the mux. I.e.<br><br>gst-launch-1.0 -v videotestsrc name=vsrc1 is-live=true do-timestamp=true
 ! x264enc ! queue ! h264parse ! muxer.sink_300 mpegtsmux name=muxer ! queue ! 
tcpserversink host=0.0.0.0 sync-method=2 recover-policy=keyframe 
port=5000  videotestsrc name=vsrc2 is-live=true do-timestamp=true ! 
x264enc ! queue ! h264parse ! muxer.sink_301<br><br></div>to use PID 300 and 301 instead.<br><br></div>I'm afraid you cannot configure which PIDs belongs to which program/PMT using gst-launch.<br></div>You need to set the "prog-map" property of the mpegtsmux element, which takes a GstStructure, and to my knowledge you cannot specify a GstStructure using gst-launch.<br><br></div>An example of setting the two videostreams to specific program numbers (3 and 4):<br><br></div><div>GstElement *mux;<br></div>GstStructure *pm;<br><br></div><div>mux = gst_element_factory_make ("mpegtsmux", NULL);<br></div><div><br></div>pm = gst_structure_new_empty ("program_map");<br></div>gst_structure_set (pm, "sink_300", G_TYPE_INT, 3,<br></div>                           "sink_301", G_TYPE_INT, 4, NULL);<br></div>g_object_set (mux, "prog-map", pm, NULL);<br><br></div>This will associate PID 300 to program 3, and PID 301 to program 4. When you add the audio streams you simply give those a fixed PID as well, and associate them with the program containing the correct video stream.<br><br></div>Ad Astra.<br></div>Jesper<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, May 26, 2015 at 5:25 PM, Peter Maersk-Moller <span dir="ltr"><<a href="mailto:pmaersk@gmail.com" target="_blank">pmaersk@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div><div>Hi<br><br></div>When you are muxing multiple video streams with mpegtsmux, is there then a way to set/control (on the command line using gst-launch) the PIDs of video streams that the mpegtsmux chooses for each video stream?<br><br></div>A quick test with the following command line reveals mpegtsmux chooses PID 65 and 66.<br><br>gst-launch-1.0 -v videotestsrc name=vsrc1 is-live=true do-timestamp=true ! x264enc ! queue ! h264parse ! mpegtsmux name=muxer ! queue ! tcpserversink host=0.0.0.0 sync-method=2 recover-policy=keyframe port=5000  videotestsrc name=vsrc2 is-live=true do-timestamp=true ! x264enc ! queue ! h264parse ! muxer.<br><br></div>Assuming you have audio as well, is there a way to set/control which audio stream belongs to which video stream (for PAD/PMT) ?<br><br></div>Best regards<br></div>Peter MM<br></div>
<br></div></div>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">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>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<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>
<br></blockquote></div><br></div>