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: 

Pre-roll ad problems

Hi,

I'm using the Roku Ad Framework for playing pre/mid/post roll ads. On my Roku 3 and Roku Ultra, ads play perfectly. Everything works.

However, on my Roku 2 (using the same Wi-Fi connection as I use for my Roku 3 and Ultra), I get the expected “Your program will begin after these messages” loading screen as it loads the ad, but then I can hear the ad begin playing in the background before the loading screen goes away. I finally see the ad playing, but it gets cut off before it can complete. I've also received reports of the ad getting cut off at the beginning.
 
I’ve looked at the ads returned from the ad server, and everything looks good. The bitrates for the ads are modest, so the player shouldn’t struggle so hard to play them correctly.

For example, here are the mp4 choices returned from the ad server:

MediaFile id="GDFP" delivery="progressive" width="640" height="360" type="video/mp4" bitrate="561" scalable="true" maintainAspectRatio="true"
MediaFile id="GDFP" delivery="progressive" width="1280" height="720" type="video/mp4" bitrate="1951" scalable="true" maintainAspectRatio="true"
MediaFile id="GDFP" delivery="progressive" width="1920" height="1080" type="video/mp4" bitrate="3774" scalable="true" maintainAspectRatio="true"

I would think that out of the three, a Roku 2 would choose the second one?

At any rate, any insight into this would be appreciated, thank you!
0 Kudos
2 REPLIES 2
NB_
Roku Guru

Re: Pre-roll ad problems

Which stream gets picked depends on the measured bandwidth when streaming prior.
What's the model# of said "Roku 2" (multiple devices have been marketed under that name)?
Can you provide sample ads and/or MWE with the issue?
0 Kudos
deepaksharma
Visitor

Re: Pre-roll ad problems

Hey guys, I am using my Roku 2 (using the same Wi-Fi connection as I use for my Roku 3 and Ultra). Videos playing perfectly on it but I would like to render an advertisement on it while not interacting with the remote for 1 hour. I am using a my app.xml file to render ad but failed. Here is my code snippet :
   adIface = Roku_Ads()
    print "Roku_Ads library version: " + adIface.getLibVersion()
    ' Normally, would set publisher's ad URL here.  Otherwise uses default Roku ad server (with single preroll placeholder ad)
    adIface.setAdUrl("pkg:/feed/app.xml") 
    adPods = adIface.getAds()
     print "Ad --> "+adPods
if not closingContentScreen and adPods <> invalid and adPods.Count() > 0
playContent = adIface.showAds(adPods) ' show preroll ad pod (if any)

Note : Is there any way to prinit out adPods value and its adPods.Count( ).

Thanks in advance.
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.