How can i send all webcams to collect from one server.
For example:
there is pc_1, pc2, ..., pc_n they are sending camera view to some ubuntu server where i can connect with
ssh name#ip_adress
and all pc have a windows on them
i looked Sending live video frame over network in python opencv this but this worked only on localhost
and secondly i looked this Forward RTSP stream to remote socket (RTSP Proxy?) but couldnt figure out how to do it on my situation
Each IPC is a RTSP server, it allows you to pull/play RTSP stream from it:
IPC ---RTSP--> Client(Player/FFmpeg/OBS/VLC etc.)
And because it's a internal IPC and its IP is intranet, so the client should in the same intranet, that's why it works only on localhost like.
Rather than pulling from the internet client which does not work, you could forward the stream to internet server, just like this:
IPC ---RTSP--> Client --RTMP--> Internet Server(SRS/Nginx etc.)
For example, use FFmpeg as a Client to do this, please replace the xxx by your internet server:
ffmpeg -i "rtsp://user:password#ip" -c:v libx264 -f flv rtmp://xxx/live/stream
Note: You could fastly deploy a internet server by srs-droplet-template in 3 minutes, without any cli or knowledge about media server.
Then you could play the stream by any client and any protocol, like PC/H5 by HTTP-FLV/HLS/WebRTC, mobile iOS/Android by HTTP-FLV/HLS, please read this post
Related
I need some help structuring an App that allows for a speaker who can send audio via his/her phone mic and then for users to listen to this audio stream. I don't want to upload anything to the cloud as there may be bad internet reception.
What technologies to use? How do they talk to together?
Currently I have:
Have a mobile dongle that everyone connects to
host a server on this dongle?
Send an live audio stream to this server via UDP
Users listen to this server
Ideally it would be great if I could build this in React Native, which I think is possible. I am not sure how to host a server on a dongle though or even if this the best method?
I am trying to connect Remote RTSP Stream from IP Camera, but unable to get it without port Forwarding or Client Application. Is there any procedure to connect RTSP stream from one network to other network without port forwarding?
I have already tried with application client from hikvision and checked Wireshark streams but unable to get it
cam = cv2.VideoCapture("rtsp")
Take a look at the Nabto P2P platform, it is designed exactly to solve this problem, free for personal use and test / R&D. The Nabto blog has specific examples for setting up RTSP P2P tunnelling on cameras, Raspberry Pi devices and ESP32 devices:
You can either install the Nabto P2P reverse proxy in front of your RTSP service on the camera as a standalone process - or you can integrate it into an existing application. Full source is available in github.
On the client side, you can use an existing Nabto enabled RTSP client - or build your own based on the client SDKs, available for most popular platforms. Existing client apps available in github and in App store / Google Play.
I am in search of a server software which can stream different audios to a different clients.
For example every client will be able to create his own playlist and the server will stream it
Any help will be appreciated
You can check flash which has support for RTMP to stream audio real time using client server & RTMFP which works over peer to peer technology. You can use RTMFP in case peer is directly reachable else use RTMP. There is a open source red5 media server which also has support for RTMP protocol.
I want to use an IP camera with webrtc. However webrtc seems to support only webcams. So I try to convert the IP camera's stream to a virtual webcam.
I found software like IP Camera Adapter, but they don't work well (2-3 frames per second and delay of 2 seconds) and they work only on Windows, I prefer use Linux (if possible).
I try ffmpeg/avconv:
firstly, I created a virtual device with v4l2loopback (the command was: sudo modprobe v4l2loopback). The virtual device is detected and can be feed with a video (.avi) with a command like: ffmpeg -re -i testsrc.avi -f v4l2 /dev/video1
the stream from the IP camera is available with: rtsp://IP/play2.sdp for a Dlink DCS-5222L camera. This stream can be captured by ffmpeg.
My problem is to make the link between these two steps (receive the rstp stream and write it to the virtual webcam). I tried ffmpeg -re -i rtsp://192.168.1.16/play2.sdp -f video4linux2 -input_format mjpeg -i /dev/video0 but there is an error with v4l2 (v4l2 not found).
Does anyones has an idea how to use an IP camera with webRTC?
Short answer is, no. RTSP is not mentioned in the IETF standard for WebRTC and no browser currently has plans to support it. Link to Chrome discussion.
Longer answer is that if you are truly sold out on this idea, you will have to build a webrtc gateway/breaker utilizing the native WebRTC API.
Start a WebRTC session between you browser and your breaker
Grab the IP Camera feed with your gateway/breaker
Encrypt and push the rtp stream to your WebRTC session from your RTSP stream gathered by the breaker through the WebRTC API.
This is how others have done it and how it will have to be done.
UPDATE 7/30/2014:
I have experimented with the janus-gateway and I believe the streaming plugin does EXACTLY this as it can grab an rtp stream and push it to an webrtc peer. For RTSP, you could probably create RTSP client(possibly using a library like gstreamer), then push the RTP and RTCP from the connection to the WebRTC peer.
Janus-gateway recently added a simple RTSP support (based on libcurl) to its streaming plugins since this commit
Then it is possible to configure the gateway to negotiate RTSP with the camera and relay the RTP thought WebRTC adding in the streaming plugins configuration <prefix>/etc/janus/janus.plugin.streaming.cfg
[camera]
type = rtsp
id = 99
description = Dlink DCS-5222L camera
audio = no
video = yes
url=rtsp://192.168.1.16/play2.sdp
Next you will be able to access to the WebRTC stream using the streaming demo page http://..../demos/streamingtest.html
I have created a simple example transforming a RTSP or HTTP video feed into a WebRTC stream. This example is based on Kurento Media Server (KMS) and requires having it installed for the example to work.
Install KMS and enjoy ...
https://github.com/lulop-k/kurento-rtsp2webrtc
UPDATE 22-09-2015.
Check this post for a technical explanation on why transcoding is just part of the solution to this problem.
If you have video4linux installed, the following command will create a virtual webcam from an rtsp stream:
gst-launch rtspsrc location=rtsp://192.168.2.18/play.spd ! decodebin ! v4l2sink device=/dev/video1
You were on the right track, the "decodebin" was the missing link.
For those who would like to get their hands dirty with some native-WebRTC, read on...
You could try streaming an IP camera’s RTSP stream through a simple ffmpeg-webrtc wrapper: https://github.com/TekuConcept/WebRTCExamples .
It uses the VideoCaptureModule and AudioDeviceModule abstract classes to inject raw media. Under the hood, these abstract classes are extended for all platform-specific hardware like video4linux or alsa-audio.
The wrapper uses the ffmpeg CLI tools, but I don’t feel it should be too difficult to use the ffmpeg C-libraries themself. (The wrapper relies on transcoding, or decoding the source media, and then letting WebRTC re-encode with respect to the ICE connections’ requirements. Still working out pre-encoded media pass-through.)
Actually our camera can support webrtc. It uses ip camera with h5, from P2P tramsmitting, and two way talk for ip camera with web browser! The delay is only 300ms!
I have:
one pc with videolan installed (windows 7) 192.168.1.2,
one pc with linux ubuntu 11.4 installed 192.168.1.12,
I've try to send a video via UDP (in videolan) from windows 7 to in linux-pc
throught port 8081
in linux I've run netcat listening on port 8081 and redirect to file, (netcat -lu 8081 >file.avi)
(my goal is to redirect to a serial in embeded linux snapgear,
by the way now I need to rediret to a file)
but don't works and I can figure out how config all, netcat don't write every byte sent on 8081?
thanks
update:
my problem is that I dunno address of source, take a look at the following scenario:
linux pc send stream to a serial, and other pc send to that pc a stream.
linux pc is alway in listening and don't know the address of source / sources,
this is my problem I dunno how to send with VLC, I know how send vlc to vlc (and it works)
but I dunno how send to 192.168.1.12:8081
thanks again
Your setup will probably not work: AVI is not designed to be streamed as-is over an unreliable transport layer protocol.
When you use VLC, it probably uses an encapsulation format like an MPEG transport stream or RTP, which you would have to properly decode before saving the contents to a file.
Even if you really manage to just stream the raw AVI file via UDP, you will run into problems because of packet loss and reordering - AVI is simply not designed to withstand that kind of errors.
You should either switch to a reliable transport protocol like HTTP (and even then use something else than AVI - it's really not designed for streaming), or use some other protocol to encapsulate your media, like an MPEG transport stream or RTP.
Please check your IP-Adresses. Do they really have the same?
Does the netcat work for other protocols? You may test it with the dns-port and nslookup on windows.