<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I made a mistake when connecting “mpegtsmux” to “rtpmp2tpay”.<div class=""><br class=""></div><div class="">Here is modified version:</div><div class=""><br class=""></div><div class=""><div class="">gat-launch-1.0 uridecodebin name=dec uri=<a href="udp://239.50.50.50:1234" class="">udp://239.50.50.50:1234</a> \</div><div class="">dec. ! videoconvert ! deinterlace ! videoscale method=0 ! tee name=vt \</div><div class="">dec. ! audioconvert ! audioresample ! audio/x-raw,rate=48000,channels=1 ! audiorate ! queue ! voaacenc bitrate=32000 ! tee name=at \</div><div class="">vt. ! queue ! videorate ! video/x-raw,width=640,height=512,framerate=25/1 ! x264enc ! h264parse ! mpegtsmux name=muxer alignment=7 ! rtpmp2tpay ! udpsink host=127.0.0.1 port=1111 \</div><div class="">at. ! queue ! aacparse ! muxer. \</div><div class=""><div class="">vt. ! queue ! videorate ! video/x-raw,width=320,height=256,framerate=25/1 ! x264enc ! h264parse ! mpegtsmux name=muxer1 alignment=7 ! rtpmp2tpay ! udpsink host=127.0.0.1 port=1112 \</div><div class="">at. ! queue ! aacparse ! muxer1. \</div></div><div class=""><div class="">vt. ! queue ! videorate ! video/x-raw,width=160,height=128,framerate=25/1 ! x264enc ! h264parse ! mpegtsmux name=muxer2 alignment=7 ! rtpmp2tpay ! udpsink host=127.0.0.1 port=1113 \</div><div class="">at. ! queue ! aacparse ! muxer2.</div><div class=""><br class=""></div></div><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">--</div><div class="">Yi-Lung (Bruce) Tsai</div><div class=""><a href="mailto:wagamama.tsai@gmail.com" class="">wagamama.tsai@gmail.com</a></div><div class=""><br class=""></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Apr 21, 2017, at 2:32 PM, Dmitriy Novash <<a href="mailto:programer@wnet.ua" class="">programer@wnet.ua</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
<div bgcolor="#FFFFFF" text="#000000" class=""><p class="">Hi, Bruce.<br class="">
<br class="">
Problem with combine video and audio.<br class="">
$ GST_DEBUG=1 gst-launch-1.0 uridecodebin name=dec
uri=<a href="udp://239.50.50.50:1234" class="">udp://239.50.50.50:1234</a> dec. ! videoconvert ! deinterlace !
tee name=vt dec. ! audioconvert ! audioresample !
audio/x-raw,rate=48000,channels=1 ! audiorate ! queue ! voaacenc
bitrate=32000 ! tee name=at vt. ! videoscale method=0 ! videorate
! video/x-raw,width=640,height=512,framerate=25/1 ! x264enc !
h264parse ! mpegtsmux name=muxer alignment=7 at. ! queue !
aacparse ! muxer. ! rtpmp2tpay ! udpsink host=127.0.0.1 port=1111<br class="">
0:00:00.015467297 3955 0x1f2a980 ERROR
GST_PIPELINE grammar.y:959:priv_gst_parse_yyparse: syntax error<br class="">
0:00:00.015490467 3955 0x1f2a980 ERROR
GST_PIPELINE grammar.y:959:priv_gst_parse_yyparse: syntax error<br class="">
<br class="">
Simplify code:<br class="">
$ GST_DEBUG=1 gst-launch-1.0 uridecodebin name=dec
uri=<a href="udp://239.50.50.50:1234" class="">udp://239.50.50.50:1234</a> dec. ! videoconvert ! deinterlace !
tee name=vt dec. ! audioconvert ! audioresample !
audio/x-raw,rate=48000,channels=1 ! audiorate ! queue ! voaacenc
bitrate=32000 ! tee name=at vt. ! videoscale method=0 ! videorate
! video/x-raw,width=640,height=512,framerate=25/1 ! x264enc !
h264parse ! mpegtsmux name=muxer alignment=7 at. ! fakesink<br class="">
Установка конвейера в состояние PAUSED…<br class="">
Конвейер работает и не требует состояния PREROLL…<br class="">
Установка конвейера в состояние PLAYING…<br class="">
New clock: GstSystemClock<br class="">
</p>
<br class="">
<div class="moz-cite-prefix">20.04.2017 18:58, Bruce Tsai пишет:<br class="">
</div>
<blockquote cite="mid:C305F643-B41E-4661-8CC9-D87F7D5CFA72@gmail.com" type="cite" class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<div class="">First, there is no need to mix-use “decodebin” and
“tsdemux”.</div>
<div class="">“decodebin” already has demux capability.</div>
<div class="">Second, there are too many “queue” in pipeline.</div>
<div class="">Each “queue” introduces a new thread.</div>
<div class="">Too many unnecessary threads is not a good idea.</div>
<div class="">Third, “tee” for audio stream is also necessary.</div>
<div class="">Each “mux” needs a copy of video and a copy of
audio.</div>
<div class="">Use “tee” to get three copies of video and audio
respectively.</div>
<div class="">Then combine each pair of video and audio to a
“mpegtsmux”.</div>
<div class=""><br class="">
</div>
<div class="">I tried to rewrite your pipeline as follows:</div>
<div class=""><br class="">
</div>
<div class="">gat-launch-1.0 uridecodebin name=dec uri=<a moz-do-not-send="true" href="udp://239.50.50.50:1234" class="">udp://239.50.50.50:1234</a>
\</div>
<div class="">dec. ! videoconvert ! deinterlace ! videoscale
method=0 ! tee name=vt \</div>
<div class="">dec. ! audioconvert ! audioresample !
audio/x-raw,rate=48000,channels=1 ! audiorate ! queue ! voaacenc
bitrate=32000 ! tee name=at \</div>
<div class="">vt. ! queue ! videorate !
video/x-raw,width=640,height=512,framerate=25/1 ! x264enc !
h264parse ! mpegtsmux name=muxer alignment=7 \</div>
<div class="">at. ! queue ! aacparse ! muxer. ! rtpmp2tpay !
udpsink host=127.0.0.1 port=1111 \</div>
<div class="">
<div class="">vt. ! queue ! videorate !
video/x-raw,width=320,height=256,framerate=25/1 ! x264enc !
h264parse ! mpegtsmux name=muxer1 alignment=7 \</div>
<div class="">at. ! queue ! aacparse ! muxer1. ! rtpmp2tpay !
udpsink host=127.0.0.1 port=1112 \</div>
</div>
<div class="">
<div class="">vt. ! queue ! videorate !
video/x-raw,width=160,height=128,framerate=25/1 ! x264enc !
h264parse ! mpegtsmux name=muxer2 alignment=7 \</div>
<div class="">at. ! queue ! aacparse ! muxer2. ! rtpmp2tpay !
udpsink host=127.0.0.1 port=1113</div>
</div>
<div class=""><br class="">
</div>
<div class="">I didn’t verify above pipeline on my machine.</div>
<div class="">You could try it with first pair of output only.</div>
<div class="">Simplicity is good for debug.</div>
<div class="">Then you could add second pair and then third pair.</div>
<div class=""><br class="">
</div>
<br class="">
<div class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">--</div>
<div class="">Yi-Lung (Bruce) Tsai</div>
<div class=""><a moz-do-not-send="true" href="mailto:wagamama.tsai@gmail.com" class="">wagamama.tsai@gmail.com</a></div>
<div class=""><br class="">
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Apr 20, 2017, at 9:49 PM, Dmitriy Novash <<a moz-do-not-send="true" href="mailto:programer@wnet.ua" class="">programer@wnet.ua</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="content-type" content="text/html;
charset=utf-8" class="">
<div bgcolor="#FFFFFF" text="#000000" class=""> Hi all.<br class="">
<br class="">
I have many TV streams (Mpeg2) in udp multicast.<br class="">
I want to have stream in H264+AAC in udp multicast with 3
resolutions: 1:1 (original),1:2,1:4. Now I do it with 3
processes of gst-launch, but for optimization of CPU usage
I think I can do it in one process.<br class="">
After several tries I get 3 videos with 3 resolutions, but
i can't get audio for all threads, only for one.<br class="">
I'm using gstreamer 1.00+ version:<br class="">
$ gst-launch-1.0 --version<br class="">
gst-launch-1.0 version 1.8.3<br class="">
GStreamer 1.8.3<br class="">
<br class="">
My configuration:<br class="">
<code class="java plain">gst-launch-</code><code class="java value">1.0</code> <code class="java plain">udpsrc
uri=udp:</code><code class="java comments">//239.50.50.50:1234
! queue ! tsparse ! queue ! tsdemux name=demux \<br class="">
demux. ! queue ! mpegvideoparse ! queue ! decodebin !
queue ! deinterlace ! \<br class="">
tee name=tee1 ! queue ! videoscale method=0 ! videorate
! video/x-raw, width=640, height=512, framerate=25/1 !
x264enc ! h264parse ! mpegtsmux name=muxer alignment=7 \<br class="">
demux. ! queue ! decodebin ! queue ! audioconvert !
audioresample ! queue ! audio/x-raw, rate=48000,
channels=1 ! audiorate ! voaacenc bitrate=32000 ! queue
! aacparse ! queue ! tee name=tee2 ! queue ! muxer. \<br class="">
muxer. ! rtpmp2tpay ! udpsink host=127.0.0.1 port=1111 \<br class="">
tee1. ! queue ! videoscale method=0 ! videorate !
video/x-raw, width=320, height=256, framerate=25/1 !
x264enc ! h264parse ! mpegtsmux name=muxer1 alignment=7
muxer1. ! rtpmp2tpay ! udpsink host=127.0.0.1 port=1112
\<br class="">
tee1. ! queue ! videoscale method=0 ! videorate !
video/x-raw, width=160, height=128, framerate=25/1 !
x264enc ! h264parse ! mpegtsmux name=muxer2 alignment=7
muxer2. ! rtpmp2tpay ! udpsink host=127.0.0.1 port=1113</code><br class="">
<br class="">
I can't join mpedtsmux and tee.<br class="">
<br class="">
So I want to decode video, get 3 copies, each copy scale
to some resolution, encode, decode + encode audio and join
to each copy of video, output each copy in udp unicast to
some port.<br class="">
<br class="">
Help, maybe someone have working solution for my task.<br class="">
</div>
_______________________________________________<br class="">
gstreamer-devel mailing list<br class="">
<a moz-do-not-send="true" href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a><br class="">
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br class="">
</div>
</blockquote>
</div>
<br class="">
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<br class="">
<pre wrap="" class="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br class="">
<pre class="moz-signature" cols="72">--
BR, Dmitriy Novash
Wnet IPTV/Media team
tel: +380(44) 5-900-800 (доп. 1132)
<a class="moz-txt-link-freetext" href="http://wnet.ua/">http://wnet.ua</a></pre>
</div>
_______________________________________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a><br class="">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br class=""></div></blockquote></div><br class=""></div></body></html>