Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
432 views
in Technique[技术] by (71.8m points)

google chrome - H264 video source is not playing in any browser

I'm using Janus to pass video stream from an RTSP/H.264 camera (QD800) through WebRTC to browsers.

Which browsers am I speaking here? Here are the details:

  • Firefox (Linux, 64-bit, version 59.0.2)
  • Firefox (Windows7, 64-bit, version 59.0.2)
  • Chrome (Linux, 64-bit, version 49.0.2623.87)
  • Chrome (Windows7, 64-bit, version 66.0.3359.139)

Originally the camera sends 420029 as profile-level-id in the SDP when negotiating with the client (Janus).

However as such Firefox is not able to play this version (420029 means level 4.1, FF is only able to play a 3.1 in theory but both are Constrained Baseline Profile).

Now my Janus streaming plugin configuration looks like this:

[rtsp-test]
type = rtsp
id = 4
description = RTSP
url = rtsp://admin:[email protected]:554/11

audio = no
video = yes
videopt = 96

videortpmap = H264/90000
videofmtp = profile-level-id=42e01f;packetization-mode=1;sprop-parameter-sets=Z00AKpWoHgCJ+VA=,aO48gA==
secret = adminpwd

As you can see, it's overriding the profile-level-id in the videofmtp config.

This is working fine, I can check the new profile-level-id in the WebRTC console both in FF and Chrome on both OSes.

I'm using the default demo HTML which is provided for Janus (demos/streamingtest.html).

In neither browser is there any video displayed. Only white box is displayed.

When I hit play:

  • in Chrome: "Stream Started 405 kbits/sec". White video screen, spinner is spinning.
  • in Firefox: "Stream Started 0x0 407 kbits/sec". White video screen, no spinner, no video.

PS1.: My camera is working, VLC can play the RTSP stream directly from it.

PS2.: Both FF and Chrome are actually receiving the stream but can not decode it.

PS3.: I also tried to pass the whole RTSP through an FFMPEG:

ffmpeg -i 'rtsp://ip-camera' -an -codec copy -f rtp 'rtp://127.0.0.1:20000' 

And then use the RTP sample of Janus, but I got the same result as above. See FFMPEG's output.

In the Janus helpgroup I've gone as far as possible since the stream goes through Janus, it's not their competence any more.

References:

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...