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.
Hm, well I can access the URL but it seems to be an empty file. It also has a HTTP header that says “Content-Type: text/html” which doesn’t make sense for an MP4 file.
Are you uploading the file in binary format? Whenever I click on the link, it stalls out. When I save it to my local hard-drive, it errors out as not a valid format (which leads me to believe there’s an error during the upload process).
if it’s not uploaded via Binary, that could explain what Mark is seeing regarding the text/HTML content type.
Please check this same kind of url. This movie is playing in roku.
http://xxx:8080/yyy/zzz.mp4
The url doesn’t return anything at all in my browser, in VLC, or using curl. When I go to http://xxx:8080/, it asks for a username, password and captcha.
For me, it leads to a blank page in Chrome (I haven’t tried with any other browser though).
If I right-click and save as in Chrome, it downloads the file, but returns an error when trying to load into Windows Media Player or any other MP4 player. When I look at the headers for the file, it says what Mark noted (html/text format).
In your FTP program, you have an option to upload a file in Binary or ASCII format, or Auto (by default). Most FTP programs handle Auto without an issue, but some don’t. What programs are you using?