Forum Discussion

StangTexan's avatar
StangTexan
Visitor
9 years ago

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

Hi all,

I can't seem to play HD videos hosted in googleusercontent.com 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 https://lh3.googleusercontent.com/yuayWNP1vqF2W0Dxv5I0ANGm7GsObP1oM3czjKTkbaJjL8EQ8tQ75YDGGYdMUwQhpTv52K8mFFE=m18
720 HD video that doesn't play in Roku: https://lh3.googleusercontent.com/yuayWNP1vqF2W0Dxv5I0ANGm7GsObP1oM3czjKTkbaJjL8EQ8tQ75YDGGYdMUwQhpTv52K8mFFE=m37

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 = "http://video.ted.com/talks/podcast/DanGilbert_2004_480.mp4" 'Default
  'ContentNode.url = "https://lh3.googleusercontent.com/yuayWNP1vqF2W0Dxv5I0ANGm7GsObP1oM3czjKTkbaJjL8EQ8tQ75YDGGYdMUwQhpTv52K8mFFE=m18" 'Plays
  ContentNode.url = "https://lh3.googleusercontent.com/yuayWNP1vqF2W0Dxv5I0ANGm7GsObP1oM3czjKTkbaJjL8EQ8tQ75YDGGYdMUwQhpTv52K8mFFE=m22"  'Does not play'
  'ContentNode.url = "https://lh3.googleusercontent.com/yuayWNP1vqF2W0Dxv5I0ANGm7GsObP1oM3czjKTkbaJjL8EQ8tQ75YDGGYdMUwQhpTv52K8mFFE=m37" ''Does not play

3 Replies

  • 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 = m.top.findNode("Video")
      'm.Video.SetConnectionTimeout(100)
      'httpAgent = CreateObject("roHttpAgent")
      'httpAgent.SetCertificatesFile("common:/certs/ca-bundle.crt")
      'httpAgent.InitClientCertificates()
      'm.Video.setHttpAgent(httpAgent)
      'm.Video.SetCertificatesFile("common:/certs/ca-bundle.crt")
      'm.Video.InitClientCertificates() 
  • 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 googleUserContent.com 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?
  • 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 = ["https://lh3.googleusercontent.com/yuayWNP1vqF2W0Dxv5I0ANGm7GsObP1oM3czjKTkbaJjL8EQ8tQ75YDGGYdMUwQhpTv52K8mFFE=m22"]
    ...
    video.SetContent(videoclip)
    video.Show()


    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