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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Video Player components don't play HD videos from googleusercontent URLs

Hi all,

I can't seem to play HD videos hosted in using the Video Player components like roVideoPlayer & roVideoScreen. I'm using the sample code from simple-videoplayer-channel and the SD video plays but not the HD video! What am I doing wrong?! Any pointers will be very helpful. Thank you in advance.

simple-videoplayer-channel code is here
720 HD video that doesn't play in Roku:

All of the above videos play in a web browser. I'm wondering how the Roku video player component is able to handle the redirect in the SD video but not in the HD video!

Here's the modified sample code in SimpleVideoScene.brs:

  ContentNode = CreateObject("roSGNode", "ContentNode")
  ContentNode.streamFormat = "mp4"
  'ContentNode.url = "" 'Default
  'ContentNode.url = "" 'Plays
  ContentNode.url = ""  'Does not play'
  'ContentNode.url = "" ''Does not play
0 Kudos

Re: Video Player components don't play HD videos from googleusercontent URLs

Also, I have tried using ca-certs and extended timeouts but they didn't help either. Here are the changes in init method in SimpleVideoScene.brs but commented out...

  m.Video ="Video")
  'httpAgent = CreateObject("roHttpAgent")
0 Kudos
Roku Guru

Re: Video Player components don't play HD videos from googleusercontent URLs

Hmm, since one of these videos plays but the other two do not, i think we can rule out SSL as culprit, since all URLs are HTTPS and look-alike. They played for me, so is not cookie/authorization thing either. They seem to all use the same video (h264) and audio codecs.

The difference i see is in the resolutions - 640x360 (works), 1280x720 and 1920x1080. So my next guess is perhaps does not provide enough bandwidth? Can you get any diagnostics from the player object/events?

Also, have you tried the same video files on another server, as a way to decide if it's the file format or the hosting?
0 Kudos

Re: Video Player components don't play HD videos from googleusercontent URLs

Thank you! 

I printed the video format after loading and got the value: none for HD. For SD video I got the value: mpeg4_15. When I load the videos in the web browser they all return the same content-type in the header: video/mp4.

I haven't tried hosting the video elsewhere, which I will try later. All of them are the same exact video saved by Google in different resolutions after I uploaded them. 

Have you come across this issue before? Are you able to play the HD videos in Roku? Here's my testing output:

function onKeyEvent(key as String, press as Boolean) as Boolean
  print "in SimpleVideoScene.xml onKeyEvent ";key;" "; press
  print "Video Format: ";m.Video.videoFormat 
  return false
end function

HD Output:
in SimpleVideoScene.xml onKeyEvent back true
Video Format: none

SD Output:
in SimpleVideoScene.xml onKeyEvent OK false
Video Format: mpeg4_15

Here's the non-Scene Graph roVideoScreen testing output:

video = CreateObject("roVideoScreen")
videoclip = CreateObject("roAssociativeArray")
videoclip.StreamUrls = [""]

Unknown event:  11 msg: startup progress
Unknown event:  20 msg: Stream started.
Unknown event:  33 msg: Format Detected
Unknown event:  11 msg: Content contains no playable tracks.
Play failed: malformed data
Unknown event:  16 msg: Playback completed.
Unknown event:  11 msg: end of playlist
Unknown event:  11 msg: startup progress
0 Kudos