Hi everyone,
I’m hosting a video editing platform on an OVHcloud VPS, where users can upload videos, edit them online, and then preview or download the processed files. The platform uses FFmpeg for video processing and NGINX with a streaming module to deliver videos. However, I’m facing a few issues:
-
High Resource Usage: When multiple users are processing videos simultaneously, the VPS CPU and RAM usage spike significantly, causing slow processing times and occasional server crashes. My VPS has 4 vCPUs and 8GB of RAM. Should I consider upgrading, or are there ways to optimize FFmpeg to use resources more efficiently?
-
Streaming Delays: The processed videos are streamed using NGINX, but users experience buffering and delays, especially for longer or higher-resolution videos. I’ve tried enabling caching in NGINX, but it hasn’t made much of a difference.
-
Encoding Quality vs. Speed: Some users complain about lower quality in the processed videos when I prioritize faster encoding speeds with FFmpeg. Is there a balanced configuration for FFmpeg that ensures good quality without significantly increasing processing times?
Here’s an example of the FFmpeg command I’m currently using for encoding:
ffmpeg -i input.mp4 -c:v libx264 -preset fast -crf 23 -c:a aac -b:a 128k output.mp4
- Scalability: As the number of users grows, I’m concerned about the platform’s scalability. Would setting up a load balancer or moving to an OVHcloud Public Cloud instance help improve performance and handle more users?
Any advice on optimizing server performance, improving streaming, or setting up a more scalable infrastructure would be greatly appreciated.
Thanks in advance!