[Live-devel] Why H264 annexB bytestream transported incompletely

wang wuying jason88wang at gmail.com
Mon Apr 27 08:23:35 PDT 2009


     Hi,all,I have been trying to stream H264 annexB bytestream with
livemedia.My H264 file is composed of   many NAL Units, each NAL Unit
starts with a four-byte  startcode(0x00 0x00 0x00 0x01),and only one frame
a  NAL Unit and the first frame is I frame ,the others are P frame.  I have
implemented my H264VideoStreamer class,and my currentNALUnitEndsAccessUnit()
function always return true,    the   fDurationInMicroseconds  value is
a  33ms  , and   the fPresentationTime value  adds  the
fDurationInMicroseconds  value  when gets a NAL Unit each time except  the
first time it  uses gettimeofday() funciton return value.
   I used the openRTSP  program  as  the client   to receive the H264 stream
and write  it to file.When  the openRTSP program and the server are in the
same PC,it can receive the H264 data completely  and write them to file
correctly.And i compare the file with the old file ,they  are consistent
completely ,and the VLC can play it .
   But when the openRTSP  and the server are in different PC,which there is
a  1000M switch between,the openRTSP writes  the H264 data to file
incompletely,the file lost the I frame.But i can find the I frame  received
by the PC by using the   network protocol analyzer wireshark .And i tested
serveral H.264 files , and it always lost the I frame. My openRTSP command
is as follow:

openRTSP -B 1024000 -b 1024000  -Q   rtsp://192.168.1.8:8554/h264Test

and the QOS statistics result is as follow:

Started playing session
Receiving streamed data...
Received RTCP "BYE" on "video/H264" subsession (after 6 seconds)
begin_QOS_statistics
server_availability     100
stream_availability     100
subsession      video/H264
num_packets_received    3949
num_packets_lost        15
elapsed_measurement_time        6.001293
kBytes_received_total   5468.173000
measurement_sampling_interval_ms        1000
kbits_per_second_min    7016.428477
kbits_per_second_ave    7289.326483
kbits_per_second_max    7547.909051
packet_loss_percentage_min      0.000000
packet_loss_percentage_ave      0.378406
packet_loss_percentage_max      2.293578
inter_packet_gap_ms_min 0.011000
inter_packet_gap_ms_ave 1.516025
inter_packet_gap_ms_max 24.364000
end_QOS_statistics

any one who can help me ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090427/881bedf8/attachment-0001.html>


More information about the live-devel mailing list