<div dir="ltr">Hi,<div><br></div><div>Let me say what I have understood from your words and more tests.</div><div><br></div><div>1) udpsink sync=true -> the rhythm of the throughput is performed according to the clock from the buffers.</div><div><br></div><div>2) when we are re-packing packets in groups of packets for UDP, is the resulting group timestamped only when the first packet from the group has timestamp?</div><div><br></div><div>3) only the first MPEGTSMUX packet of a actual video frame has timestamps?</div><div><br></div><div>4) If above answers is YES, I guess that the reason is that when we are setting min=max=1316 or alignment=7 it is more likely to have a first packet in a group without timestamp or GST_CLOCK_NONE.</div><div><br></div><div>Extra tests:</div><div><br></div><div>This works <span style="font-size:12.8px">"min=max=94 (half a MPEG-TS packet - 188)", blocksize has no impact:</span></div><div><span style="font-size:12.8px">gst-launch-1.0 filesrc location=test.ts ! tsparse ! tsdemux ! h264parse ! mpegtsmux ! rndbuffersize min=94 max=94 ! udpsink port=5014 host=127.0.0.1 sync=true enable-last-sample=false send-duplicates=false blocksize=1316</span><br></div><div><span style="font-size:12.8px">But wireshark points ~140 bytes per UDP packet</span></div><div><br></div><div><span style="font-size:12.8px">This also works</span> <span style="font-size:12.8px">"min=max=188", </span><span style="font-size:12.8px">blocksize has no impact:</span></div><div><div><span style="font-size:12.8px">gst-launch-1.0 filesrc location=test.ts ! tsparse ! tsdemux ! h264parse ! mpegtsmux ! rndbuffersize min=188 max=188 ! udpsink port=5014 host=127.0.0.1 sync=true enable-last-sample=false send-duplicates=false blocksize=1316</span><br></div></div><div><span style="font-size:12.8px">But wireshark points ~230 bytes per UDP packet</span><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><div><span style="font-size:12.8px">This also works "alignment=1",</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">blocksize has no impact:</span></div><div><span style="font-size:12.8px">gst-launch-1.0 filesrc location=test.ts ! tsparse ! tsdemux ! h264parse ! mpegtsmux alignment=1 ! udpsink port=5014 host=127.0.0.1 sync=true enable-last-sample=false send-duplicates=false blocksize=1316</span><br></div></div><div><span style="font-size:12.8px">But wireshark points ~230 bytes per UDP packet</span><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">This </span><span style="font-size:12.8px">works similar to sync=false</span><span style="font-size:12.8px"> "alignment=7" <- for UDP streaming</span><span style="font-size:12.8px">:</span></div><div><span style="font-size:12.8px">GST_DEBUG=basesink:6 gst-launch-1.0 filesrc location=test.ts ! tsparse ! tsdemux ! h264parse ! mpegtsmux alignment=7 ! udpsink port=5014 host=127.0.0.1 sync=true enable-last-sample=false send-duplicates=false blocksize=1316</span><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">The good thing is that wireshark points ~1360 bytes per UDP packet <- this is good but not live streaming</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">The debug conclusion is:</span></div><div><span style="font-size:12.8px">gstbasesink.c never prints "do_sync 1", always "do_sync 0" </span></div>if (GST_CLOCK_TIME_IS_VALID (timestamp)) {<div>..</div>*do_sync = TRUE;<div><br></div><div>Thank you a lot for the prompt answer.</div><div><br></div><div>Best,</div><div><br></div><div>Angel</div><div class="gmail_extra"><br><div class="gmail_quote">On 25 February 2016 at 10:17, Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Do, 2016-02-25 at 00:29 -0800, Baby Octopus wrote:<br>
> I don't think thats correct. rndbuffersize used to set input<br>
> timestamp only for the first buffer belonging to the input buffer,<br>
> and rest of the buffers has GST_CLOCK_NONE as the timesstamp<br>
><br>
> So in theory, certain 7 packets, should synchronize and this pipeline<br>
> should work fine <br>
<br>
</span>It doesn't have any timestamp related code and also no changes since<br>
1.4.0. If anything the adapter would copy over timestamps, but it only<br>
does that if the beginning of an output buffer is exactly the beginning<br>
of an input buffer. This is unlikely to happen and does not happen<br>
here.<br>
<br>
Set min=max=84 (half a MPEG-TS packet) and you'll see every second<br>
packet with a timestamp here.<br>
<br>
<br>
In any case, rndbuffersize is not meant for this. You probably want the<br>
alignment property on mpegtsmux (but for some reason this also does not<br>
result in timestamps).<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" rel="noreferrer" target="_blank">http://www.centricular.com</a><br>
<br>
</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="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div></div>