[Live-devel] Increasing UDP packet sizes for streaming MPEG video?
Ross Finlayson
finlayson at live555.com
Mon Jul 2 16:35:49 PDT 2007
>Grabbing an Ethernet trace of the data as it comes in shows the data
>in UDP packets coming across the line with data payloads of 1328
>bytes. I am interested in increasing this to a few dozen kb at
>least, in order to improve performance, but where should I look to
>find the code that deals with this?
First, I'm assuming that your network MTU is large enough to
accommodate larger UDP packets. (If instead, your network MTU is
something like the usual 1500 bytes, then you should not try to send
larger UDP packets, otherwise you'll end up with IP-level
fragmentation, and bad performance if packets get lost.)
If your network MTU is really large enough to accommodate larger
packets, then you can do so by making the following two changes:
1/ In "MultiFramedRTPSink.cpp", change the call to "setPacketSizes()"
on line 46. (Alternatively, call "setPacketSizes()" with your new
parameters after each "RTPSink" object is created.)
2/ In "MPEG2TransportFileServerMediaSubsession.cpp", change the
definition of "TRANSPORT_PACKETS_PER_NETWORK_PACKET", so that
12 + 188*TRANSPORT_PACKETS_PER_NETWORK_PACKET < your maximum
UDP packet size
(12 bytes is the size of the RTP header)
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070702/d77f2203/attachment-0001.html
More information about the live-devel
mailing list