Adding Recording feature to a web based video conferencing application - socket.io

Hi guys me and my team already built a video conferencing application with MERN stack but we are left with one tiny little feature which is integrating recording features into it. Pls guys any idea on how we can implement the recording feature.

Check out this article: https://bloggeek.me/recording-webrtc-sessions/
It really depends on what you want to achieve, and how your video conferencing solution looks like (e.g. do you use cPaas)?
Main options:
Record from one of the clients (can also be a "recorder" client you create yourself). There are also some open-source projects that can help you with that, e.g. https://github.com/muaz-khan/RecordRTC
Record streams on the server side

Related

Should I use webRTC or socket.io for a text chat?

I'm working on a node project and want to create a text chat between multiple users. So, more than 2 users in the chat.
I can't seem to figure out what approach is best: using socket.io (example of a text chat right here: https://socket.io/get-started/chat/ or webRTC. When I try to look for a webRTC example of text chat, I find links to video chat or a 1-1 text chat which uses sockets.
Which one should I use for a text chat?
WebRTC is a point 2 point link (although it can go through server). If you want multiple users on single chat, WebSockets might be the right approach for you. With WebRTC you might need to create a link between each 2 users, and that is a pain.
Anyway, if you use Azure maybe SignalR Service is the right answer, depending on you scalability needs.
WebRTC is Peer-to-Peer and is mainly emphasized on video/audio streaming. It can be used for multiple users, but that would result in a complicated structure like mesh structure. Based on your situation, I would recommend a simpler server-based solution, for example, the one you mentioned: Socket.io.
It's completely possible to implement what you said with WebRTC, but it would be complicated and not very suitable for your situation (text-only).
I recommend you to look more into WebRTC if you are still interested in it, it's great but it doesn't fit your current need very well.

Laravel project + media server both for live and vod streaming deployed on Docker

After many hours of research and nothing relevant coming up I decided to ask.
I am pretty new to the concept of video streaming, so please forgive me if my questions may seem elementary.
I am building a project that needs to include media streaming functionality. It should has the following options:
VOD - user uploads a file to the server, that needs to be transcoded to few MP4 files of different resolutions. For transcoding I am trying the approach using CloudTranscode (https://github.com/bfansports/CloudTranscode) deployed as a Docker image. The server should supply stream to the player with certain buffer size, so when the playback is paused we buffer for instance +5 seconds and that's it. Adaptive bitrate would be nice, however I'm not sure how this works with different players (I was thinking about using Video.JS due to high customization option, plus it's free).
Live video capturing - user visits a certain page that captures video from the webcam and sends the stream to the server for further stream distribution to clients. For most browsers WebRTC could be a good option, but iOS devices probably won't work with it, so any suggestions here would be much appreciated
Live video streaming - users visit a certain page where they can watch the stream captured from the user mentioned in point 2. Here the stream may be watched by one or many users (may be as well 1 or 10,000 users)
Cutting to the chase my questions follow:
What would be the best media server software that I can use for that purpose, having on mind high scalability (deployed as Docker container on AWS EC2), and possible huge load of both streaming and watching users, as well as multi-device/platform/browser support?
What would be the best media player for webpage that (again) would be cross-browser/platform/device, keeping in mind good integration with media server itself for purpose of adaptive resolution streaming? Also it would be nice if the player has broad customization options in matter of appearence (for instance thumbnail display when hovering the timeline).
Do you know any better solution for video transcoding than mentioned CloudTranscode, having on mind Docker setup, and some easy to use API (here some on-the-fly transcoding would be nice, so the worker wouldn't need to wait for the whole file to be uploaded)?
What happens if I use autoscalling functionality on EC2 instance, and more instances of the media server are being automatically started? Let's say we have instance 1 (I1) and instance 2 (I2). Some user started broadcasting on I1, and 1000 users are watching the stream which is the server instance's limit because it's running out of resources. Next, another couple of users are trying to view the stream, so they are being connected to I2 by AWS load balancer - how does that work with live stream? Sorry, but I am total newbie to the concept, so again - forgive me for elementary questions.
So far a was able to find a few media servers that may be relevant to my needs including:
Wowza Media Server (paid)
Red5 media server (free)
Kurento Media Server (free)
My application is written in Laravel, ergo I need some PHP integration with the media server.
Obviously free solutions are the most welcome, however I do not mind to pay as long as paid solution covers my needs.
Any input here will be much appreaciated - even partial solutions / suggestions. I'm kinda stuck here, so any suggestions that can bring me closer to the solution are very welcome!
Best regards
If anyone needs such information I ended up using Nginx Plus media server functionalities. It's capable of serving both live and VOD streams, it has out-of-the-box load balancer to switch traffic over multiple container instances and many more great features. Plus they have images to deploy directly from AWS Marketplace, and the license is paid hourly when the EC2 instance is running. Ofcourse there is free version as well, but I am really satisfied with Nginx Plus support.
Capturing live stream from user I've done using getUserMedia() in JS. Still having minor glitches, but I will get it to work (problems are related with WebM chunks that MediaRecorder API spits out, but I'm almost done here using some Python piece of code modifying each chunk on server side).
If anyone needs help I will be happy to help.

How to create cleint/server applications

I have been trying to make multiplayer applications on a website for a while. I wanted to start with a basic chat system. I made one but it is really slow. On the HTML page it send the message through AJAX to a PHP application which saves it to a text file. Then back on the HTML file, it is constantly checking the text file every 3 seconds. This is very slow and unreliable. So i looked up better ways of doing this. I found Node.js and used it along with Socket.io and express to create a faster chat application. But it only works on local host and i have no idea how to implement it on a website. So I kept looking and discovered WebSockets. Which are so confusing and seem to have very little support. I am confused how websites out there have applications that can be real time with so few options. How is this done? Am i missing a way of doing this? If you can help me that would be great.
Socket.io is using websockets under the hood already. Using raw websockets isn't necessary for your chat app.
You're on the right track using socket.io and node.js server-side.
Building a multi-player game in the browser will be a very difficult task for a beginner. But that's why it's good to learn! I suggest using a library for graphics (a quick google gave me this: http://www.pixijs.com/ ).
The over all architecture should be something like:
Users go to your server and receive a web page (.html) which contains the javascript and a canvas they need to play the game. This is the "client-side" because it's all running on each users' web browser on their computer.
The web page runs the javascript which talks to the node.js server using socket.io. This is the "server-side". The job of the server is to coordinate player data (who is who, where are they in the game, who's doing what etc) and keep track of the game state. Basically, this is where the game actually is, kind of like having the Monopoly board on the server, while the client-side is really just responsible for showing the board to the players (drawing it on the HTML5 canvas) and sending player input to the server.
Tutorials:
USE GOOGLE. Try just literally searching for "javascript game tutorial". Try every tutorial that comes up. If something is taking a while to get up and running then ditch it and move to another one.
Do simple little things at first 'till you start to grok what the overall process is like. For example: https://developer.mozilla.org/en-US/docs/Games/Workflows/2D_Breakout_game_pure_JavaScript
Remember playing ultra-simple games like Pong? Try writing games like this first. Your chat system is a great start, by the way, because it covers the basics of how to get a server up and running, how to get a page, how to send data around.
As for getting something up and running on a server where others can connect to it... Check this out: have your buddies come to your house and bring their laptops, start your node.js chat server, tell them what your IP address is, and have them go to "http://YOURIPADDRESS:8000" in their browser-- they'll connect to your node.js server!
Getting it running on a hosting provider is a little more involved and probably not worth the trouble at this stage. You'll learn more about this later just by keeping on the way you're going.
Socket.IO does not only work on localhost. You will need to get a server to run your application on. I highly recommend not worrying about this piece of the puzzle just yet, as it is somewhat complicated if you are brand new at this. Come back to this part when you are ready.
As for the game development, I recommend using Phaser. It has everything you need to get started and great documentation.
http://phaser.io

Does streaming media in SharePoint pose a performance risk?

Can anyone comment on the performance implications of storing streaming media in a SharePoint 2007 document library? I’ve heard this can be detrimental to the performance of the farm due to the media being streamed from storage in a SQL DB.
Has anyone had any firsthand experience with this and if so, what alternatives have you used to provide users with the ability to publish and mange their own video content? Assume a secure internal environment so external services like YouTube are not viable in this scenario.
I have tried this on a test deploy and it had very poor performance. Not only did the SharePoint server struggle, but the video the client was trying to stream was very laggy. Granted, we did not have a state of the art server set up, but I was the only one accessing the server and it couldn't even handle that. Given my experience, I would advise against it.
I can stream FLV's for flash movies from a document library with reasonable performance. I still opted for deploying them to a separate non-sharepoint website because the video's where fairly static and do take up a lot of SQL space.
You might consider activating blobcaching to get around the streaming from the database, see: http://msdn.microsoft.com/en-us/library/aa604896.aspx

access remote video from program

I want to have a stress/performance testing for my content management site, especially for hosted streamed video part. I am using IIS to host the videos. More specifically, I am using the new Windows Server 2008 x64 and IIS 7.0.
The confusion is,
I plan to write code to start a lot of threads, and in each thread I will send web request to video URL, and read response stream from server, but I am not sure whether in this way, it behaves the same as a real user using player to render the video (in my code, I just read the stream, without really play it or write to anywhere). I want to test similar to the real scenario as much as possible;
I also plan to use real Media Player to render video (or what-so-ever media player), but my concern is if I start multiple Media Players on my test machine, since Media Player will utilize some H/W or some other resources (video card specific memory?) to decode/render the video (not sure, needs guru help to check and confirm), if I start multiple players, are there any potential H/W or resource contention between the players? If there is contention, it is also not actual ens user scenario, i.e. few user will start 100 players on his/her machine. :-)
Does anyone have any advice to me?
BTW: I prefer to use any .Net based solution, but not a must.
thanks in advance,
George
You should use mplayer. It has a lot of command line options. I don't know how all theses options are available under Windows, but under linux something like this is possible :
mplayer some_url -dump-video -dump-file=some_file
It will behave the same as a "normal" player I think, and your test machine won't need to handle hundreds of decompression thread, sot it fits your need 1 and 2
If you know the bit rate of your video stream, you can pace your downloading request to simulate video player clients. The bit rate can be calculated from the information carried in the stream, but it's a little more complicated. There is software for stressing testing video server too, such as this IP Video Monitor.

Resources