This is the third edition (edit) of this article….
This Tutorial will guide you on the basic AVideo installation Streamer + Encoder + Live server (Nginx RTMP) for Ubuntu 24.04
Help with Installation
Instructions in this post are available as a video at this (AVideo Demo site) link. It is advised that the commands suggested below for installation are reviewed before blindly executing them since the location of web-services may be different on your host server.
Note that watching the author’s video, we get some extra tips and it would be wise to follow that video due to several issues with following these instructions blindly – I found for exampe MySql setup order could be improved. Alos, in the video, the author shows how to do a QUICK-INSTALL method as well as installing plugins….
Can’t seem to embed here but you can see thata video at https://tutorials.avideo.com/video/184
Feel free to ask us for help, you can hire us to do it for you:
https://youphp.tube/marketplace/?tab=services
Install Streamer + Encoder + Live (Nginx RTMP)
Just copy and paste this:
export DEBIAN_FRONTEND=noninteractive
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp && \
sudo chmod a+rx /usr/local/bin/yt-dlp && \
sudo apt-get update -y && \
sudo apt-get upgrade -y && \
sudo apt install -y --no-install-recommends ca-certificates apt-transport-https software-properties-common && \
sudo add-apt-repository -y ppa:ondrej/php && \
sudo apt-get install -y sshpass nano net-tools curl apache2 php libapache2-mod-php php-mysql php-sqlite3 php-curl php-gd php-intl php-zip php-mbstring mysql-server mysql-client ffmpeg git libimage-exiftool-perl libapache2-mod-xsendfile && \
sudo a2enmod xsendfile && \
&& \
sudo git clone https://github.com/WWBN/AVideo.git && \
cd /var/www/html && \
sudo git clone https://github.com/WWBN/AVideo-Encoder.git && \
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && \
sudo chmod a+rx /usr/local/bin/youtube-dl && \
sudo apt-get install -y build-essential libpcre3 libpcre3-dev libssl-dev php-xml && \
sudo a2enmod rewrite && \
sudo chown www-data:www-data /var/www/html/AVideo/plugin && \
sudo chmod 755 /var/www/html/AVideo/plugin && \
sudo apt-get install -y unzip && \
sudo apt-get install -y htop python3-pip && \
cd /var/www/html/AVideo/plugin/User_Location/install && \
sudo unzip install.zip && \
sudo a2enmod expires && \
sudo a2enmod headers && \
sudo systemctl start mysql && \
sudo mysql -u root -e "USE mysql;CREATE USER 'youphptube'@'localhost' IDENTIFIED BY 'youphptube';GRANT ALL PRIVILEGES ON *.* TO 'youphptube'@'localhost'; FLUSH PRIVILEGES;" && \
sudo chmod 777 /var/www/html/AVideo/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/ && \
sudo mkdir /var/www/tmp && \
sudo chmod 777 /var/www/tmp && \
sudo apt-get install -y --reinstall zlib1g zlib1g-dev && \
sudo mkdir ~/build && \
cd ~/build && \
sudo git clone https://github.com/arut/nginx-rtmp-module.git && \
sudo git clone https://github.com/nginx/nginx.git && \
cd nginx && \
sudo ./auto/configure --with-http_ssl_module --with-http_stub_status_module --with-http_auth_request_module --add-module=../nginx-rtmp-module --with-cc-opt="-Wimplicit-fallthrough=0" && \
sudo make && \
sudo make install && \
cd /usr/local/nginx/html && \
sudo wget https://raw.githubusercontent.com/WWBN/AVideo/master/plugin/Live/install/stat.xsl && \
sudo pip3 install glances --break-system-packages && \
sudo pip3 install vosk --break-system-packages && \
sudo pip3 install youtube-dl --break-system-packages && \
sudo pip3 install --upgrade youtube-dl --break-system-packages && \
sudo apt install -y --no-install-recommends certbot python3-certbot-apache software-properties-common snap snapd
MySQL Password
After running the commands, you’ll need to set your MySQL root password. This step has been adjusted from previous Ubuntu versions:
The simplest way is to use:
sudo mysql_secure_installation
Alternatively, you can set the password with:
sudo mysqladmin -u root OLDPASSWORD NEWPASSWORD
Or, if those don’t work:
sudo mysql <CR>
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'NEWPASSWORD';
Replace NEWPASSWORD
with your chosen password.
For more detailed information, you can refer to this guide or check Issue 796 for additional help.
Apache Virtual Host
Virtual hosting allows multiple domain names to be hosted on a single server. To set up a virtual host:
Create the virtual host file
Navigate to your sites-available
directory with:
cd /etc/apache2/sites-available/
Create a new virtual host file, for example:
sudo nano my-avideo-site.com.conf
Copy and paste the following configuration, replacing mysite.com
with your domain name:
<VirtualHost *:80>
DocumentRoot "/var/www/html/AVideo"
ServerName my-avideo-site.com
# ServerAlias www.my-avideo-site.com
ServerAdmin webmaster@localhost
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "/var/www/html/AVideo"
ServerName my-avideo-site.com
# ServerAlias www.my-avidedo-site.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /var/www/html/AVideo/>
Options Indexes FollowSymLinks
XSendFile on
XSendFilePath /var/www/html/AVideo/
AllowOverride All
Require all granted
Order Allow,Deny
Allow from All
</Directory>
Enable the site with:
sudo a2ensite my-avideo-site.com
Then restart Apache:
sudo /etc/init.d/apache2 restart
Install SSL with Let’s Encrypt
Install Certbot
sudo snap install --classic certbot
sudo mv /usr/bin/certbot /usr/bin/certbot_old
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Install the SSL Certificate
Run the following command and follow the prompts:
sudo certbot --apache --register-unsafely-without-email --redirect
Install Certbot for Nginx
sudo apt-get install python3-certbot-nginx -y
To ensure you have the correct nginx.conf and directories, run these commands:
Install SSL for Nginx
sudo mv /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.old && cd /usr/local/nginx/conf/ && sudo wget https://raw.githubusercontent.com/WWBN/AVideo/master/plugin/Live/install/nginx.conf && sudo mkdir /HLS && sudo mkdir /HLS/live && sudo mkdir /HLS/low
sudo mv /usr/sbin/nginx /usr/sbin/nginx.old && sudo cp /usr/local/nginx/sbin/nginx /usr/sbin/nginx
sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old && sudo cp /usr/local/nginx/conf/nginx.conf /etc/nginx/nginx.conf
β οΈ Before running the SSL installation command, you must edit your nginx configuration file and add your domain name.
Open the config file:
sudo nano /usr/local/nginx/conf/nginx.conf
Find the line:
server_name localhost;
Replace it with:
server_name localhost my-avideo-site.com;
Replace
my-avideo-site.com
with your actual domain name.
Save the file and exit [ CTRL-W ]
Replace the port number in the nginx.conf
sudo sed -i 's/listen 443 ssl/listen 8443 ssl/g' /usr/local/nginx/conf/nginx.conf
Now run:
sudo certbot --nginx --nginx-server-root /usr/local/nginx/conf --no-redirect
Restart Nginx
sudo /usr/local/nginx/sbin/nginx -s stop && sleep 1 && sudo /usr/local/nginx/sbin/nginx
Open the site in your browser
Finally, open your browser and go to mysite.com
to access your AVideo installation.
We hope you enjoy using AVideo! If you need any help, have questions, or encounter any issues, please open an issue on GitHub.
AVideo Platform Official Website | Twitter | Facebook | WWBN Solutions | Plugins Marketplace
Author:
Daniel Neto edited this page on Jun 22 Β· 3 revisions
This article was first published here :
Others (also available as a Docker image)
π§ Ubuntu-Specific Installation Guides
- Tailor your installation to your specific Ubuntu version:
- π Ubuntu 16.04 Guide
- π Ubuntu 18.04 Guide
- π Ubuntu 20.04 Guide
- π Ubuntu 22.04 Guide
- π Ubuntu 24.04 Guide