Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
acreskey
Visitor

RAF not correctly determining ad pods from VMAP

We're seeing an issue where the ad pods returned from RAF.getAds() do not match the VMAP in the ad URL provided to RAF via setAdUrl().

Background: we're using using SSAI in a RSG app.

Details:
When we look at the VMAP for the ad URL, we see, for example, two midrolls, with timeOffets:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap version="1.0.1">
    <vmap:AdBreak timeOffset="00:05:35.368" breakType="linear" breakId="1">
        <vmap:AdSource>
            <vmap:VASTAdData>
                <VAST version="3.0">
                    <Ad id="19585946" sequence="1">
                        <InLine>
                            <AdSystem>FreeWheel</AdSystem>
...
   </vmap:AdBreak>
    <vmap:AdBreak timeOffset="00:11:00.994" breakType="linear" breakId="2">
        <vmap:AdSource>
            <vmap:VASTAdData>
                <VAST version="3.0">
                    <Ad id="19585946" sequence="1">
                        <InLine>
                            <AdSystem>FreeWheel</AdSystem>
...



However the ad pods returned from RAF.getAds() shows (generally) only one preroll. 
e.g.
<Component: roAssociativeArray> =
{
    ads: <Component: roArray>
    backfilled: true
    duration: 30
    rendersequence: "preroll"
    rendertime: 0
    slots: 0
    tracking: <Component: roArray>
    viewed: false
}

Note that sometimes the returned ad pods contains both ads, with the correct render times.

This is an outline of our workflow, running in a player task node:
adInterface.setAdUrl(adURL)

adPods = adInterface.getAds()

adInterface.stitchedAdsInit(adPods)

...
while keepPlaying
 videoMsg = wait(500, port)
 curAd = adInterface.stitchedAdHandledEvent(videoMsg, { sgNode: videoNode, port: port })
 ...
end while


This is a problem for us since the RAF's ad handling (e.g. "Ad 1 of 1") and player control blocking will occur at the wrong time.

Ideas?
0 Kudos
17 REPLIES 17
tim_beynart
Channel Surfer

Re: RAF not correctly determining ad pods from VMAP

how are you providing a Freewheel URL when using SSAI? The results from 2 different ad requests can differ, right?
0 Kudos
acreskey
Visitor

Re: RAF not correctly determining ad pods from VMAP

Adobe Auditude is generating the ad URL for us -- this is what's provided to RAF via setAdUrl().
Auditude service is also stitching in the ads (correctly) into a new stream, which we're playing.

We are examining different ad requests (some that RAF correctly determines the ad pods from, and some that it doesn't) to try and spot the differences. But so far we haven't found any clues -- the VMAPs appear valid for both.
0 Kudos
NB_
Roku Guru

Re: RAF not correctly determining ad pods from VMAP

"acreskey" wrote:
This is a problem for us since the RAF's ad handling (e.g. "Ad 1 of 1") and player control blocking will occur at the wrong time.

Have you accounted for this detail - that for SSAI, stitchedAdsInit() expects time offsets from the stream start and not the break start?
"stitchedAdsInit()" wrote:
... In particular, for server-stitched ads, all time-dependent tracking beacons (Impression and quartile beacons) must have a valid time data member set, with a value relative to the entire stitched stream. For example, if a 30-second ad starts at 10:00 within the stitched stream, its Impression beacons should have track.time = 600.0 and its Midpoint beacons should have track.time = 615.0, and so on. ...

Also, where do you get the VMAP from? If it's from source before the stitching server, consider that the stitching process introduces some delays/extra frames, so the break pauses would diverge from VMAP from a separate ad server.
0 Kudos
tim_beynart
Channel Surfer

Re: RAF not correctly determining ad pods from VMAP

"acreskey" wrote:
Adobe Auditude is generating the ad URL for us -- this is what's provided to RAF via setAdUrl().
Auditude service is also stitching in the ads (correctly) into a new stream, which we're playing.

I get that, but the problem is that Adobe makes one FW request for their backend system, and you make another from the device. You could hit a situation where ad inventory is available for Adobe's request, then exhausted when the device makes the same request.
In our implementation of Adobe SSAI, we are provided with the VMAP response that Adobe gets from Freewheel and provide the data to RAF using stitchedAdsInit(). We never call setAdUrl() with SSAI.
0 Kudos
acreskey
Visitor

Re: RAF not correctly determining ad pods from VMAP

"RokuNB" wrote:
"acreskey" wrote:
This is a problem for us since the RAF's ad handling (e.g. "Ad 1 of 1") and player control blocking will occur at the wrong time.

Have you accounted for this detail - that for SSAI, stitchedAdsInit() expects time offsets from the stream start and not the break start?
"stitchedAdsInit()" wrote:
... In particular, for server-stitched ads, all time-dependent tracking beacons (Impression and quartile beacons) must have a valid time data member set, with a value relative to the entire stitched stream. For example, if a 30-second ad starts at 10:00 within the stitched stream, its Impression beacons should have track.time = 600.0 and its Midpoint beacons should have track.time = 615.0, and so on. ...


Also, where do you get the VMAP from? If it's from source before the stitching server, consider that the stitching process introduces some delays/extra frames, so the break pauses would diverge from VMAP from a separate ad server.


Thank you for the quick reply RokuNB.

Although I'm new to VMAP and VAST, it does appear that the time-dependent tracking beacons in the VMAP do have their time set relative to the entire stitched stream.
At least if RAF uses the 'tpos' field.
For example, here we have the AdBreak at 5:35, and I'm seeing <Impressions> and <Tracking> events with tpos=335 

    <vmap:AdBreak timeOffset="00:05:35.368" breakType="linear" breakId="1">
        <vmap:AdSource>
            <vmap:VASTAdData>
                <VAST version="3.0">
                    <Ad id="19585946" sequence="1">
                        <InLine>
                            <AdSystem>FreeWheel</AdSystem>
                            <AdTitle>....</AdTitle>
                            <Impression>http://bea4.v.fwmrm.net/ad/l/1?s=d001&amp;n=48804%3B48804%3B381963&amp;t=1499795079091200015&amp;f=&amp;r=48804&amp;adid=19585946&amp;reid=7250158&amp;arid=0&amp;auid=&amp;cn=defaultImpression&amp;et=i&amp;_cc=19585946,7250158,,,1499795079,1&amp;tpos=335&amp;iw=&amp;uxnw=&amp;uxss=&amp;uxct=&amp;metr=1031&amp;init=1&amp;vcid2=48804%3Af2c022b54b07596779cc00c4a7e26e49&amp;asid=-1&amp;ssid=1954993&amp;cr=https%3A//servedby.flashtalking.com/imp/8/78463%3B2547733%3B201%3Bpixel%3BTurner%3BTurnerConnectedTV301x1/%3Fcachebuster%3D700020434</Impression>
                            <Impression>http://ad.auditude.com/adserver/e?type=adimp&amp;a=342240&amp;w=17&amp;uid=0gCR6cUlSMWpsa74nrYlXQ&amp;s=2b595733&amp;t=1499795079&amp;u=ac217921a4a853e52310ebc459eef367&amp;z=131829&amp;cid=324172756&amp;br=1&amp;pod=id:1,ctype:l,ptype:p,dur:200,lot:1,cpos:1&amp;ax=0,0,0,0&amp;sq=1</Impression>
                            <Creatives>
                                <Creative AdID="19585946">
                                    <Linear>
                                        <Duration>00:00:30.030</Duration>
                                        <TrackingEvents>
                                            <Tracking event="creativeView">http://ad.auditude.com/adserver/i/;uid=0gCR6cUlSMWpsa74nrYlXQ;s=2b595733;t=1499795079;u=ac217921a4a853e52310ebc459eef367;z=131829;cid=324172756;br=1;pod=id:1,ctype:l,ptype:p,dur:200,lot:1,cpos:1;ax=0,0,0,0;sq=1;a1=105;a=342240;w=17/c0x0</Tracking>
                                            <Tracking event="start">http://ad.auditude.com/adserver/e?type=AD_PROGRESS&amp;a=342240&amp;a1=105&amp;ref=urn:asset:342240:105&amp;unit=percent&amp;progress=0&amp;uid=0gCR6cUlSMWpsa74nrYlXQ&amp;s=2b595733&amp;t=1499795079&amp;u=ac217921a4a853e52310ebc459eef367&amp;z=131829&amp;cid=324172756&amp;br=1&amp;pod=id:1,ctype:l,ptype:p,dur:200,lot:1,cpos:1&amp;ax=0,0,0,0&amp;sq=1</Tracking>
                                            <Tracking event="firstQuartile">http://bea4.v.fwmrm.net/ad/l/1?s=d001&amp;n=48804%3B48804%3B381963&amp;t=1499795079091200015&amp;f=&amp;r=48804&amp;adid=19585946&amp;reid=7250158&amp;arid=0&amp;auid=&amp;cn=firstQuartile&amp;et=i&amp;_cc=&amp;tpos=335&amp;init=1&amp;iw=&amp;uxnw=&amp;uxss=&amp;uxct=&amp;metr=1031</Tracking>
                                            <Tracking event="firstQuartile">http://ad.auditude.com/adserver/e?type=AD_PROGRESS&amp;a=342240&amp;a1=105&amp;ref=urn:asset:342240:105&amp;unit=percent&amp;progress=25&amp;uid=0gCR6cUlSMWpsa74nrYlXQ&amp;s=2b595733&amp;t=1499795079&amp;u=ac217921a4a853e52310ebc459eef367&amp;z=131829&amp;cid=324172756&amp;br=1&amp;pod=id:1,ctype:l,ptype:p,dur:200,lot:1,cpos:1&amp;ax=0,0,0,0&amp;sq=1</Tracking>
                                            <Tracking event="midpoint">http://bea4.v.fwmrm.net/ad/l/1?s=d001&amp;n=48804%3B48804%3B381963&amp;t=1499795079091200015&amp;f=&amp;r=48804&amp;adid=19585946&amp;reid=7250158&amp;arid=0&amp;auid=&amp;cn=midPoint&amp;et=i&amp;_cc=&amp;tpos=335&amp;init=1&amp;iw=&amp;uxnw=&amp;uxss=&amp;uxct=&amp;metr=1031</Tracking>
                                            <Tracking event="midpoint">http://ad.auditude.com/adserver/e?type=AD_PROGRESS&amp;a=342240&amp;a1=105&amp;ref=urn:asset:342240:105&amp;unit=percent&amp;progress=50&amp;uid=0gCR6cUlSMWpsa74nrYlXQ&amp;s=2b595733&amp;t=1499795079&amp;u=ac217921a4a853e52310ebc459eef367&amp;z=131829&amp;cid=324172756&amp;br=1&amp;pod=id:1,ctype:l,ptype:p,dur:200,lot:1,cpos:1&amp;ax=0,0,0,0&amp;sq=1</Tracking>
                                            


The VMAP is returned from the Auditude stitching server, so we are expecting it to be account for the extra frames. But the issue we're seeing is not that the Ad UI is rendered at a different time, it's that while we see two ad breaks in the VMAP, only one ad pod is generally found, and it's always rendered as a pre-roll.
0 Kudos
acreskey
Visitor

Re: RAF not correctly determining ad pods from VMAP

"tim_beynart" wrote:
"acreskey" wrote:
Adobe Auditude is generating the ad URL for us -- this is what's provided to RAF via setAdUrl().
Auditude service is also stitching in the ads (correctly) into a new stream, which we're playing.

I get that, but the problem is that Adobe makes one FW request for their backend system, and you make another from the device. You could hit a situation where ad inventory is available for Adobe's request, then exhausted when the device makes the same request.
In our implementation of Adobe SSAI, we are provided with the VMAP response that Adobe gets from Freewheel and provide the data to RAF using stitchedAdsInit(). We never call setAdUrl() with SSAI.

I see what you mean, Tim  - thanks for the reply.
So you're generating your own ad pod array from the original VMAP and feeding it directly into RAF.
That goes against our implementation guideline, so I'm hoping to avoid that.
0 Kudos
tim_beynart
Channel Surfer

Re: RAF not correctly determining ad pods from VMAP

Actually we never see the original VMAP response, we get an Adobe-defined JSON file with all the ad break information and beacons. This is part of the Adobe SSAI API we use. 

But frankly I don't see how you will ever have accurate ad data if you are making 2 requests to Freewheel, so hopefully I am misunderstanding your problem.
0 Kudos
tim_beynart
Channel Surfer

Re: RAF not correctly determining ad pods from VMAP

"acreskey" wrote:
That goes against our implementation guideline, so I'm hoping to avoid that.

I'm curious what guidelines you refer to. I've been using Adobe SSAI on Roku for over 2 years and your approach doesn't sound familiar.  We worked closely with them to implement SSAI.
0 Kudos
acreskey
Visitor

Re: RAF not correctly determining ad pods from VMAP

"tim_beynart" wrote:
Actually we never see the original VMAP response, we get an Adobe-defined JSON file with all the ad break information and beacons. This is part of the Adobe SSAI API we use. 

But frankly I don't see how you will ever have accurate ad data if you are making 2 requests to Freewheel, so hopefully I am misunderstanding your problem.

We're not making 2 requests to Freewheel -- one request to Auditude gives us the stitched ad stream, and a second (based on the first) supplies us with the VMAP (presumably the one that was used to stitch in the ads).
But our organization's guidance is to provide this VMAP to RAF to parse into ad pods. (Which I believe RAF should handle, according to the docs).
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.