[Live-devel] H.264 streaming -- Not receiving all packets

Georges Côté gcote at matrox.com
Thu Mar 19 12:56:08 PDT 2009


Hello,

First of all, I'd like to thank everyone involved in the project. This 
is quite helpful for newbies like myself.

I have a server streaming H.264 and AAC. The video resolution is 1080i @ 
29.97 fps. The bit rate is around 5 Mbits/sec.
I'm currently working on the client side. I'm using the office LAN to 
test. Both server and client are connected at 1 Gb/s. I also tested 
using a D-Link 1 Gb/s managed switch.

I based my code on the H.264 tutorial.

I get corruption once in a while. The H/W encoder is configured to 
generate one IDR and 14 forward frames, no backward frames (I, P and B 
in mpeg2 terminology). I'm not sure of the H.264 terminology.
What I see is that the reference frames are quite large > 150 KB while 
the other frames are around 15 KB.

Most of the times, the client is called with the right size. Once in a 
while, I will be missing part of a IDR or even the whole reference 
frame. If I use Wireshark on the client side, I see that I'm receiving 
the "missing" packets. I haven't digged in the code to investigate yet!

On the server side, when the frame is larger than the destination 
buffer, I copy as much as I can. The remaining data will be copied when 
doGetNextFrame is called again.

Incomplete parts have the right presentation time but I set the duration 
to 0.
The last part has the same presentation time but I set the duration 
according to the right frame rate.

Any clues you might think of? Where should I start looking? NTSC @ 2 
Mb/s is much more stable.

Thank you!

Georges


More information about the live-devel mailing list