<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"MS Pゴシック";
panose-1:2 11 6 0 7 2 5 8 2 4;}
@font-face
{font-family:メイリオ;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Meiryo UI";
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@Meiryo UI";
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@MS Pゴシック";
panose-1:2 11 6 0 7 2 5 8 2 4;}
@font-face
{font-family:"\@メイリオ";
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0mm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"MS Pゴシック";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0mm;
mso-margin-bottom-alt:auto;
margin-left:0mm;
font-size:12.0pt;
font-family:"MS Pゴシック";}
span.17
{mso-style-type:personal-compose;
font-family:メイリオ;
color:black;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Arial",sans-serif;}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:99.25pt 30.0mm 30.0mm 30.0mm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026">
<v:textbox inset="5.85pt,.7pt,5.85pt,.7pt" />
</o:shapedefaults></xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="JA" link="#0563C1" vlink="#954F72" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">I would like to know how to synchronize H264 movie and G711 audio on the WebRTC server with pipeline by rtpbin.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">I have tried this parameter several times and didn't work, please let me know what is wrong in this parameter.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">Let me know if this doesn't makes sense for you, I will explain more.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">Can you advise me ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><Background><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">I use gstreamer and janus on the same server.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">A movie data and audio data are sent to gstreamer with rtp.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">After then I use <No.1 pipeline> to synchronize movie and audio with rtpbin and pass them to janus.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin will synchronize the movie and audio by each timestamp of data in my understanding.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">But I found that they were NOT sync.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">It meant that the movie and audio were out of sync.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">I am trying to find out where the problem is and I am thinking of using <No.2 pipeline> between rtp and
rtpbin to cause the situation of out of sync. <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">And if out of sync situation happens, then that means there is a problem with pipeline.
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"> However, I am also not sure about this <No.2 pipeline> to make it work, so I would like to make sure
if my understanding is correct.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><No.1 Pipeline><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">gst-launch-1.0 rtpbin name=rtpbin rtpbin name=rtpbin2
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">udpsrc port=60000 caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)MP2T-ES"
! <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin.send_rtp_sink_0
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin.send_rtp_src_0 ! rtpmp2tdepay ! queue max-size-time=0 ! tsdemux !
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">video/x-h264,framerate=30/1,width=1280,height=960,tune=zerolatency !
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">h264parse ! rtph264pay ! rtpbin2.send_rtp_sink_0
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">udpsrc port=60001 ! rtpbin.recv_rtcp_sink_0
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin.send_rtcp_src_0 ! udpsink host=192.168.31.1 port=60011 sync=false async=false
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin2.send_rtp_src_0 ! udpsink host=127.0.0.1 port=5005
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin2.send_rtcp_src_0 ! udpsink host=127.0.0.1 port=5105 sync=false async=false
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">udpsrc port=51005 ! rtpbin2.recv_rtcp_sink_0
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">udpsrc port=61002 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)PCMU"
! <o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin.send_rtp_sink_1
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin.send_rtp_src_1 ! queue ! rtppcmudepay ! rtppcmupay ! rtpbin2.send_rtp_sink_1
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">udpsrc port=60003 ! rtpbin.recv_rtcp_sink_1
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin.send_rtcp_src_1 ! udpsink host=192.168.31.1 port=60013 sync=false async=false<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin2.send_rtp_src_1 ! udpsink host=127.0.0.1 port=5003
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">rtpbin2.send_rtcp_src_1 ! udpsink host=127.0.0.1 port=5103 sync=false async=false
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">udpsrc port=51003 ! rtpbin2.recv_rtcp_sink_1
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><No.2 Pipeline><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:12.0pt;mso-para-margin-left:1.0gd"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">gst-launch-1.0 udpsrc port=61002 ! queue max-size-time=0 min-threshold-time=1500000000 ! udpsink host=192.168.31.138
port=60002<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black">Best regards.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Meiryo UI";color:black"><o:p> </o:p></span></p>
</div>
</body>
</html>