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: 
kelvis2000
Visitor

Re: Video is fast on Web, slow on Roku? Url metadata below

"RokuMarkn" wrote:
You say it "does not stream". Does that mean it fails to play at all, or just that it buffers for a long time before playing? What if you just use the simplevideoplayer example and put your URL in there? I did that and the video starts in about 2-4 seconds. If it still takes a long time for you it may be related to your local network conditions.

--Mark

RokuMarkn thanks for your help, what is the simplevideoplayer example?
These videos are just way too slow when I open my dev channel
which is a Blues Guitar channel (I Hope at this point) I go and select a video,
its taking 30 seconds to a minute for the download and start of video.
So the video does play but no one will want to sit around that long waiting for
a Video to start.
I have no idea what I am doing wrong, I don't know if its the Dreamhost
Cloud so I am setting up a Amazon Cloud and more than likely its not Dreamhost/DreamObjects.

On the web these videos work fine but these videos are supposed to
stream through Roku, so again I have not a clue why Web works here and Roku does not.

Thanks

Kevin
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Video is fast on Web, slow on Roku? Url metadata below

"NewManLiving" wrote:
Tried it on your server. Took an average of 7 seconds, 12 - 15 at times on my box


Similar results here. I'm seeing it consistently take 7-10s on Roku 3 with a wired connection. Maybe if you share exactly what your content-meta-data looks like that could provide a hint.

---- AA ----
stream: (assocarr)...
url: http://guitar.objects.cdn.dream.io/VIDEOS/CCRyderB.m4v
streamformat: mp4
------------
0 Kudos
kelvis2000
Visitor

Re: Video is fast on Web, slow on Roku? Url metadata below

"RokuChris" wrote:
"NewManLiving" wrote:
Tried it on your server. Took an average of 7 seconds, 12 - 15 at times on my box


Similar results here. I'm seeing it consistently take 7-10s on Roku 3 with a wired connection. Maybe if you share exactly what your content-meta-data looks like that could provide a hint.

I am using CrossFTP would this be the correct information below?
Thanks for your help! I have the permission set to Full for myself and public set to Read only_____________________________

Constant Headers Constant Headers
ETag "eecf2f4b096937e587c68a869f591949-7"
__complete__ {ETag="eecf2f4b096937e587c68a869f591949-7", Date=Mon Apr 13 08:51:00 EDT 2015, Content-Length=106037735, x-amz-meta-crossftp-original-file-date-iso8601=2015-04-08T12:49:01.000Z, Last-Modified=Fri Apr 10 12:13:02 EDT 2015, Content-Type=video/x-m4v, Accept-Ranges=bytes, Server=Apache}
Date Mon Apr 13 08:51:00 EDT 2015
Content-Length 106037735
__service__ {}
Last-Modified Fri Apr 10 12:13:02 EDT 2015
__user__ {crossftp-original-file-date-iso8601=2015-04-08T12:49:01.000Z}
Modifiable Headers Modifiable Headers
crossftp-original-file-date-iso8601 2015-04-08T12:49:01.000Z
Content-Type video/x-m4v
________________________

---- AA ----
stream: (assocarr)...
url: http://guitar.objects.cdn.dream.io/VIDEOS/CCRyderB.m4v
streamformat: mp4
------------
0 Kudos
NewManLiving
Visitor

Re: Video is fast on Web, slow on Roku? Url metadata below

Try this. Just copy into a brs file and sideload it. With your CDN it took much longer than my amazon, but not exceeding 15 seconds on average. With My CDN it took most of the time 2 seconds. So with your CDN + DSL possibly may be the problem, although I did get 4 second times. Just change the URL to my CDN to compare.

Sub Main() 

hideL = -1
backL = 0
helloL = 1
videoL = 2
promptL = 3
messageL = 4

playerRect = { x: 50, y: 120, w: 630, h:452 }
punchRect = playerRect

back = { Color:"#FFFFFFFF", CompositionMode:"Source"}

hello ={
Text:"Press Ok To Start Movie, Back To Exit"
TextAttrs:{Color:"#FFCCCCCC", Font:"Medium",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:100 + 630 + 10,y: 120 + 30,w:500,h:60}
}

prompt ={
Text: "TIME TO LOAD: " + " 0 " + "SECONDS "
TextAttrs:{Color:"#FFCCCCCC", Font:"Medium",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:100 + 630 + 10,y: 120 + 30 + 60,w:500,h:60}
}

message ={
Text: "Video Player Is Stopped"
TextAttrs:{Color:"#FFCCCCCC", Font:"Medium",
HAlign:"HCenter", VAlign:"VCenter",
Direction:"LeftToRight"}
TargetRect:{x:0,y: 120 + 452 + 20,w:1280,h:60}
}


video = {
Color: "#00000000"
TargetRect: punchRect
CompositionMode: "Source" }

content = {

Stream: {
url: "http://guitar.objects.cdn.dream.io/VIDEOS/CCRyderB.m4v"
bitrate: 128
quality: True
contentId: "video"
}

StreamFormat: "mp4"
SwitchingStrategy: "full-adaptation"
}

timer = CreateObject( "roTimeSpan" )
canvas = CreateObject( "roImageCanvas" )
port = CreateObject( "roMessagePort" )
canvas.SetMessagePort(port)

VPlayer = CreateObject( "roVideoPlayer" )
VPlayer.SetMessagePort( port )
VPlayer.SetDestinationRect( playerRect )
VPlayer.AddContent( content )

canvas.SetLayer( backL , back )
canvas.SetLayer( videoL, video )
canvas.SetLayer( helloL, hello )
canvas.SetLayer( promptL, prompt )
canvas.SetLayer( messageL, message )
canvas.Show()


while(true)

msg = wait(0,port)

if type(msg) = "roImageCanvasEvent" then

if (msg.isRemoteKeyPressed()) then
i = msg.GetIndex()

if (i = 0) then
VPlayer.Stop()
canvas.close()
else if i = 6

VPlayer.Stop()

prompt.Text = "TIME TO LOAD: " + " 0 " + "SECONDS "
canvas.SetLayer( promptL, prompt )
canvas.Show()

sleep( 200 )
timer.Mark()
VPlayer.Play()
end if

else if (msg.isScreenClosed()) then
print "Closed"
return
end if

else if type(msg) = "roVideoPlayerEvent" then

message.Text = msg.GetIndex().ToStr() + " " + msg.GetMessage()
canvas.SetLayer( messageL, message )
canvas.Show()

if msg.GetMessage() = "start of play"
prompt.Text = "TIME TO LOAD: " + timer.TotalSeconds().ToStr() + " SECONDS"
canvas.SetLayer( promptL, prompt )
canvas.Show()
else
prompt.Text = "LOADING: " + timer.TotalSeconds().ToStr() + " SECONDS"
canvas.SetLayer( promptL, prompt )
canvas.Show()
end if

end if
end while

End Sub
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
kelvis2000
Visitor

Re: Video is fast on Web, slow on Roku? Url metadata below

"NewManLiving" wrote:
Try this. Just copy into a brs file and sideload it. With your CDN it took much longer than my amazon, but not exceeding 15 seconds on average. With My CDN it took most of the time 2 seconds. So with your CDN + DSL possibly may be the problem, although I did get 4 second times. Just change the URL to my CDN to compare.


Wow, Thanks million! I used Eclipse to set this up with the Brightscript Plug-in or Download,
When you say paste this would it be going into showFeed.brs ?
Also would this be replacing code or supplemental?
Thanks for your help.
Kevin

Not sure what sideload means?
0 Kudos
NewManLiving
Visitor

Re: Video is fast on Web, slow on Roku? Url metadata below

If your using eclipse just copy it right into your main brs file which has the sub main in it and rename your sub main to something else like main2 and then export as usual. My main will load instead of yours when you are done just change your main2 back to main and delete mine or change mine to main2.
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
Komag
Roku Guru

Re: Video is fast on Web, slow on Roku? Url metadata below

sideload is just the term for loading your channel onto your Roku as a developer, for testing, it's what you're already doing
0 Kudos
kelvis2000
Visitor

Re: Video is fast on Web, slow on Roku? Url metadata below

Thanks a million for the help, I am looking at the appMain.brs
which is below, do you mean I should paste entirely over the code
which is below and located in the appMain.brs
Sorry to ask these redundant questions but the possibility of me turning this into a total disaster
is very possible.
Thanks this is huge help!
Kevin


'******************************************************
'** RokuChannelMaker Template
'** 2014
'** Copyright (c) 2014 RokuChannelMaker.com All Rights Reserved.
'******************************************************

Sub Main()

'initialize theme attributes like titles, logos and overhang color
initTheme()

'prepare the screen for display and get ready to begin
screen=preShowHomeScreen("", "")
if screen=invalid then
print "unexpected error in preShowHomeScreen"
return
end if

'set to go, time to get started
showHomeScreen(screen)

End Sub


'*************************************************************
'** Set the configurable theme attributes for the application
'**
'** Configure the custom overhang and Logo attributes
'** Theme attributes affect the branding of the application
'** and are artwork, colors and offsets specific to the app
'*************************************************************

Sub initTheme()

app = CreateObject("roAppManager")
theme = CreateObject("roAssociativeArray")

theme.OverhangOffsetSD_X = "72"
theme.OverhangOffsetSD_Y = "48"
theme.OverhangSliceSD = "pkg:/images/Overhang_Background_SD.png"
theme.OverhangLogoSD = "pkg:/images/Overhang_Logo_SD.png"
theme.BackgroundColor = "#ffffff"
theme.OverhangOffsetHD_X = "128"
theme.OverhangOffsetHD_Y = "70"
theme.OverhangSliceHD = "pkg:/images/Overhang_Background_HD.png"
theme.OverhangLogoHD = "pkg:/images/Overhang_Logo_HD.png"

app.SetTheme(theme)

End Sub
0 Kudos
kelvis2000
Visitor

Re: Video is fast on Web, slow on Roku? Url metadata below

"Komag" wrote:
sideload is just the term for loading your channel onto your Roku as a developer, for testing, it's what you're already doing


Thanks Komag, nice picture!
0 Kudos
NewManLiving
Visitor

Re: Video is fast on Web, slow on Roku? Url metadata below

Just paste my main right above yours then scroll down to your main and add a 2 or something so that it is no longer main. There is only one entry point. So it will load my main which does not call anything but what's in my main. When you are done testing just delete my main and change yours back to main. Just suggesting a simple way to test. You could create a new project and create a file and copy my code into it. But the former way is faster. It will look like this:




' Put My main on top - include all my code of course
Sub Main()
End Sub


' Your main changed to some other name . When finished just delete my main above and change the name back to main
Sub Main2()

'initialize theme attributes like titles, logos and overhang color
initTheme()

End Sub
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos