<div dir="ltr">You need to break the frames into slices that fit into network packets. Typically the MTU (the max size of the network packet) is set to 1400 (depending on the actual link) so that the slices are limited to just below that. Then the RTP and IP headers will increase the packet size to ~1440 bytes. If you don't do that, the network will fragment your packets, which can cause problems. TCP has other problems, in addition to performance, so it is best not to use that. RTP was designed for this, has low overhead, is well know and well supported by everything and works really well. Alternatively you could use MP2T (MPEG Transport Stream) which is a broadcast standard. However, it has a very small data packet size (188 or 192 bytes, depending on Blu-ray setting) and a very complicated format structure, which yields a significantly higher CPU load and more packets. Number of packets is almost as (if not sometimes more) important than actually bitrate with network devices.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 20, 2013 at 10:13 AM, distran <span dir="ltr"><<a href="mailto:distran.sensors@gmail.com" target="_blank">distran.sensors@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br>
<br>
I am trying to stream a video over UDP. The format is not chosen yet (I want<br>
to compare different formats and codecs). I am stuck on evaluations Theora<br>
codec. The problem is connected with the fact that maximum payload of UDP<br>
packet is 65535 (0xffff). From the pipeline below I am getting packets that<br>
are larger, therefore cannot be sent over UDP.<br>
<br>
The pipeline is the following:<br>
<br>
<br>
it's simplified version:<br>
<br>
I am getting an error from rtptheorapay, saying:<br>
<br>
<br>
<br>
I was getting similar error when I was trying to send directly jpg frames<br>
(MJPG) over UDP, using pipeline:<br>
<br>
<br>
but in that case using correct payloader helped. The pipeline below behaves<br>
correctly:<br>
<br>
<br>
I am intentionally using snow pattern, which, as far as I understand coding<br>
theory, is the worst case scenario for codecs, which base on sending deltas<br>
(differences) between consecutive frames.<br>
<br>
It seems that Theora payloader (rtptheorapay) is not able to encode one<br>
Theora frame into multiple UDP packets. Is there a way to fix it? Maybe I<br>
should use another element? I have no issue like that using other codecs,<br>
such as H264 or VP8. I assume that image resulting from compression should<br>
be more or less similar in all cases, cause there are not many ways to<br>
compress random picture. However, all the other payloaders are able to<br>
successfully map all the frames into UDP packets. Is there something I am<br>
missing using theora codec? How can I fix that issue? I know I could<br>
compress the stream so that frames fit into UDP packets (the same issue<br>
exists when streaming over TCP). Is it possible to stream if I want to avoid<br>
compressing the stream?<br>
<br>
Thanks for any help.<br>
<br>
Best regards,<br>
Michal<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/RTP-payloaders-and-streaming-over-UDP-TCP-tp4663441.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/RTP-payloaders-and-streaming-over-UDP-TCP-tp4663441.html</a><br>
Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
_______________________________________________<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" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>