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

No Video shown on last version 0.3.8 #51

Closed mburger81 closed 7 years ago

mburger81 commented 7 years ago

Hi, we use your latest version 0.3.8 and try to integrate it to our software, version 0.3.4 and before worked good (I opened some bugs) but on you last version we get the event the player is PLAYING but the video media element is always white.

I monitored the WebSocket and there is still data sending, here is my log

Client paused
console.js:26 Client started
console.js:26 [client:rtsp] OPTIONS * RTSP/1.0
CSeq: 1
User-Agent: SFRtsp 0.3

console.js:26 [transport:ws] OPTIONS * RTSP/1.0
CSeq: 1
User-Agent: SFRtsp 0.3

console.js:26 [mse] Media source opened: closed
console.js:26 [mse] player 0: play
console.js:26 [mse] Media source ended: closed
console.js:26 [mse] Media source closed: closed
console.js:26 LaRTSPlayerComponent; play Event {isTrusted: true, type: "play", target: video#rtsp-player-hwq6s8ouf08, currentTarget: video#rtsp-player-hwq6s8ouf08, eventPhase: 2, …}
console.js:26 [transport:ws] [data]
RTSP/1.0 200 OK
CSeq: 1
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE

console.js:26 [client:rtsp] RTSP/1.0 200 OK
CSeq: 1
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE

console.js:26 [client:rtsp] DESCRIBE / RTSP/1.0
Accept: application/sdp
CSeq: 2
User-Agent: SFRtsp 0.3

console.js:26 [transport:ws] DESCRIBE / RTSP/1.0
Accept: application/sdp
CSeq: 2
User-Agent: SFRtsp 0.3

console.js:26 [transport:ws] [data]
RTSP/1.0 200 OK
CSeq: 2
Content-Base: //
Content-Type: application/sdp
Content-Length: 378

v=0
o=- 154674292 154674292 IN IP6 ::
s=11
c=IN IP6 ::
t=0 0
a=control:*
m=video 0 RTP/AVP 96
a=control:trackID=1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4D001E;sprop-parameter-sets=Z00AHpWoKAtk,aO48gA==
a=framesize:96 640-352
m=audio 0 RTP/AVP 8
a=control:trackID=2
a=rtpmap:8 PCMA/8000/1
a=ptime:20
a=fmtp:8 packetization-mode=1

console.js:26 [client:rtsp] RTSP/1.0 200 OK
CSeq: 2
Content-Base: //
Content-Type: application/sdp
Content-Length: 378

v=0
o=- 154674292 154674292 IN IP6 ::
s=11
c=IN IP6 ::
t=0 0
a=control:*
m=video 0 RTP/AVP 96
a=control:trackID=1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4D001E;sprop-parameter-sets=Z00AHpWoKAtk,aO48gA==
a=framesize:96 640-352
m=audio 0 RTP/AVP 8
a=control:trackID=2
a=rtpmap:8 PCMA/8000/1
a=ptime:20
a=fmtp:8 packetization-mode=1

console.js:26 [parser:sdp] v=0
o=- 154674292 154674292 IN IP6 ::
s=11
c=IN IP6 ::
t=0 0
a=control:*
m=video 0 RTP/AVP 96
a=control:trackID=1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4D001E;sprop-parameter-sets=Z00AHpWoKAtk,aO48gA==
a=framesize:96 640-352
m=audio 0 RTP/AVP 8
a=control:trackID=2
a=rtpmap:8 PCMA/8000/1
a=ptime:20
a=fmtp:8 packetization-mode=1

console.js:26 [parser:sdp] Ignored unknown SDP directive: c=IN IP6 ::
console.js:26 [client:rtsp] SDP contained 2 track(s). Calling SETUP for each.
console.js:26 [client:rtsp] setup track: video
console.js:26 TRACK {name: "H264", clock: "90000"}
console.js:26 [client:rtsp] setup track: audio
console.js:26 TRACK {name: "PCMA", clock: "8000", encparams: "1"}
console.js:26 [client:rtsp] SETUP trackID=1 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Date: Wed, 13 Sep 2017 08:15:35 GMT
CSeq: 3
User-Agent: SFRtsp 0.3

console.js:26 [transport:ws] SETUP trackID=1 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Date: Wed, 13 Sep 2017 08:15:35 GMT
CSeq: 3
User-Agent: SFRtsp 0.3

console.js:26 [mse] Media source opened: open
console.js:26 [transport:ws] [data]
RTSP/1.0 200 OK
CSeq: 3
Session: VUTIOKOAjMS
Transport: RTP/AVP/TCP;unicast;interleaved=0-1

console.js:26 [client:rtsp] RTSP/1.0 200 OK
CSeq: 3
Session: VUTIOKOAjMS
Transport: RTP/AVP/TCP;unicast;interleaved=0-1

console.js:26 [client:rtsp] PLAY // RTSP/1.0
Session: VUTIOKOAjMS
CSeq: 4
User-Agent: SFRtsp 0.3

console.js:26 [transport:ws] PLAY // RTSP/1.0
Session: VUTIOKOAjMS
CSeq: 4
User-Agent: SFRtsp 0.3

console.js:26 [transport:ws] [data]
RTSP/1.0 200 OK
CSeq: 4
Session: VUTIOKOAjMS

console.js:26 [client:rtsp] RTSP/1.0 200 OK
CSeq: 4
Session: VUTIOKOAjMS

console.js:26 [remuxer] [{…}]0: {track: {…}, offset: 0, type: 1, params: {…}, duration: 1}duration: 1offset: 0params: {sps: ArrayBuffer, pps: ArrayBuffer, duration: 1}track: {rtpmap: {…}, type: "video", port: "0", proto: "RTP/AVP", fmt: Array(1), …}type: 1__proto__: Objectlength: 1__proto__: Array(0)
6207console.js:26 [transport:ws] [data]
[object ArrayBuffer]
mburger81 commented 7 years ago

the event 'ready' is never dispatched,

for (let track_type in this.tracks) {
   if (!this.tracks[track_type].readyToDecode || !this.tracks[track_type].samples.length) return;
}
this.eventSource.dispatchEvent('ready');

samples.length is alway = 0 and for this reason the library does never send data to player because the remuxer init is never called.

debbuing I figured out the event 'data' is always called with data

proxy.set_data_handler((data)=> {
    this.dataQueue.push(new Uint8Array(data));
    this.eventSource.dispatchEvent('data');
});

For now I can not figure out why the samples.length is always 0

@victorgrenke @kreopt

mburger81 commented 7 years ago

this is same as #55 which is closed by PR #56 so I'll close this issue