Hi Everyone,
I am playing some movies from server. Some movies are playing well and some of them not. I can't able to find the solution.
This is the sample movie url that is not playing.
I am using roVideoScreen and the code as follows.
Function PlayVideo() as Dynamic
print "Displaying video: "
p = CreateObject("roMessagePort")
video = CreateObject("roVideoScreen")
video.setMessagePort(p)
videoclip = CreateObject("roAssociativeArray")
videoclip.StreamFormat = "mp4"
di = CreateObject("roDeviceInfo")
if di.GetDisplayType() = "HDTV" then
videoclip.streamqualities=["HD"]
else
videoclip.streamqualities=["SD"]
end if
videoclip.StreamBitrates = [0]
video_url = "my url"
print "URL " ; video_url
videoclip.StreamUrls = [video_url]
videoclip.Title = "Kubera Rasi"
video.SetContent(videoclip)
video.show()
while true
msg = wait(1,p)
if type(msg) = "roVideoScreenEvent"
print "seconds" ; timer.TotalSeconds()
if msg.isScreenClosed() then 'ScreenClosed event
print "Closing video screen"
return -1
exit while
else if msg.GetMessage() = "Stream started."
print "stream started"
else if msg.isRequestFailed()
print "play failed: "; msg.GetMessage()
else
print "Unknown event: "; msg.GetType(); " msg: "; msg.GetMessage()
endif
end if
end while
end function
This movie stream format mp4, Video/Audio - H.264/AAC. Everything was roku supported formats. The movie is not even started streaming and it hangs the roku and restarts it.
So, Please anyone help me on these issue to play the movies.
Thank you in advance.
- Dinesh
I am using Roku 4 - 4400X Model.