<div dir="ltr"><div><div><div>Hi Henry.<br><br></div>One way to synchronize audio and video is to mux these two at the sender end. You can mux H.264 and AAC using matroskamux or mpegtsmux. Matroskamux require use of tcp while TS mux can use UDP. So no need to transport a large amount of raw audio samples. Also using encoded audio, your decoder can detect gaps in audio. Sending raw audio introduces challenges you may not want to deal with.<br><br>Matroskamux can take Vorbis. Various muxes has various properties when it comes to payload types and transport requirements. If the Pi gets too loaded decoding the audio too, then use lower sample rate and/or mono or even better, throw out the Pi and buy Pi2s.<br><br></div><div>Here is the pipeline I use on the RaspPis<br><br>        gst-launch-1.0 -v udpsrc port=$port caps="$caps" !\<br>                rtpjitterbuffer         !\<br>                decodebin name=decoder  !\<br>                autovideosink sync=true decoder. !\<br>                alsasink sync=true<br><br></div><div>Note that running ntpd on both sender and receiver helps get boths system clock to drift very little compared, but you will need to run ntpd over longer time so the ntpd detects the drift of the Pi's harware clock correctly and if you place the Pi in an environment with large temperature changes, ntpd has a delay picking up the changes due to temperature changes in the drift of the internal clock<br></div><div><br></div>Best regards<br></div>Peter<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 18, 2016 at 1:21 PM, henryco <span dir="ltr"><<a href="mailto:fhenryco@yahoo.fr" target="_blank">fhenryco@yahoo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">OK, thank you, i eventually made it work with a huge udpsrc<br>
buffer-size=50000000 just to be sure this not anymore a limitation ... and i<br>
will come back on this later<br>
<br>
As for the sound i eventually decided to send it uncompressed (LAN is not<br>
bandwidth limited) to avoid charge the Pi too much.  i get both sound and<br>
image together almost perfect (one sound crack from time to time) ... dont<br>
know if i can do better , with simple following pipeline for the sound<br>
<br>
gst-launch-1.0 -v pulsesrc  ! audioconvert ! rtpL16pay ! udpsink<br>
host=192.168.1.19 port=5500<br>
<br>
gst-launch-1.0 -v udpsrc buffer-size=50000000 port=5500 \<br>
caps="application/x-rtp, media=(string)audio, clock-rate=(int)44100,<br>
encoding-name=(string)L16, encoding-params=(string)2, channels=(int)2,<br>
payload=(int)96" \<br>
! rtpL16depay ! pulsesink<br>
<br>
and for the video<br>
<br>
gst-launch-1.0 -v ximagesrc  use-damage=true ! queue  ! videoflip method=5 !<br>
videoconvert  ! videoscale \<br>
!<br>
"video/x-raw,framerate=(fraction)30/1,format=(string)I420,force-aspect-ratio=(gboolean)true"<br>
\<br>
! queue ! x264enc tune=zerolatency  bitrate=5000 speed-preset=ultrafast  !<br>
<span class="">queue ! rtph264pay  pt=96 \<br>
! udpsink host=192.168.1.19 port=5000<br>
<br>
</span><span class="">gst-launch-1.0 -v udpsrc port=5000 caps="application/x-rtp,<br>
media=(string)video, clock-rate=(int)90000,<br>
encoding-name=(string)H264" ! rtpjitterbuffer ! rtph264depay ! queue !<br>
h264parse ! queue ! omxh264dec !<br>
queue ! eglglessink<br>
<br>
</span>the next step is to try to solve the delay : sound is very late though not<br>
compressed , and to share usb mouse and keyboard with virtualhere to get the<br>
homemade thinclient...i'm beginning to believe in it... any advices welcome<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/forwarded-screen-stutters-every-several-seconds-tp4675279p4675336.html" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/forwarded-screen-stutters-every-several-seconds-tp4675279p4675336.html</a><br>
<span class="im HOEnZb">Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
</span><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" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br></div>