Repository navigation
AD_Server Plugin
AD Server turns videos from your own library into video ads. You group ad videos in campaigns. The player then shows them before, during or after your videos, and before lives. The plugin is free.
See all types of ads possible on AVideo in the advertising overview.
A VMAP link tells a player when to show ads (for example at the start and at 50%). AD Server creates it for you.
A VAST link tells a player which ad to play (the video file, its length, its click link and the tracking links). Each campaign has its own VAST link.
Because VAST and VMAP are standards, you can copy the AD Server links into other players and apps that support them. Always test with the exact player you will use.
- Ad videos must be videos uploaded to your site. Embedded videos (links to YouTube and similar) cannot be used as ads. MP4 works best.
- Only admins can create and manage campaigns.
- Ads are added to uploaded videos only (not to embedded videos, audio or other media types).
- On lives (and LiveLinks), only a pre-roll ad is shown, when Pre Roll Live Stream is on.
- If the GoogleAds_IMA plugin is also enabled, AD Server stops placing its own ads. GoogleAds_IMA then adds your active campaigns to its own list of ad tags.
All campaigns are site-wide. There are no per-user campaigns.

AD Server follows the same rules as the other ad plugins: paying users (PayPerView buyers, Subscription members) and videos or channels marked Do NOT Show Video Ads do not get ads. See Who does not see ads.
Open the Advertising Manager in one of these ways:
- Admin Panel → Monetize → Site Advertisement with VAST Video ads
- The red Advertising Manager button at the top of My videos
- Admin Panel → Plugins, find AD_Server and click Advertising Manager
To have your ads play, you need to do two things:
- Create a campaign.
- Add videos to your campaign.
On the left, fill in the form and click Save:
- Name
- Starts on / End on: the campaign plays only between these dates.
- Max Prints: the maximum number of plays. When it is reached, the campaign stops.
- Status: Active or Inactive.
- Reward: an amount added to a wallet each time the ad is counted as played. It is paid to the owner of the ad video and needs the YPTWallet plugin. Leave it at 0 for no reward.
If the AD_Server_Location plugin is enabled, you can also choose countries, regions or cities here. See AD_Server_Location.
The VMAP Link field above the list shows your site's VMAP address (https://your-site.com/plugin/AD_Server/VMAP.php) for use in other players.
Each campaign row (right side) has these buttons:
| Button | What it does |
|---|---|
| Add Video | Add ad videos to the campaign |
| CSV icon | Download the campaign report as a CSV file |
| Chart icon | Show a performance chart (start, quartiles, complete, clicks) |
| Link icon | Open the VAST link of this campaign |
| Edit icon | Edit the campaign |
| Trash icon | Delete the campaign |
The Prints Left column shows how many plays remain.
- Click Add Video on the campaign.
- In Video, type part of a video title and choose it from the list.
- Optional: change the Ad Title and type a Video Redirect URI (the page that opens when a viewer clicks the ad).
- Click Save Video.
To use a new file as an ad, click Upload Video. The video is sent to your encoder and added to the campaign when it is ready.
When a campaign has several videos, one is chosen at random for each ad.
The following animation shows an earlier version of the campaign screen. Labels may differ in the current version.

Go to Admin Panel → Plugins, find AD_Server and click Edit parameters.
| Option | Label | Default |
|---|---|---|
prerollLive |
Pre Roll Live Stream | on |
start |
Show Pre-Roll ads | on |
mid25Percent |
Show Mid-Roll ads at 25% | on |
mid50Percent |
Show Mid-Roll ads at 50% | on |
mid75Percent |
Show Mid-Roll ads at 75% | on |
end |
Show Post-Roll ads | on |
-
Show Ads on (
showAdsOnEachVideoView): Every video (default) or every 2nd to 9th video a viewer watches. -
Show Ads On Positions (
showAdsOnRandomPositions): how many of the checked positions are used for each video. The default is 2 random positions. Choose All positions to use every checked position. To keep an ad out of a position (for example the start), uncheck that position above.
-
Skip Offset (
skipoffset): how much of the ad (in %) must play before the Skip button appears. Default 10%. -
Show Markers (
showMarkers): shows yellow marks on the progress bar where ads will play. -
Auto Add New Videos In Campaign (
autoAddNewVideosInCampaignId): every new video uploaded to the site is added to the chosen campaign. -
onlyRewardLoggedUsers: rewards are counted only when the viewer is logged in. On by default.
Click Advertising Reports on the AD_Server row in Admin Panel → Plugins to see ad events by video, user, event type and campaign. See the Video Ad Events Report.
| Problem | What to check |
|---|---|
| No ad plays | Is the campaign Active, between its start and end dates, with prints left, and with at least one video? Is the content an uploaded video (not embedded)? Is the GoogleAds_IMA plugin enabled (then it shows the ads)? Is the viewer a paying user, or using an ad blocker? With the default settings only 2 random positions get ads. |
| Ads play on some videos only | Check Show Ads on (frequency) and the Do NOT Show Video Ads switches on the video and its channel. |
| My VAST link does not work in another player | Open the link in a browser: it must show XML. Check the browser console of the other player for blocked requests. |
| The report numbers differ from views | Ad events (start, complete, click...) are counted separately from video views. |
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