[Live-devel] missed RTP packets when streaming directly from libx264

Cheng-Hsin Hsu chsu at cs.nthu.edu.tw
Wed Apr 25 06:54:33 PDT 2012


Greetings, 

I'm try to stream live video using X264 and live555. Currently, what I do is: (i) whenever doGetNextFrame() is called, I read a frame from a local YUV file, and encode it into one or multiple NAL units, and (ii) whenever deliverFrame() is called I copy all the NALs to the buffer and set fPresentationTime and fDurationInMicroseconds as follows:

 gettimeofday(&fPresentationTime, NULL); // If you have a more accurate time - e.g., from an encoder - then use that instead.
 fDurationInMicroseconds = 33333.33;  

But when playing the RTP/RTSP stream using ffplay, I got this:

[h264 @ 0x7f95e400f600] RTP: missed 1 packets64KB sq=    0B f=0/0   
   Last message repeated 2 times  0KB vq=   64KB sq=    0B f=0/0   
[h264 @ 0x7f95e4011400] concealing 396 DC, 396 AC, 396 MV errors
[h264 @ 0x7f95e411a200] concealing 396 DC, 396 AC, 396 MV errors0   
[h264 @ 0x7f95e400f600] RTP: missed 18 packets0KB sq=    0B f=0/0   
[h264 @ 0x7f95e400f600] RTP: missed 4 packets62KB sq=    0B f=0/0   
[h264 @ 0x7f95e400f600] RTP: missed 22 packets
[h264 @ 0x7f95e4010e00] concealing 396 DC, 396 AC, 396 MV errors0   
[h264 @ 0x7f95e400f600] RTP: missed 1 packets
[h264 @ 0x7f95e4010800] concealing 1188 DC, 1188 AC, 1188 MV errors 
[h264 @ 0x7f95e4010e00] concealing 1426 DC, 1426 AC, 1426 MV errors 
[h264 @ 0x7f95e4011400] concealing 396 DC, 396 AC, 396 MV errors0   
[h264 @ 0x7f95e400f600] RTP: missed 1 packets
[h264 @ 0x7f95e400f600] RTP: missed 4 packets63KB sq=    0B f=0/0   
[h264 @ 0x7f95e400f600] RTP: missed 7 packets
[h264 @ 0x7f95e400f600] RTP: missed 2 packets64KB sq=    0B f=0/0   
   Last message repeated 1 times  0KB vq=   59KB sq=    0B f=0/0   
[h264 @ 0x7f95e411a200] concealing 396 DC, 396 AC, 396 MV errors
[h264 @ 0x7f95e4010200] corrupted macroblock 5 22 (total_coeff=-1)  
[h264 @ 0x7f95e4010200] error while decoding MB 5 22
[h264 @ 0x7f95e4010200] concealing 660 DC, 660 AC, 660 MV errors
[h264 @ 0x7f95e4010800] concealing 657 DC, 657 AC, 657 MV errors0   
[h264 @ 0x7f95e4010e00] concealing 656 DC, 656 AC, 656 MV errors0   

I'm not sure why I got missed RTP packets as both server and client run on the same laptop. 

Where should I look into? Any clues are highly appreciated. 

Best regards,
Chenghsin



More information about the live-devel mailing list