Repository navigation
Private Encoder
The Web Encoder converts uploaded files (from phones, cameras, editors) into formats every browser can play, and imports videos from other sites. It is a separate application from your AVideo site (the Streamer), with its own database. One Encoder can serve several AVideo sites.
Until you set your own, AVideo uses the public encoder https://encoder1.wwbn.net/. Install your own Encoder when you want faster, private encoding, or when your site is on a private network (for example localhost, 10.x.x.x or 192.168.x.x): the public encoder cannot send finished videos back to such a site.
Jump to: a video is stuck · public Encoders · more than one Encoder · Encoder administrators.
To use an Encoder that is already configured, follow the Web Encoder walkthrough and file-upload video. Start from your site's camera menu → Encode video and audio, choose From File, add the source and click Upload. Follow Sharing Queue, then verify the lesson in AVideo.
The installation commands below are for the administrator setting up a server; an ordinary uploader does not need to run them.
Your AVideo site still needs a working Web Encoder. For everyday video uploads and single-video URL imports, we recommend Local Encoder as an additional desktop option alongside it. It runs on Windows, macOS and Linux, converts videos on your own computer and uploads the results directly to AVideo. With supported hardware it can encode faster and reduce server load. Downloading through your own connection can also be more reliable when YouTube blocks the Web Encoder server's IP address.
Local Encoder does not replace the Web Encoder services used for live preview images, video thumbnails and timeline previews, recorded lives and DVR, meeting recordings, mobile uploads, playlist-to-live processing and external-link metadata. See why the Web Encoder is still required. Keep Encoder URL pointing to your Web Encoder; do not remove it when adopting Local Encoder. The Local Encoder guide includes downloads, setup and current limits.
The instructions below install the server-based Web Encoder.
| Where | When to choose it | Encoder URL (example) |
|---|---|---|
Same server as AVideo, in /var/www/html/AVideo/Encoder
|
Small site, few uploads | https://your-domain.com/Encoder/ |
| Its own server | Busy site: encoding uses a lot of CPU, memory and disk, and can slow down your viewers | https://encoder.your-domain.com/ |
Use Ubuntu Server 24.04 or 26.04 without a control panel (cPanel, Plesk, Webmin...): control panels block the tools the Encoder needs. With Docker, the AVideo Compose setup already includes an Encoder; see Running AVideo with Docker.
Advanced (server access needed).
If you installed AVideo with Install AVideo on Ubuntu 24.04 or 26.04, follow its section Add your own Encoder. It downloads the Encoder from https://github.com/WWBN/AVideo-Encoder.git into /var/www/html/AVideo/Encoder, creates its own database, runs the Encoder installer at https://your-domain.com/Encoder/install/, installs the monitor task and sets the Encoder URL. The tools and PHP limits the Encoder needs were already set by that guide.
Then continue with Allow imports from YouTube and Check that it works below.
Advanced (server access needed). You need a new Ubuntu 24.04 or 26.04 server, a name such as encoder.your-domain.com pointing to it, and ports 80 and 443 open. In every block below, replace encoder.your-domain.com with that name and your-domain.com with your AVideo site.
-
Install the web server, database, PHP and media tools. Open a terminal on the Encoder server (SSH) and paste:
sudo apt update sudo apt install -y apache2 mysql-server git curl unzip openssl cron ffmpeg \ libimage-exiftool-perl python3 php libapache2-mod-php php-cli php-common \ php-mysql php-curl php-gd php-intl php-mbstring php-xml php-zip php-sqlite3 \ certbot python3-certbot-apache
-
Raise the PHP limits. The browser sends files to the Encoder in 5 MB pieces, and Ubuntu's default (2 MB) rejects them. This saves a copy of
php.inifirst:PHPV=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;') INI="/etc/php/$PHPV/apache2/php.ini" sudo cp "$INI" "$INI.bak" sudo sed -i -E 's/^upload_max_filesize *=.*/upload_max_filesize = 10G/; s/^post_max_size *=.*/post_max_size = 10G/; s/^memory_limit *=.*/memory_limit = 512M/; s/^max_execution_time *=.*/max_execution_time = 7200/' "$INI" grep -E '^(upload_max_filesize|post_max_size|memory_limit|max_execution_time)' "$INI"
The last command must print the four new values.
-
Download the Encoder and create its database. The password is saved in
/root/avideo-encoder-credentials.txtand shown on the screen:sudo git clone https://github.com/WWBN/AVideo-Encoder.git /var/www/html/AVideo/Encoder sudo mkdir -p /var/www/html/AVideo/Encoder/videos sudo chown -R www-data:www-data /var/www/html/AVideo/Encoder/videos ENCODER_DB_PASSWORD="$(openssl rand -hex 20)" sudo mysql -e "CREATE DATABASE avideo_encoder CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'avideo_encoder'@'localhost' IDENTIFIED BY '${ENCODER_DB_PASSWORD}'; GRANT ALL PRIVILEGES ON avideo_encoder.* TO 'avideo_encoder'@'localhost';" printf 'Database host: localhost\nDatabase name: avideo_encoder\nDatabase username: avideo_encoder\nDatabase password: %s\n' "$ENCODER_DB_PASSWORD" | sudo tee /root/avideo-encoder-credentials.txt sudo chmod 600 /root/avideo-encoder-credentials.txt
-
Create the website and its HTTPS certificate:
sudo a2enmod rewrite headers expires sudo tee /etc/apache2/sites-available/avideo-encoder.conf >/dev/null <<'APACHE' <VirtualHost *:80> ServerName encoder.your-domain.com DocumentRoot /var/www/html/AVideo/Encoder <Directory /var/www/html/AVideo/Encoder> Options -Indexes +FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost> APACHE sudo a2ensite avideo-encoder.conf sudo apache2ctl configtest sudo systemctl restart apache2 sudo certbot --apache -d encoder.your-domain.com
configtestmust printSyntax OK. Certbot works only if the name already points to this server. -
Open
https://encoder.your-domain.com/install/. The page first checks the server; it must say Environment ready. Fill in:Field Value Database host / Port localhost/3306Username / Database password avideo_encoderand the password from step 3Database name avideo_encoderEncoder URL https://encoder.your-domain.com/Your AVideo site URL https://your-domain.com/(the exact address, without redirects)Administrator username / Administrator password An administrator account of your AVideo site Allowed Streamers https://your-domain.com/(if left empty, any AVideo site can use your Encoder)Click Install Encoder. The installer checks the administrator account with your AVideo site, so the site must be online and reachable from this server.
-
Install the monitor task. It runs every minute, retries failed jobs and e-mails video owners about problems (see Encoder alerts):
sudo php /var/www/html/AVideo/Encoder/install/installCron.php
It must print
Installed /etc/cron.d/avideo-encoder-...andruns as www-data. -
In AVideo, open Site Configurations, tab Advanced Configuration, set Encoder URL to
https://encoder.your-domain.com/and click Save.
Both servers must reach each other over HTTPS: the Encoder signs in to your site and sends finished files to it, and your site downloads finished files from the Encoder.
The Encoder's Import Video tab uses yt-dlp, and the Encoder looks for it at /usr/local/bin/yt-dlp. YouTube also needs a JavaScript runtime (Deno). See Install yt-dlp for the commands and for keeping it updated.
- In AVideo, click the upload button (camera icon) and choose Encode video and audio. The Encoder opens and signs you in.
- In the From File tab, upload a short video.
- Watch it in the Sharing Queue tab until it finishes.
- Open My videos in AVideo: the video must have an image, play, and show the expected qualities.
- As administrator, open the Encoder's Monitor tab (
https://your-encoder-address/index.php#monitor): it must not show a red warning.
If the Encoder says We could not find your streamer site!, see Encoder cannot find the Streamer.
Find where it stopped, then check only that stage.
- The browser upload never reaches 100%. The problem is the upload, not the conversion: see upload size limits, your connection, and any proxy or CDN in front of the site.
-
Open the Encoder's Sharing Queue tab (camera icon → Encode video and audio) and find the job:
-
Queued with other jobs ahead: it is waiting its turn. An Encoder converts one video at a time unless its administrator raised
$global['concurrent']in the Encoder'svideos/configuration.php. Lower Priority numbers (Encoder Streamers tab) go first. Do not upload again. - Downloading, Encoding, Packing or Transferring with progress moving: wait. Long or 4K videos can take hours.
- Error: read the message under the job (see the table below).
-
The job is not listed: the Encoder did not accept it. A file name, title or link containing
porn,xvideos,xhamsterorxnxxis refused; rename it and upload again. Otherwise check the Encoder log.
-
Queued with other jobs ahead: it is waiting its turn. An Encoder converts one video at a time unless its administrator raised
- Open the Queue Log tab for jobs that ended. Its buttons: Re-Queue runs the job again, Recheck checks that the site received the files and sends them again if needed, Renew site access asks for the password of the account on the video site when the site refused the Encoder (your encoded files are kept), Delete Queue removes the job.
-
Encoder administrators: open the Monitor tab (
https://your-encoder-address/index.php#monitor). A red warning means the monitor task is not running; the tab shows the command to install it. When it runs, it restarts a queue that stopped, queues again jobs whose conversion process died (after 10 minutes) and retries temporary errors. -
Check free disk space on the Encoder and on your site (
df -h). A full disk stops conversions and transfers. -
Check that the Encoder reaches your site. Run the
curltest from Encoder cannot find the Streamer on the Encoder server. -
Update both AVideo and the Encoder (
git pullin each folder, see Update the Encoder). Many stuck-queue reports were fixed by updating. - Read both logs at the time of the problem (paths in Common questions). Search for the video title.
A recorded live that never appeared as a video goes through the same queue; see also SendRecordedToEncoder.
| Message on the job | What to do |
|---|---|
| We could not get videos_id check the streamer logs | Your site did not create the video entry. In the AVideo log at that time, read the lines with aVideoEncoder. Common causes: the account cannot upload, a storage limit, or the site returned an invalid answer (a PHP error, a redirect, a proxy page). |
| Text that ends with use Recheck (for example Site refused access, Timed out during transfer, Request exceeds an upload size limit (HTTP 413)) | The video was encoded but not delivered; the files were kept. Fix what the message says, then click Recheck in Queue Log. For Site refused access, use Renew site access. |
| ERROR: JavaScript runtime required for YouTube | Install Deno: Install yt-dlp. |
| Could not save file followed by a link | The import download failed. See URL import errors. |
| The uploaded file exceeds the upload_max_filesize directive in php.ini | The Encoder server's PHP limit is below 5 MB. See step 2 of Install on a separate server. On a public Encoder, only its operator can fix it. |
https://encoder1.wwbn.net/ and the other public Encoders are shared by many sites:
- Your video waits behind other sites' videos.
- Their upload limits and settings are fixed; you cannot change them or see their Monitor tab.
- Your site must be reachable from the internet over HTTPS.
- If a public Encoder is slow, stopped or refuses files, nothing on your site fixes it. Try again later, use Local Encoder, install your own Encoder, or report it on AVideo-Encoder issues.
"Your site is banned" can appear on any Encoder, public or private. See Encoder cannot find the Streamer.
- One Encoder URL per site. The upload menu and all AVideo services (thumbnails, live previews, recordings) use the address in Site Configurations → Advanced Configuration → Encoder URL. There is no automatic failover: if that Encoder is down, change Encoder URL to another working Encoder and click Save. AVideo keeps the old address for about a minute.
- A second Encoder can be used by hand. Open the other Encoder's address, type your site address in Streamer Site and sign in with your site account. The finished video goes to your site as usual. That Encoder must allow your site (Allowed Streamers Sites).
-
Choosing an Encoder automatically needs the separate Encoder Network project. In Admin Panel → General Settings, panel Upload, set
encoderNetworkto your network's address and turn onuseEncoderNetworkRecomendation. If the network does not answer, AVideo uses Encoder URL and pages get slower; turn the option off again. With the default network address and your own Encoder installed in theEncoderfolder, the option is ignored.

The extra Encoder Network upload button stays hidden while doNotShowEncoderNetwork is on (the default). Jobs already in a queue keep the site they were sent from.
Advanced (server access needed). Updating AVideo does not update the Encoder. Back up the Encoder database first, then:
cd /var/www/html/AVideo/Encoder && sudo git pullSign in to the Encoder as administrator. If the Update tab shows a number, open it and click Update Now.
If the server's PHP version changes (for example after upgrading Ubuntu), run sudo php /var/www/html/AVideo/Encoder/install/installCron.php again: the monitor task contains the PHP path.
- Allowed Streamers (set during installation) limits which AVideo sites can use it. To change it later, sign in to the Encoder as administrator, open the Configurations tab, edit Allowed Streamers Sites (one address per line, empty for any site) and click Save.
- When a site sends a video to the Encoder, the Encoder downloads it only from a public address or from that site's own address. Addresses of the Encoder itself are refused.
- Any user who can upload also sees Bulk Encode, which lists video files from a folder on the Encoder server. To keep it for administrators only, edit
/var/www/html/AVideo/Encoder/videos/configuration.phpand change the$global['disableBulkEncode']line to$global['disableBulkEncode'] = true;.
The Encoder keeps its own list of administrators. An administrator of your AVideo site is not automatically an Encoder administrator. Only Encoder administrators see the Configurations (resolutions, allowed sites), Update, Streamers and Monitor tabs, and they receive the system alerts.
- The account used during the Encoder installation is an Encoder administrator.
- To add one: the person signs in to the Encoder once with their site account. An Encoder administrator then opens the Streamers tab, finds the row with that site address and user, and sets Admin to Yes.
- If no one can sign in as Encoder administrator: Advanced (server access needed), run
sudo -u www-data php /var/www/html/AVideo/Encoder/install/makeAdmin.php USERNAME(replaceUSERNAME). Every row with that user name becomes an administrator.
The Encoder e-mails a video's owner when their video fails, takes too long, or waits too long, and warns the Encoder administrators about problems that affect every video, such as low disk space. See Encoder alerts: who is notified when a video has a problem.
Where are the logs? Encoder: /var/www/html/AVideo/Encoder/videos/avideo.log. AVideo: /var/www/html/AVideo/videos/avideo.log. Compare both at the time of the problem.
How do I change which resolutions are created? An Encoder administrator opens Configurations → Resolutions, ticks the ones to create and clicks Save. They apply to new jobs; your site's settings can limit them further. See Resolutions.
How do I get a lower resolution for a video that is already published? Resolutions are created only while encoding. Tick the resolution as above, then in the Encoder's Advanced tab use Update existing video: search for the video, then upload its original file again. The video keeps its page and link. The panel is hidden when the CustomizeAdvanced option doNotAllowUpdateVideoId is on.
My site's domain changed. What do I change in the Encoder? Add the new address to Allowed Streamers Sites (if the list is not empty) and sign in again with the new address. See Change the URL: surrounding services.
Can I use localhost as an address? Only if it points to the other application from where the request is made. In Docker, each container has its own localhost.
Why is the public encoder still used? Check the saved Encoder URL, wait a minute, and start a new upload.
Why does encoding finish but the video never appears? Sending the files back failed. Open Queue Log, read the message, fix it and click Recheck. Also check free disk space on both servers, that each server reaches the other over HTTPS, and both logs.
Uploads to the Encoder fail, even small files. upload_max_filesize on the Encoder server is smaller than 5 MB. See step 2 of Install on a separate server.
Start
Install and update
- Install on Ubuntu 24.04 or 26.04
- Installation Setup Page
- Scheduler cron job (required)
- Set up email
- Use HTTPS
- Own Encoder
- Docker
- Update AVideo
- Backup
- Secure file permissions
- Server command-line tools
- Hidden configuration options
Videos
- Upload a video
- Upload methods — visual guide
- Local Encoder (on your computer)
- Bulk upload from a server folder
- Import a channel
- Publish on YouTube and social media
- Access and payments — visual guide
- Privacy options
- Only for logged-in users
- Resolutions by user group
- Mandatory playback access rules
- Storage options
- Move and protect video files
- Video does not play
Users
Live
- Make a live stream
- Stream with OBS
- Own live server
- One live server, many sites
- Live server install errors
- Live does not play
Plugins
Problems
Other
- Translate your site
- Write a plugin (developers)
- Technical reference (developers and advanced administrators)
Old and retired guides