I'm generating a 1080p h264 video stream over UDP on an Ubuntu 14.04 LTS x86 host with gigabit ethernet using avconv:
avconv -re -i big_buck_bunny_1080p_h264.mov -f mpegts udp://pi:8765/
The plan is to have this played via omxplayer on the Raspberry Pi side, which is equipped with a 100mbps NIC.
However, I get pretty dramatic packet loss which completely garbles the stream. Using tcpdump to capture the first few seconds of the stream on the sender side gives me:
# tcpdump -w /var/tmp/send.cap port 8765 4525 packets captured 4525 packets received by filter 0 packets dropped by kernel
On the receiver side, I see around 30% packet loss:
# tcpdump -w /var/tmp/recv.cap port 8765 2925 packets captured 2942 packets received by filter 0 packets dropped by kernel
The receive capture shows that the first few packets arrive fine, and then we start dropping packets by the dozen. /var/tmp is a tmpfs so there shouldn't be any other I/O involved.
Note that the run above was done with flow control disabled. The kernel doesn't think any ethernet frames or UDP packets were dropped; this is confirmed by the /proc/net/usb and ifconfig output. This suggests that the loss is actually happening at the switch, which is trying to queue the input and running out of space.
One interesting point is that iperf in UDP mode in identical conditions (i.e. no flow control) does not show significant packet loss even close to 100Mbps -- and the packet captures are completely clean -- so this seems to be triggered by the way avconv sends UDP streams.