<div dir="auto"><div>Hi,</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Le mar. 27 déc. 2022, 06 h 15, Masoud MJ via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>I'm currently writing a webrtc mcu using rust and gstreamer.<br>I get video tracks from webrtc peer using webrtc-rs crate and forward them to gstreamer <br>and then I will arrange them in grid layout form using compositor element <br>and then get output using appsink element and then forward that to other webrtc peer.<br><br>The project has three parts :<br><br>1- front<br>2- main server<br>3- compositor server<br><br>both servers are written in rust<br><br>The problem is when I connect front part directly to compositor server it totally works well but if front connects to main server and then main server connects to compositor server<br>the video from compositor server will arrive to browser almost at 2-3 minutes later ...<br><br>I guess it a timing or clock problem</div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br>I mention some of my debugging results as hints :<br><br>1-I used udpsrc instead of appsrc and did not have any effect<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">In both cases, your apps need to enable do-timestamp, as RTP stack needs the arrival time. appsrc needs is-live to be set. Not timestamp and not live sources can cause issues, not sure if that would fully match the symptoms.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br>2-I used single appsrc with ssrcdemux element instead of multiple appsrc and did not have any effect<br><br>3-I used decodebin instead of rtph264depay + avdec_h264 and did not have any effect<br><br>4-I implemented main server in both Go and Rust and behaviour of them was same<br><br>5-I tested webrtc-rs in both single port and multi port and both showed same behaviour<br><br>6-Packeting rtp with gstreamer rtph264pay or in webrtc-rs also have same behaviour<br><br>I created a minimal as possible copy of my project for your test.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">During holidays, i stay away from this, but I'd verify if the delay matches exactly the time you have been playing through before adding something.</div><div dir="auto"><br></div><div dir="auto">If so, it likely be that the start time mode (sorry can't remember the property name) isn't set correctly on compositor. The compositor, will by default fill the portion of time from 0 to now with black images.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br>------------------------------------------------------------<br><br>Test steps for direct connection from browser to compositor server :<br><br>1-in "compositor server" folder run "cargo run"<br><br>2-in "front" folder edit index.html file and set "SERVER_PORT" variable to 8080<br><br>3-open index.html in browser<br><br>4-click on Add Webcam button as many times as you want<br><br><br>Test steps for connection from browser to main server and then from main server to compositor server :<br><br>1-in "compositor server" folder run "cargo run"<br><br>2-in "front" folder edit index.html file and set "SERVER_PORT" variable to 9090<br><br>3-in "main server" folder run "cargo run"<br><br>4-open index.html in browser<br><br>5-click on Add Webcam button as many times as you want<br><br>------------------------------------------------------------<br>Thank you in advance.<br><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/14sefW_L9lFnl_d__D_AZTVXqoqB29i_Z/view?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none;width:100%" aria-label="gst-compositor.zip" target="_blank" rel="noreferrer"><img style="vertical-align:bottom;border:none" src="https://drive-thirdparty.googleusercontent.com/16/type/application/zip"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">gst-compositor.zip</span></a><div class="chip_delete_button" aria-label="Bouton Supprimer, touchez deux fois pour activer"><div class="chip_delete_button_icon"></div></div></div><br></div>
</blockquote></div></div></div>