-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How to insert mid-ad (get from own ad server) into the content when using packager HLS stream? #650
Comments
Shaka Packager does not insert the Ads itself. What it does is to precondition the content for Ad insertion. #EXT-X-PLACEMENT-OPPORTUNITY is a Google extension for Ad Insertion. If you don't use Google Ad Manager, what you can do is to replace #EXT-X-PLACEMENT-OPPORTUNITY with #EXT-X-DISCONTINUITY followed by Ad segments (#EXTINF...) yourself. @Romantic-LiXuefeng Does that answer your question? |
Because of the Chine Internet firewall, i can't use the Google Ad Manager, so that I can't run a example with the options
I want to know when to insert the ad? If not insert ad, the player how to play ?
|
#EXT-X-PLACEMENT-OPPORTUNITY is the place to insert mid-roll Ads. As mentioned earlier, you can just replace it with your Ad segment tags. For example, you have a mid-roll ad segment you want to insert: mid_roll_ad.ts Packager pre-conditioned playlist:
You can replace #EXT-X-PLACEMENT-OPPORTUNITY with your Ad segment:
As for pre-roll and post-roll ads, you can just insert it before all media segments and after all media segments respectively. They don't really need ads pre-conditioning.
It should just work as the player ignores unrecognized tags according to HLS specification. |
ok! Thanks for your help. |
@kqyang Just doing as your suggestions to insert the mid ad. Not play correctly using |
Have you tried Shaka Player? |
@kqyang I'm sorry. I'm not familiar with Shaka Player, and try to play with it. If have some result, I will report. I also have sent the content to shaka-packager-issues@google.com. |
@kqyang I followed the description in https://github.com/google/shaka-player/blob/master/docs/tutorials/basic-usage.md. Can't start to play. I also start to play the stream using Safari browser. It plays well. |
@Romantic-LiXuefeng You can just use the demo player at: https://shaka-player-demo.appspot.com/demo/#audiolang=en-US;textlang=en-US;uilang=en-US;panel=HOME;build=uncompiled. Looks like ExoPlayer team has already figured out where the problem is :) |
@kqyang The ExoPlayer team has fixed the problem. Hope to support muxing all the streams into TS container for reducing the process of demuxing ads into separate streams. Also, there is a bug, Using Docker with latest version to insert multi mid ads, e.g. 60s and 120s. Only the first mid ad can generate
|
@Romantic-LiXuefeng Can you provide the source stream you were using? We can try if we can re-produce the problem. |
@kqyang I have sent the source stream to shaka-packager-issues@google.com. |
@Romantic-LiXuefeng It works for me. Note that ";" is a special character in some Linux shells, so remember to enclose it (e.g. enclose in '': '60;120') or skip it (i.e. 60;120) if you run the command in Linux shells.
|
I have some questions about this description.
Before packager the HLS stream, I have request the pre-ad, mid-ad and post-ad
from our own ad server. I found
ad_cues <start_time[;start_time]>
only supportadding parameter
start_time
, Can't set the ad url. If not support setting ad url, pleasegive some advice how to implement this feature.
#EXT-X-PLACEMENT-OPPORTUNITY
tag.Also, I searched the
ExoPlayer
, the player also do nothing about this Tag. Please hope give some useful information.The text was updated successfully, but these errors were encountered: