Skip to content

External FFMPEG Server Setup

Daniel Neto edited this page Dec 3, 2024 · 4 revisions

Overview

The External FFMPEG Server feature allows you to offload video processing tasks (e.g., rebroadcasting and restreaming) to a separate server. This reduces the CPU load on your main server, ensuring better performance and scalability for your AVideo platform.

By leveraging an external server, your main server can focus on delivering a seamless user experience while the external server handles resource-intensive operations like video encoding and streaming.

Important Note

Currently, only one external FFMPEG server is supported. You can configure a single external server to handle all FFMPEG tasks.


Key Benefits

  1. Improved Performance
    Offloading FFMPEG tasks prevents your main server from being overwhelmed, ensuring smooth operations for other critical services.

  2. Scalability
    Handle increased traffic by offloading video processing to a dedicated server.

  3. Cost Efficiency
    Use a dedicated, cost-effective server for FFMPEG instead of upgrading your main server to handle additional load.


Configuration Guide

Follow these steps to configure the external FFMPEG server:

1. Set Up the External Server

  • Install AVideo on a separate server. Follow the standard installation process outlined in the AVideo documentation.
  • After installation, navigate to the videos directory on the new server.

2. Create the Standalone Configuration File

  • Inside the videos directory, create a new file named standalone.configuration.php.
  • Add the following content to the file, replacing https://mysite.com/ with the URL of your main AVideo site:
    <?php
    $global['webSiteRootURL'] = 'https://mysite.com/';

3. Generate the Configuration File

  • Open your browser and visit the following URL, replacing mysite.com with the URL of your main site:
    https://mysite.com/plugin/API/standAlone/ffmpeg.json.php
    
  • The first time you access this URL, it will automatically generate the configuration.php file on the external server.

4. Configure the Main Site

  • Log in to your main AVideo site and navigate to the API Plugin settings.
  • Locate the standAloneFFMPEG parameter.
  • Add the URL of the external server’s FFMPEG endpoint, for example:
    https://myexternalserver.com/plugin/API/standAlone/ffmpeg.json.php
    

5. Test the Configuration

  • Initiate a rebroadcast or restream from your main site.
  • Monitor the external server to ensure it is handling the FFMPEG processing tasks correctly.

How It Works

  1. Main Server: Handles all website operations, ensuring a smooth user experience.
  2. External Server: Processes video streams and encoding tasks delegated by the main server.
  3. API Communication: Securely connects the main and external servers, ensuring tasks are performed as expected.
Clone this wiki locally