Video not playing roku

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 can’t even load that video url through my computer using VLC or a web browser. Is it public?

Hi adamkaz,

Yes. It is public. In normal browsers I can able to play it.

Thank you,
Dinesh

Still not loading for me.

innsys.ca does not appear to exist.

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.

–Mark

Hi Everyone,

Please check this same kind of url. This movie is playing in roku.

This also same kind of Video/Audio codec formats. This url plays well in roku and in browsers.

Check the screenshot. This two movies are in server.

So, please give your suggestions.

Thank you,
Dinesh

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.

C. Shawn Smith

“pdineshkumar55” wrote:
Hi Everyone,

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.

Hi Shawn Smith,

While load the url in the browser, this url leads to another url. Like this. The server guys said, the movies are progressive.

Is this the problem? This may be the reason for content-type “text/html”?

I don’t know whether it uploaded as binary format or something.

Please give your suggestions.

Thank you,
Dinesh

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?

C. Shawn Smith