Video stream testing - testing

I've got some distance learning software, yesterday I've got near 1000 users watching video simultaneously. My client told me that server was down and memory was exceeded.
It asp.net website and server language is C#. I'm using Response.TransmitFile(...) for streaming videos. Is there any way to simulate 1000 simultaneously video stream situation to figure out what's going on, cause when I'm testing the website everything works fine.

Do not ever use your web server as video streaming server, there is no chance you can succeed.
I personally moved my videos to Amazon Web Services and I'm very satisfied with that.

Related

Is it possible to save a video stream between two peers in webrtc in the server, realtime?

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/

Adobe Media Server Alternative for VideoChat

I currently have a video chat app working on web(Flash) and android via Adobe AIR, it uses Adobe Media Server (RTMP) as backend for video streaming and shared objects, my question is, if there is another server or solution that provides many to many live video broadcast maybe using H.264 codec from android and iOS, have some sort of user list and room list stored in a database or similar, I want to move away from Adobe as it has many limitations on mobile devices.
Live video is crucial in 1 to many broadcasts that will have hundreds of viewers at the same time.
Thanks for reading!
Ulex.fr created an RTMP connector for Asterisk (the free PBX platform).
Used with the Asterisk Vonference application, it allows you to create conference rooms for 1 to many configuration, with audio and video. The only one limitation is the power of your server. You can plan a scalable architecure in order to broadcast one video to many (many could be unlimited). We developp a specific protocol to connect and manage the connection based on the telephony events. I think we already done a direct RTMP connection that skip this protocol too.
All the project done by ulex.fr is free, OpenSource and GPL.
Get the full project here : https://github.com/voximal/asterisk-rtmp
(a live demo is available)
We already develop an RTMP stack for android with video (using the camera), this allows you to create your own application without using AIR.
You can check Adobe Cirrus, it's still in the beta stage (actually IMHO Adobe forgot about it), but it works on web, desktop and mobile too. Check this Video Phone example, it can handle chat applications without a problem.
http://labs.adobe.com/technologies/cirrus/samples/
You could take a look at Red5 Media Server, which is an open source solution. There are other options like the Wowza's solutions on AWS, but they come a higher cost...
Ok as today, we have decided that we can manage the users,rooms and messages via Google Firebase Real Time Database, and the live video stream using ANT Media Server

RTMFP RTMP too slow on deployment

We have developed a 1-1 video conferencing solution using RTMP , RTMFP technologies using Adobe. We are making use of Flash Media Development Server for recording the web streams. We have tested our application locally and it seems to work good.
Thus, We deployed the application to our server but the latency is very high (like 15 seconds). I mean when i talk , the other party gets my voice after 15 - 20 seconds.
Could someone explain me what is the real problem behind this ?
Do i have to purchase this https://secure1.influxis.com/webrootv10/custom_enterprise/index.aspx
Application.xml
http://www.2shared.com/document/PfMTpQsJ/Application.html
Thanks.

Is it advisable to use FFMpeg on my local server for video conversion?

We are starting a video sharing website where users will be able to upload videos in their native formats. However, since video streaming on the web generally is in the FLV format, we need to convert the videos to FLV.
Also, the site will be hosted on Amazon EC2 and storage using S3.
Can i run FFMpeg on amazon EC2 ? Is this the best way to go ? Are there other alternatives to video encoding rather than doing conversion on our own server ? I also came across www.transloadit.com which seems to do the same but they are charging a bomb. Are there cheaper and more intelligent alternatives ?
We are planning to make this website as one of top 10 biggest niche video streaming websites on the internet.
EC2 instances are just virtual machines so you can do whatever you like on them, including running ffmpeg.
Only you can work out the costs/benefits of doing the conversion on EC2, another server or an encoding service like encoding.com(a google search will turn up more services).
Some thoughts:
EC2
pay by the hour and can easily add new servers (although you need to design your process to support multiple servers)
Fast (and free) transfer between EC2 and S3
Your own servers
You pay for hardware upfront
Not as easy to scale quickly if needed
You need to maintain the hardware
Bandwidth charges between EC2/S3 and your servers
In both DIY solutions you need to deal with the notoriously error prone process and converting videos of different formats.
Video Encoding Service
Probably more expensive (debatable if you factor in development time and support costs)
Easiest way to scale quickly
Up and running quickly
Let them deal with the difficult conversions
I'm going to talk about a slightly different part of your comment. You said:
However, since video streaming on the web generally is in the FLV format...
This is false. You'll get far more portability and bang for your buck if you encode in MPEG-4/H.264.
Flash Player can playback H.264 content, so you can still use a Flash-based player for your website if you want to. However, if you ever decide to open up to mobile devices (iPhone, iPad, Android, webOS, Blackberry 6), HTML5-compatible web browsers (Safari, Chrome, Firefox, Opera, IE9), or pretty much anything newer than 5 years ago, H.264 is definitely the way to go.
The site for Miro Video Converter even documents the FFmpeg setting they use, which may save you some time.
Converting video is a relatively processor-intensive process. Amazon charges for CPU time, and they also charge for data transfer. So it's more of a business tradeoff. Can EC2 run ffmpeg and do the video conversion? Yes, it can. But is it more cost-effective to pay for the CPU time on the EC2 instance or to convert on a local server and then transfer the data to the EC2? I don't know. The answer depends on the sizes of videos that you're working with, the cost of connectivity on your local server, and the pricing scheme on your EC2 virtual server instance.

Open Source Web Service/WCF media streamer

Does anyone know of an open source web service/wcf service that can stream media content to clients? In particular I am looking for something that could access my music collection and stream it to a client (could be a client browser, win mobile app or even iphone application).
I guess it would have to be WCF based as I'm not sure that webservices do streaming really well. Also Windows Media Streaming Services is not the best way to go as the service should operate from a vista/xp machine (preferably).
If not, does anyone know the best way to start going about creating something like this - I'm not sure I know where to start with this one, although I can see many many uses for such a service!
Even though it's not open source, Windows Server 2008 has a Streaming Media role that will do what you ask. Of course, you'll need to have a server to put it on.
I tried Orb and it is quite good, apart from the fact that it hijacked my tuner card so media center would no longer work. However I'm going to try and create a home grown version.
Orb (www.orb.com) will stream your media to just about anything with a web browser. I've been running it on an XP virtual machine for about a year. I love being able to stream my entire media collection to my phone while I'm working at a client's site.
While it isn't open source, it is free and relatively well supported. One of the best features is that the architecture is set up so that there are no special requirements for your firewall -- it just works.