-
Notifications
You must be signed in to change notification settings - Fork 971
Live Plugin
This plugin allows you to broadcast live streams from your device to your AVideo platform, providing real-time video to viewers.
Before you can start using the live streaming plugin, certain configurations are required. Below is a detailed guide to set up your server and integrate with the Live Plugin.
The Live Plugin requires an NGINX RTMP Server to handle live streams. If you haven’t set one up yet, please follow this tutorial.
Other RTMP servers can be used, but they won’t be as tightly integrated as the NGINX RTMP setup. To use third-party RTMP servers, you’ll need the LiveLinks plugin.
The following parameters are used to configure the Live Plugin. If you have installed NGINX RTMP on the same server as AVideo, you probably do not need to change anything. For advanced settings, make sure you understand their functionality before making modifications.
-
🖥️ server:
RTMP Server URL
Default:rtmp://your-domain/live
This is the URL where your RTMP server listens for incoming streams. -
🌐 playerServer:
HTML5 Player URL
Default:https://your-domain:8443/live
This URL is used by your HTML5 player to serve HLS streams. Ensure it uses HTTPS if your site is HTTPS. -
📊 stats:
Stats Page URL
Default:https://your-domain:8443/stat
This URL is used to retrieve statistics about your live stream (e.g., whether it’s online). -
🔁 restreamerURL:
Restreamer URL
Default:your-domain/plugin/Live/standAloneFiles/restreamer.json.php
This URL handles the restreaming process. If you plan to restream your live stream to platforms like YouTube or Facebook, this is where the configuration occurs. -
🔧 controlURL:
Control URL
Default:your-domain/plugin/Live/standAloneFiles/control.json.php
This URL is used to manage live stream control features like starting/stopping recording or dropping publishers. -
🛠️ controlServer:
Control Server
Default:http://localhost:8080/
URL used for live stream control. You can keep the default if NGINX RTMP is installed on the same server. -
🌐 useLiveServers:
Use Live Servers
Default:false
Enable this if you plan to use external live servers. Otherwise, leave it disabled. -
📂 hls_path:
HLS Path
Default:/HLS/live
This is the path where HLS segments are stored when a live stream is stopped.
-
⏪ disableDVR:
Disable DVR
Default:false
Enabling this will disable the DVR functionality, preventing users from rewinding the live stream. Control DVR length innginx.conf
. -
🖼️ disableGifThumbs:
Disable GIF Thumbnails
Default:false
Disabling this option will prevent animated GIF thumbnails from being generated for live streams, reducing server load. -
📷 disableLiveThumbs:
Disable Live Thumbnails
Default:false
Disabling this option will use a static image for live streams instead of generating a live thumbnail, saving server resources. -
📜 doNotShowLiveOnVideosList:
Do Not Show Live on Videos List
Default:false
If enabled, live streams will not be listed on the main videos gallery page. -
🔒 protectLive:
Live Protection
Default:false
Enabling this will protect your live stream encryption key, so only your site’s player can play the video. Download tools will be blocked. -
🔢 limitLiveOnVideosList:
Limit Live on Videos List
Default:12
Limits the number of live videos shown on the videos list page.
If you are not familiar with these options, it's best to leave them unchanged.
-
🌀 useAadaptiveMode:
Adaptive Mode
Default:false
This mode adjusts the live stream quality based on the viewer's bandwidth. It consumes more CPU resources. -
⏰ autoFishLiveEveryHour:
Default:false
This option checks every hour for offline live sessions and ends them automatically if they are still marked as live. -
🛡️ controllButtonsShowOnlyToAdmin_*:
These options control whether certain buttons (e.g., for starting/stopping recording or dropping the publisher) are visible to admins only.
For most users, the default configuration will work if NGINX RTMP is installed on the same server as AVideo. The plugin is designed to handle most of the configuration automatically. If you need to customize your setup (e.g., restreaming to other platforms or using external servers), you can adjust the parameters listed above.
For advanced options such as Adaptive Mode and control buttons, it's recommended to only modify them if you're familiar with how they impact performance.
From version 4, the Live Plugin supports distributing live streams across multiple servers. You can configure RTMP servers on different machines in the Live Servers menu.
Once you have configured the system, you can start using the live streaming features of the plugin.
You can publish live streams using:
- A mobile device.
- Desktop RTMP publisher software (e.g., OBS).
Currently, you cannot publish directly using your webcam through the website interface.
For more details on how to publish a live stream, click here.
The plugin allows you to save your live streams. Once a live stream ends, it can be sent to your encoder and stored in your video library.
For more details on saving live streams, click here.
The plugin allows for unlimited simultaneous live streams and users, but hardware limitations will apply based on:
- Bandwidth available.
- Video quality being streamed.
For live broadcasts with a large audience, we recommend using a dedicated server. VPS providers may suspend your account due to high resource usage.
Video Resolution | Bandwidth | Simultaneous Users (100Mbps) | Simultaneous Users (1Gbps) | YPT CDN |
---|---|---|---|---|
1080p | 5 Mbps | 20 | 200 | unlimited |
720p | 2.5 Mbps | 40 | 400 | unlimited |
480p | 1 Mbps | 100 | 1000 | unlimited |
360p | 500 kbps | 200 | 2000 | unlimited |
240p | 300 kbps | 350 | 3500 | unlimited |
WThe Redirect URL feature allows live stream owners to redirect all live viewers to a specified URL. Now, with an additional custom message field, you can provide a custom message that viewers will see before being redirected.
- Open the Live Panel: Inside the live panel, you will find the option to redirect viewers.
- Add a URL: Choose from a list of your available live streams or manually enter a URL, including external sites.
- Set a Custom Message (optional): You can now include a custom message that viewers will see before being redirected. If no message is provided, a default message will be displayed.
- Click the Redirect Viewers Button: Once the URL and message (if any) are set, click the redirect button to send all live viewers to the specified URL.
Your viewers will receive a message notifying them about the redirection, and then they will be redirected to the specified link.
Note: This feature requires the Socket Plugin.
To avoid bottlenecks when delivering live streams, use the [YPT CDN Plugin](https://
github.com/WWBN/AVideo/wiki/CDN-Plugin). CDNs distribute your video across servers worldwide, improving scalability and performance for your live streams.
Live streams use HLS (HTTP Live Streaming), which introduces a natural delay. The delay is due to the time required for:
- Encoding.
- Transmission across the internet.
- Distribution to edge servers.
Latency and buffering can also be caused by:
- Server hardware: Insufficient CPU, RAM, or disk I/O can introduce delays.
- Internet speed: Slow bandwidth at either the server or client’s end.
For larger audiences or unstable internet connections, we recommend using Adaptive Streaming, which dynamically adjusts the video quality based on the viewer’s bandwidth.
This requires a specific NGINX configuration. More details here.
The Restream feature allows you to broadcast your live stream to multiple platforms simultaneously (e.g., YouTube, Facebook, Twitch). You can configure restreaming by editing the restreamer.json.php
file inside the Live Plugin.
For security, restreaming requires token authentication, but the same configuration can be used across multiple live servers.
The Control Module allows you to:
- Start/Stop live stream recording.
- Drop live stream clients using HTTP control commands.
Ensure the following configuration is present in your nginx.conf
file:
http {
server {
location /control {
allow 127.0.0.1;
deny all;
rtmp_control all;
}
}
}
The control logic is handled by the control.json.php
file, which must be placed on the same server as the NGINX RTMP server.