[streaming] Re: Packet Size

Marshall Eubanks tme at multicasttech.com
Tue Apr 11 19:22:21 CEST 2006


Hello;

On Apr 11, 2006, at 12:58 PM, Antoine Cellerier wrote:

> On Tue, Apr 11, 2006, Chhaya, Harshal wrote:
>>> I would like to know how to set the packet size for a video  
>>> streaming
>>> diffusion. I have transcoded a video file with H.264 in several bit
>>> rates but when I make its diffusion by a LAN I always get big
>>> size packets.
>>
>> The size of the packet on the network is independent of the packet
>> size at the output of the video codec. For example, when streaming
>> MPEG2-TS over ethernet, each ethernet packet (~1500 bytes) contains
>> 7 MPEG2-TS packets (each of size 188 bytes). The receiver will
>> correctly separate the 7 MPEG2-TS packets and process them
>> one-by-one.
>
> You can try using this option to change the MTU:
>       --mtu <integer>            MTU of the network interface
>

There are a number of gotcha's in packet sizes.
For example, is any of your data going to go through a tunnel ?
If you are streaming MPEG using RTP over UDP (or TCP) does the packet  
size
include the RTP header ? The UDP header ? The IP header ?

Ethernet's MTU is 1500 bytes, and it's a safe bet any packet
you send will be on an ethernet at some point. However, this is the  
total size of the packet
and (for RTP, say) includes a IP, UDP or TCP header and a RTP header.
The maximum amount of data per packet is less,
because of the headers. If there is a tunnel involved, the data is  
less by the tunnel headers, too.
You would be surprised how often tunnels come up in streaming,  
especially if multicast is involved.

1450 bytes is a reasonably safe maximum data packet size to use given  
all of this.

Regards
Marshall Eubanks



> -- 
> Antoine Cellerier
> dionoea
>
> -- 
> This is the streaming mailing-list, see http://www.videolan.org/ 
> streaming/
> To unsubscribe, please read http://www.videolan.org/support/lists.html
>

-- 
This is the streaming mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://www.videolan.org/support/lists.html



More information about the streaming mailing list