UV4L on RPI WebRTC with Janus Gateway ICE error - raspberry-pi

I need to stream from the RPI Camera to a Janus room with webrtc.
I installed UV4L on my PI, and try the demo with the gateway url https://janus.conf.meetecho.com : it's work.
I installed janus-gateway on a server (demos here : https://janus.kizbat.com)
And the gateway url is : janus.kizbat.com:8089
Janus camera room work very well with browsers (chrome from my computer), but when I try to connect with uv4L on the pi I get this error on the janus log :
[3157879423705975] Creating ICE agent (ICE Full mode, controlled)
[WARN] [3157879423705975] Skipping disabled/unsupported media line...
[ERR] [ice.c:janus_ice_cb_component_state_changed:1473][3157879423705975] ICE failed for component 1 in stream 1...
No WebRTC media anymore
Detaching handle from JANUS VideoRoom plugin
No WebRTC media anymore
Cleaning up handle 3157879423705975...
I tried to setup a STUN/TURN server, but I get the same error.
Do you have an idea ?

Related

Raspberry pi UV4L RTSP (IP Camera) as source to WebRTC

I have setup a Raspberry Pi and a cameramodule, the Streaming Server UV4L works fine, I have a nice picture over a WebRTC stream.
Now I wanted to use an IP camera (RTSP) as input for the UV4L server, how can that be done?
regards Koos

Corrupted video frames when streaming H264 over RTSP

When I stream H264 video over RTSP and use VLC to view the video feed, the video feed is corrupted (partly green but moving objects are still detected). However, if I stop the VLC and restart it again, the video feed is no longer corrupted. Why is it so, and how can I remedy this issue? Thanks!
The H264 is coming natively from a USB camera into a Raspberry Pi. Below is the code within the crontab of the Pi for launching the g-streamer and RTSP server.
#reboot bash /home/pi/gst-rtsp-server/examples/test-launch '( v4l2src device=/dev/video1 ! video/x-h264, width=320, height=240, framerate=20/1 ! h264parse ! rtph264pay name=pay0 pt=98 config-interval=10 )'
The Raspberry Pi is connected over a network. I am using VLC on another computer to view the video feed.
vlc rtsp://10.146.0.57:8554/test
If I reboot the Pi, the video feed on the VLC will be corrupted. I can still see moving objects in the video feed but there will be green and purple pixels all over.
However, if I close the VLC and start VLC again, the issue is gone. The video feed is clean.
The output of VLC:
[0000557c34211570] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
Created new TCP socket 35 for connection
libEGL warning: DRI2: failed to authenticate
libEGL warning: DRI2: failed to authenticate
[00007fd9b800df20] main decoder error: buffer deadlock prevented
Please elaborate - you restart the Pi but keep the VLC connection running? Doesn't it disconnect because the RTSP server goes away? VLC should reconnect after the Pi restarts. If it does not do this this may be a problem.
If a new H.264 bitstream is initiated by the Pi it is logically different from what it previously has send. If the VLC does not restart but just continues decoding this stream it may get "confused" resulting in decoding error (relying on wrong reference pictures).
H.264 has a temporal dependency for frames. MJPEG does not have this - each frame can be decoded by it self. Therefore you will not see the issue to be present here.

Unity: How can i connect my phone to node server

I am making a mobile multiplayer game with Unity's socket IO a nodeJS server. when i run the mobile game from unity, it connects to the nodejs server, but when i try using my phone it doesnt connect. ws://127.0.0.1:4000/socket.io/?EIO=4&transport=websocket
Please how can I make a connection between them ?

Unity client server is not connected while using sendbychannel

while running the unity game engine as client and server in one machine, working perfectly fine just initially its giving error,
NetworkClient SendByChannel when not connected to a server
UnityEngine.Networking.NetworkClient:SendByChannel(Int16, MessageBase, Int32)
playerController:Update()
Can anyone please tell me why this error is coming?
Here the client is sending his position and server renders the texture and sends it back to him. But when the client is running on the Android (mobile) and server on the desktop, every time I am getting
NetworkClient SendByChannel when not connected to a server.
I can't set the connection between server and client.
Can anyone please tell me why the connection is not getting set up?
The channel ID is same and everything I checked (IP and port no about firewall). Nothing list above is a problem.

System error 111 (connection refused) , Failed to connect

I'm trying to stream video via RTSP in my ubuntu PC.
The video file to be streamed big_buck_bunny_h264.mov is located in following location of my PC :home/user/Downloads/
I'm using gstreamer to stream the video.
Below is the gstreamer command I'm trying :
gst-launch-1.0 rtsprc
location=rtsp://127.0.0.1:9000/home/user/Downloads/big_buck_bunny_h264.mov
latency=0 ! decodebin ! autovideosink
But I'm getting following error on terminal:
System error 111 (connection refused) , Failed to connect
Also I tried streaming via RTSP using VLC player . (open VLC -> Media -> Open Network Streaming -> Enter the url -> Play )
Im getting following error message:
Connection Failed, VLC could not connect to 127.0.0.1:9000. VLC is unable to open the URL.
From the above 2 scenarios (Gstreamer and VLC) , I assume there is something issue with the networking/network interface.
The Current OS I'm using is guest OS Ubuntu 14.04. (I'm acessing ubuntu via VMware Player from windows PC). Network is bridged between windows and ubuntu.
So is this the reason , why RTSP streaming is not working fine in my case ?
Is there any alternative ?
Also kindly tell me , whether I'm using the correct command and file path to stream the video via RTSP.
Do I need to setup LIVE555 streaming server to start streaming video at transmitter ?
Sorry but you have that all wrong..
To use rtspsrc does not mean you are streaming.. it means you are opening an existing stream(as client), as Florian mentioned you have to have running rtsp server which is serving the files to clients..
Clients can be - as you already tried - a vlc or gstreamer pipe with rtspsrc element, or some other players like mplayer(smplayer has also nice user interface for that imho) etc..
There are various options for rtsp servers: gstreamer rtsp server (mentioned here ), crtmpserver, also vlc (but not the way you used it, check this ) and you will find more..
You can also read this nice article about rt*p family of protocols.
Yes you can use live555 as rtsp server at Ubuntu VM and access it from your windows with vlc as you already tried..
Also keep in mind that you usualy do not use full system path (home/etc/etc) to access rtsp files but rather rtsp access point. That means dedicated folder which contains your media files you will access it for example like rtsp://192.168.1.123/vod/file.mp4 where vod is this access folder (or whatever it is called).
HTH