Streamedian / html5_rtsp_player

Play RTSP stream from IP camera in browser in this HTML5 player without plugins
Apache License 2.0
2.61k stars 598 forks source link

questions about invaid avc sample duration #116

Open CCC-123 opened 5 years ago

CCC-123 commented 5 years ago

Hi, thanks for the sharing work. But I met a problem when using it. I install the server side on a Centos server and try to connect it from a windows client in an intranet. After playing the first frame, the player stops and shows continuous outputs like:

[remuxer:h264] invalid AVC sample duration at PTS/DTS: 25200/25200|lastDTS: 32400:-7200 
[remuxer:h264] skip frame from the past at DTS=43200 with expected DTS=97200

Here is the sdp:

 [clientrtsp] RTSP1.0 200 OK

CSeq 3

Content-Type applicationsdp

Content-Base rtsp15.136.136.102554h264ch1mainav_stream

Content-Length 594

v=0

o=- 1554650720695969 1554650720695969 IN IP4 15.136.136.102

s=Media Presentation

e=NONE

b=AS5050

t=0 0

a=controlrtsp15.136.136.102554h264ch1mainav_stream

m=video 0 RTPAVP 96

c=IN IP4 0.0.0.0

b=AS5000

a=recvonly

a=x-dimensions1280,720

a=controlrtsp15.136.136.102554h264ch1mainav_streamtrackID=1

a=rtpmap96 H26490000

a=fmtp96 profile-level-id=420029; packetization-mode=1; sprop-parameter-sets=Z00AH5Y1QKALdNwEBAQI,aO48gA==

a=Media_headerMEDIAINFO=494D4B48010200000400000100000000000000000000000000000000000000000000000000000000;

a=appversion1.0

Can you give some suggestions about this problem ,thank you

victorgrenke commented 5 years ago

a=rtpmap96 H26490000 it's interesting why there is no separator ":" it's strange - in sdp standartd the separator is present

CCC-123 commented 5 years ago

I checked the log again, the separator exists in the console log. It's maybe a mistake when copying.

 [client:rtsp] RTSP/1.0 200 OK

CSeq: 3

Content-Type: application/sdp

Content-Base: rtsp://15.136.136.102:554/h264/ch1/main/av_stream/

Content-Length: 594

v=0

o=- 1554752204215957 1554752204215957 IN IP4 15.136.136.102

s=Media Presentation

e=NONE

b=AS:5050

t=0 0

a=control:rtsp://15.136.136.102:554/h264/ch1/main/av_stream/

m=video 0 RTP/AVP 96

c=IN IP4 0.0.0.0

b=AS:5000

a=recvonly

a=x-dimensions:1280,720

a=control:rtsp://15.136.136.102:554/h264/ch1/main/av_stream/trackID=1

a=rtpmap:96 H264/90000

a=fmtp:96 profile-level-id=420029; packetization-mode=1; sprop-parameter-sets=Z00AH5Y1QKALdNwEBAQI,aO48gA==

a=Media_header:MEDIAINFO=494D4B48010200000400000100000000000000000000000000000000000000000000000000000000;

a=appversion:1.0

And I test it on Chrome, the video is lag too. The output is also like

[remuxer:h264] invalid AVC sample duration at PTS/DTS: 25200/25200|lastDTS: 32400:-7200 
[remuxer:h264] skip frame from the past at DTS=43200 with expected DTS=97200

The RTSP stream can play well in VLC player. I'm confused about where the problem is.