-
Notifications
You must be signed in to change notification settings - Fork 972
AVideo Platform Hardware Requirements
We recommend at least 1 GB ram (files up to 500 MB), 1 CPU core, and 80 GB disk
Better hardware will be a better performance (of course)
- If you want to encode faster, get a better CPU
- If you want to encode larger videos, get more RAM
- If you want to have many simultaneous users, get more bandwidth
- You can have unlimited and simultaneous live streams.
- You can have unlimited users connected to each live stream.
The only limitation is your hardware, but we can not tell you what hardware is needed to handle a specific amount of users. It depends on your bandwidth and the quality of the video you are transmitting. But keep in mind you can always add new Live servers and expand your capacity.
But If you plan on using this site for a live broadcast with a large audience, I recommend that you have a dedicated server. Usually, VPSs suspend you because live streams drain a lot of cloud resources.
By default, we use NGINX to stream your live stream without resizing it, so if you broadcast in 1080p, your users will receive 1080p live.
For more details, please read this
But we also use the Adaptive Bitrates on Livestream, what will consume more of your CPU and less of your bandwidth. More simultaneous Livestream, more CPU will consume.
But in my experience is, with the Adaptive Bitrates on Livestream a 100 mbps Network can handle up to 100 simultaneous users. So a 1Gbps should handle 1000 Simultaneous users.
if you want details about how to improve your Live Stream try to ask it on https://github.com/arut/nginx-rtmp-module
The CPU is mainly used to encode VOD videos. The faster your processor is faster you will encode your videos. Also, you can have multiple encoders on the same server or in a separated server (we recommend keeping them separated)
We recommend at least 2 CPUs core
There is a script calculation..., your maximum file size can be only 50% of your RAM memory because the script needs to copy files between locations and handles them on the virtual memory.
In Example, if you want to upload a 4GB file you will need to have at least 8 GB Ram on the server otherwise you will have a Memory Leaks - Allowed memory size of # bytes exhausted error.
It is difficult to say exactly, but we can make some estimates. Your streamer and encoder need some free space to be able to process videos. we recommend at least 10x of the space for the max file size you will submit to your site. for example, if you want to process a 5GB file of a 4K video you need at least 50GB free, for MP4 format and 100 GB of free space, for HLS Format (if you will process only one file at a time). But you also can expand your Storage space any time
Any file you upload will be encoded in different resolutions depends on what resolution was the original file. For example, I made a test in the worst case as possible, I have uploaded a 4k file that was originally a 40 MB file (2 minutes of a 4k video), after encoding it is a bundle of 7 different resolutions (2160p 4k, 1440p +FHD, 1080p FDH, 720p HD, 480p, 360p, 240 p). Also, to make sure we are using the most common case, we are expecting the encoder and the streamer are on the same server.
If the encoder is on the same server as the streamer. and the encoder does not automatically delete the file, will stay in your encoder, and the streamer folder it will double your disk usage
$ ffprobe Elecard_about_Tomsk_part1_HEVC_UHD.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Elecard_about_Tomsk_part1_HEVC_UHD.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isom
creation_time : 2016-03-13T04:37:36.000000Z
Duration: 00:02:01.97, start: 0.000000, bitrate: 2763 kb/s
Stream #0:0(unk): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv), 3840x2160, 2760 kb/s, 25.03 fps, 25 tbr, 90k tbn, 90k tbc (default)
Metadata:
creation_time : 2016-03-13T04:37:36.000000Z
handler_name : ISO Video Handler
vendor_id : [0][0][0][0]
If you want you can download it here
After generating all the 7 resolutions the final size of this 40 MB file was like this:
- MP4 final size: 136 MB (3.4 times original file)
- HLS final size: 235 MB (5.8 times original file)
If the file is HLS, you also need space for the zip file (zip and unzip process), so we can expect to consume double of the user while it is encoding and transferring.
So we will expect to consume the following disk while is processing:
- Streamer = about 136 MB (total 136)
- Encoder = about 136 MB + 40 MB of the chunked file + 40 MB of the original tmpFile (total 216)
- While is processing 352 MB of free space is needed (if there is no error) (so 8.8 times the original size)
- Final size 70 MB/Minute of a 4K video
- Streamer = about 235 MB + 223 MB for the zip file
- Encoder = about 235 MB + 40 MB of the chunked file + 40 MB of the original tmpFile + 223 MB for the zip file
- While is processing 761 GB of free space is needed (if there is no error) (so 19 times the original size)
- Final size 117 MB/Minute of a 4K video
Of course, the file size consumed can be less than that if your file is not a 4K, you can also limit and choose up to 3 specific resolutions to encode. To do this you MUST set it up in your customizeAdvanced plugin
You will need ports 80, 8080, 443, 8443 and 1935 to make the default installation
- 80 for apache HTTP
- 443 for apache HTTPS
- 8080 for nginx HTTP
- 8443 for nginx HTTPS
- 1935 for RTMP connection
VOD videos require you to store them, and sometimes your server gets full and you may need another server to store the videos. if you use the YPTStorage you will be able to add as many servers as you want, also you will use the Storage server bandwidth to deliver the videos to your viewers. Also, you can use S3 and B2 storage for unlimited storage, before deciding the storage type, please read this.
The Livestream some times you need more bandwidth or maybe disk IO, depending on how many lives/users you are running, you can have multiple live servers feeding your Streamer site, please read this
You can install and use as many encoders as you want, each encoder will provide you a queue to process one video at a time. we recommend the encoder to be in a separate server, and you can use multiple servers to encode videos. to connect those encoders you will need the Encoder network
We recommend the database to be hosted on the same server as the streamer due to the multiple queries we execute on each request, but you also can host it separately.