问题
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:admin@a.b.c.d: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:
- Janus Groups Thread1
- Janus Groups Thread2
来源:https://stackoverflow.com/questions/50090325/h264-video-source-is-not-playing-in-any-browser