Is it possible to use a TURN server to play the role of a media server to relay streams ? (like Janus or Kurento)
user1<----->turn<------>user2
TURN servers only help in 1to1 call as media(Encrypted) relayer through NAT. We can't decrypt the media at TURN server.
WebRTC MediaServer/Gateways like Janus, will help in advanced use cases like streaming, conference, PSTN/SIP and recording.
Read the tutorial and choose the media server based on your use cases
Related
Suppose I have 2 peers exchanging video with webRTC. Now I need both of the streams to be saved as video files in the central server. Is is possible to do it realtime? (Storing/Uploading the video from peers is not an option).
I thought of making a 3 node webRTC connection, with the 3rd node being the server. This way, I can screen record the 3rd node's stream or save it using some other way. But I am not sure about the reliability/feasibility of the implementation.
This is for a mobile application, and I would avoid any method that involves uploading/saving.
PS: I'm using Agora.io for the purpose of video-conference.
in my opinion
you can do it like the record demo:https://webrtc.github.io/samples/src/content/getusermedia/record/.
record each stream to blobs and push them to your server with websocket.
then convert the blobs to a webm file or just add in a video
Agora doesn't offer on-premise recording out of the box but they do provide thee code for you to be able to launch your own on-premise recording using your own server. Agora has the code and instructions to deploy on GitHub: https://github.com/AgoraIO/Basic-Recording
The way it works, once you have set up the Agora Recording SDK, the client would trigger the recording to start, via user interaction (button tap) or some other event (i.e. peer-joined or stream-subscribed) this will trigger the recording service to join the channel and record the streams. _The service outputs the video file once recording has stopped.
you need a WebRTC media server.
WebRTC media servers makes it possible to support more complex
scenarios WebRTC media servers are servers that act as WebRTC clients
but run on the server side. They are termination points for the media
where we’d like to take action. Popular tasks done on WebRTC media
servers include:
Group calling Recording Broadcast and live streaming Gateway to other
networks/protocols Server-side machine learning Cloud rendering
(gaming or 3D) The adventurous and strong hearted will go and develop
their own WebRTC media server. Most would pick a commercial service or
an open source one. For the latter, check out these tips for choosing
WebRTC open source media server framework.
In many cases, the thing developers are looking for is support for
group calling, something that almost always requires a media server.
In that case, you need to decide if you’d go with the classing (and
now somewhat old) MCU mixing model or with the more accepted and
modern SFU routing model. You will also need to think a lot about the
sizing of your WebRTC media server.
For recording WebRTC sessions, you can either do that on the client
side or the server side. In both cases you’ll be needing a server, but
what that server is and how it works will be very different in each
case.
If it is broadcasting you’re after, then you need to think about the
broadcast size of your WebRTC session.
link:https://bloggeek.me/webrtc-server/
Is there a simple guide from where I can start creating a stun / turn and signaling server ?
I spend over a week searching for those things and couldn't find any guide where I can say:
okay, I am on the right track now - this is clear.
So far, everything is so abstract without any examples.
This is what I'm trying to achieve: a simple video stream on my local network where I'll have a server with installed usb camera on it, and an application on my iis which will connect to the usb camera and stream it to the clients, and every time when a client opens the application, will see the video stream from the server camera.
Note: since I want to use it on my local network do I really need a stun/turn server, or is there a guide that shows how to avoid it ?
Media streamed over dedicated servers HTTP/HTTPS rarely needs a NAT traversal solution. Instead, just have your web server with camera attached, on the public Internet or behind your NAT with port-forwarding enabled.
There are LOTS of streaming media solutions available as open source, free downloads, or commercially sold. A good list is here:
https://en.wikipedia.org/wiki/List_of_streaming_media_systems
I'm new to Webrtc and Javascript. I'm trying to build a video chat application with recording functionality on the server. Currently, I use Easyrtc as Webrtc wrapper to provide the video chat functionality and it's working great. I also setup TURN server on the cloud using Coturn and use this on Easyrtc config.
I would now like to add video recording on the server and learned that this is achieved via media server. I'm keeping an eye on Kurento for this.
I'm just confused with media server in general.
Can Media Server replace TURN Server?
If TURN and Media server are required, can Kurento be installed on the same server as Coturn?
Can I have Easyrtc and add Kurento for video recording? If yes, how can Kurento record the video stream from Easyrtc/Coturn? Would appreciate pseudocode if possible.
Am I on right track? Any other advice to consider?
Should highly appreciate your comments.
Thank you!
In essence, I'd like to create an online radio where users can upload music to be played at specific times. Is webRTC capable of this or would I be better served going with something like Icecast?
WebRTC is about peer2peer communications.
If users would upload their media on to your server, then you would need to use some WebRTC-compatible media streaming software (such as Wowza, for example) for serving the media via WebRTC; in other words, the server would have to act as a WebRTC peer.
For the described task WebRTC is not the case, on my opinion. Icecast & Co would be better suitable for the task. Basically, I believe that it can be built using just HTML5 (and JavaScript, probably).
I am planning a software application where the user will be able to select a given media channel from a list of RTMP streams available on one or more media servers on the internet. The list should ideally be dynamically created through some kind of service that knows about the available and active channels.
My question is: Would this be possible through some kind of protocol between the service and the media server. I understand that RTMP by itself doesn't allow this. A therefore assume that some outbound mechanism will be required.
No...
...there is no native application discovery in RTMP. If you'd like this kind of functionality you'll need to program some sort of discovery service for which ever streaming server you are running.