RTP payloaders and streaming over UDP/TCP

Chuck Crisler ccrisler at mutualink.net
Wed Nov 20 07:46:13 PST 2013


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.


On Wed, Nov 20, 2013 at 10:13 AM, distran <distran.sensors at gmail.com> wrote:

> Hello.
>
> I am trying to stream a video over UDP. The format is not chosen yet (I
> want
> to compare different formats and codecs). I am stuck on evaluations Theora
> codec. The problem is connected with the fact that maximum payload of UDP
> packet is 65535 (0xffff). From the pipeline below I am getting packets that
> are larger, therefore cannot be sent over UDP.
>
> The pipeline is the following:
>
>
> it's simplified version:
>
> I am getting an error from rtptheorapay, saying:
>
>
>
> I was getting similar error when I was trying to send directly jpg frames
> (MJPG) over UDP, using pipeline:
>
>
> but in that case using correct payloader helped. The pipeline below behaves
> correctly:
>
>
> I am intentionally using snow pattern, which, as far as I understand coding
> theory, is the worst case scenario for codecs, which base on sending deltas
> (differences) between consecutive frames.
>
> It seems that Theora payloader (rtptheorapay) is not able to encode one
> Theora frame into multiple UDP packets. Is there a way to fix it? Maybe I
> should use another element? I have no issue like that using other codecs,
> such as H264 or VP8. I assume that image resulting from compression should
> be more or less similar in all cases, cause there are not many ways to
> compress random picture. However, all the other payloaders are able to
> successfully map all the frames into UDP packets. Is there something I am
> missing using theora codec? How can I fix that issue? I know I could
> compress the stream so that frames fit into UDP packets (the same issue
> exists when streaming over TCP). Is it possible to stream if I want to
> avoid
> compressing the stream?
>
> Thanks for any help.
>
> Best regards,
> Michal
>
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/RTP-payloaders-and-streaming-over-UDP-TCP-tp4663441.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131120/93629b2c/attachment.html>


More information about the gstreamer-devel mailing list