The Camera stream is disconnect and connect 17 times in 30 minutes observation.
Note: Janus server is running on remote ubuntu server.
Process structure of streaming:
I have created multistream mountpoint in janus.plugin.streaming.jcfg.
Now i insert RTP stream with FFMPEG using below command. (I setup nodejs server for run FFMPEG in my local system.)
3.FFMPEG command: “ffmpeg -rtsp_transport tcp -i rtsp://ksjgdhk:lgkjl@abc.com:5540/orchid/live?id=7 -c:v copy -an -f rtp rtp://10.30.50.144”
4.API call from local and getting MediaStream from Janus.
5.Attach media stream with the videoelement.
6.Screenshot of the log
Check if the connection to the RTSP server is being lost. Also make sure the RTP packets the camera is sending are not too big, since WebRTC adds overhead which may cause their size to be larger than what the network allows, thus causing packets to be dropped.
Which solution should I implement to resolve this? I cannot make any changes to the RTSP server or the RTSP URL; any modifications must be made to Janus or FFmpeg.
Previously the MTU size is 1500 bytes, now i change it to 9000 bytes.
The maximum size of the incoming rtp packets is 2322 bytes.
But still the remote stream is muted and again started track.
I don’t think you understood what I meant. You want the maximum RTP packet size to be lower, not higher, because somewhere on the network it may be lower and cause packets to be dropped. If the camera sends 1500 bytes of RTP, that will become higher than 1500 on WebRTC (due to SRTP and extensions). This means you have to configure the camera (or the ffmpeg/gstreamer script that mediates the conversation, if you have any) to send smaller RTP packets to Janus. 1200 is a good size, on average, because 1280 is the maximum size of IPv6 packets which makes it a good MTU reference.
Use Wireshark/tcpdump to capture RTP traffic on both the RTSP and WebRTC side to see what’s wrong. Inspecting the browser internals (e.g., chrome://webrtc-internals) may also help you investigate the problem.
@lorenzo, Can the camera streams remain continuous without disconnecting even once for 1-2 hours when using Janus?
Since the same stream runs continuously for 1-2 hours when using Wowza.