Hi,
I just installed a janus-gateway on a raspberry pi (raspbian buster). My ultimate goal is to stream the pi's camera in a web application.
I am able to start janus on the Pi with the default configuration files generated by `make configs`.
With the package `gstreamer1.0-tools` installed and running the `share/janus/streams/test_gstreamer_1.sh` script, I am able to stream both VP8 video and sound.
I have errors when I change the gstreamer command to stream h264 (costs less resources for the Pi), with something like :
gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=720,framerate=30/1 ! omxh264enc target-bitrate=1000000 control-rate=variable ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=8004
or (using the camera as the source)
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720,framerate=30/1 ! omxh264enc target-bitrate=1000000 control-rate=variable ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=127.0.0.1 port=8004
or (feeding from my laptop, trying an adaptating from the test_gstreamer_1.sh)
gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=720,framerate=30/1 ! videoscale ! videorate ! videoconvert ! timeoverlay ! x264enc ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=<rpi.local> port=8004
The configuration section I added to etc/janus/janus.plugin.streaming.jcfg
rtp-sample2: {
type = "rtp"
id = 4
description = "h264 live stream coming from external source"
metadata = "You can use this metadata section to put any info you want!"
audio = false
video = true
videoport = 8004
videopt = 96
videortpmap = "H264/90000"
secret = "adminpwd"
# videofmtp = "profile-level-id=42e01f;packetization-mode=1"
videofmtp = "packetization-mode=1"
}
When I click on "Watch or Listen" on the local streamingtest.html page, the behavior differs between chromium and firefox, but basically I get an error and "No video available" in the video placeholder.
On chromium :
A popup appears "WebRTC error... Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local answer sdp: Failed to set local video description recv parameters."
In the console : streamingtest.js:174 WebRTC error: DOMException: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local answer sdp: Failed to set local video description recv parameters.
Janus logs :
[3029108292704470] Creating ICE agent (ICE Full mode, controlling)
On firefox :
In the console : "Ooops: 465 Error processing SDP"
Janus logs :
[3294557005159135] Creating ICE agent (ICE Full mode, controlling)
[ERR] [sdp.c:janus_sdp_process:387] [3294557005159135] SDP missing mandatory information
[ERR] [sdp.c:janus_sdp_process:388] [3294557005159135] (nil), (nil), 0x71a06298, 0x71a05678
[ERR] [janus.c:janus_process_incoming_request:1458] Error processing SDP
What I find weird in firefox is those console debug lines :
I tried a lot of different ways to feed janus streaming plugin with h264 video but nothing seems to work. I really don't understand where I messed up switching from VP8 to h264 and I have little WebRTC knowledge.
Jbb