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

roVideoScreen URL invalid

I've modified mySimpleVideo to stream an mp4 video from a Win 7 PC on my local network, but I am getting the following error in the debug console:

------ Running ------
Type args = roAssociativeArray
Type args.url = Invalid

When I attempt to play the video I get:

showSpringboardScreen
Button pressed: 1 0
Displaying video:
srt =
Unknown event: 11 msg: Unspecified or invalid track path/url.
play failed:
Closing video screen



I have enabled streaming to my Roku on my the Win 7 PC (server) control panel. The Roku media player can play the file, so I suspect I am not specifying the URL or setting the roVideoScreen parameters correctly. I spent a few hours monkeying with the URL without any success, so I am hoping someone can help.

When viewed from another Win PC on the network, the file path on the Win 7 server is:

\\MIKE-HP-I7\Users\standard\Videos\test

The Roku media player lists the device as "MIKE-HP-I7:standard" with a Windows Media Player icon to the right. I can navigate to the video folder as Videos->test and play it. However, I cannot load it using the roVideoScreen() call.

Here is the code snippet with various tests commented out:

'urls = ["http://MIKE-HP-I7/Users/standard/Videos/test/SDV_1024.mp4"]
' urls = ["http://192.168.1.20/Users/standard/My Videos/test/SDV_1024.mp4"]
' urls = ["http://MIKE-HP-I7/Users/standard/My%20Videos/test/SDV_1024.mp4"]
'urls = ["http://MIKE-HP-I7:standard/Users/standard/Videos/test/SDV_1024.mp4"]
urls = ["http://MIKE-HP-I7:standard/Videos/test/SDV_1024.mp4"]
urls = ["http://MIKE-HP-I7:standard/My Videos/test/SDV_1024.mp4"]

p = CreateObject("roMessagePort")
video = CreateObject("roVideoScreen")
video.setMessagePort(p)

'bitrates = [0] ' 0 = no dots, adaptive bitrate
'bitrates = [348] ' <500 Kbps = 1 dot
'bitrates = [664] ' <800 Kbps = 2 dots
'bitrates = [996] ' <1.1Mbps = 3 dots
'bitrates = [2048] ' >=1.1Mbps = 4 dots
bitrates = [0]
qualities = ["SD"]
StreamFormat = "mp4"
title = "Bryce Golf"
srt = ""

videoclip = CreateObject("roAssociativeArray")
videoclip.StreamBitrates = bitrates
videoclip.StreamUrls = urls
videoclip.StreamQualities = qualities
videoclip.StreamFormat = StreamFormat
videoclip.Title = title
print "srt = ";srt
if srt <> invalid and srt <> "" then
videoclip.SubtitleUrl = srt
end if

video.SetContent(videoclip)
video.show()
0 Kudos
14 REPLIES 14
RokuChris
Roku Employee
Roku Employee

Re: roVideoScreen URL invalid

"mikempet" wrote:
I've modified mySimpleVideo to stream an mp4 video from a Win 7 PC on my local network, but I am getting the following error in the debug console:

------ Running ------
Type args = roAssociativeArray
Type args.url = Invalid


These lines are not an error. If you look at the BrightScript for the sample channel, all it's doing is printing out the values of some ECP parameters. So it's really just telling you that you are not passing a URL into the channel via ECP. That's fine because you're pasting your URL into the BrightScript.

To get more information about the playback failure, try listening for the isRequestFailed event. You could also setup a roSystemLog to get information about the requests being made by the player.

"mikempet" wrote:
The Roku media player lists the device as "MIKE-HP-I7:standard" with a Windows Media Player icon to the right. I can navigate to the video folder as Videos->test and play it. However, I cannot load it using the roVideoScreen() call.

Here is the code snippet with various tests commented out:

'urls = ["http://MIKE-HP-I7/Users/standard/Videos/test/SDV_1024.mp4"]
' urls = ["http://192.168.1.20/Users/standard/My Videos/test/SDV_1024.mp4"]
' urls = ["http://MIKE-HP-I7/Users/standard/My%20Videos/test/SDV_1024.mp4"]
'urls = ["http://MIKE-HP-I7:standard/Users/standard/Videos/test/SDV_1024.mp4"]
urls = ["http://MIKE-HP-I7:standard/Videos/test/SDV_1024.mp4"]
urls = ["http://MIKE-HP-I7:standard/My Videos/test/SDV_1024.mp4"]


Sounds like Roku media Player is finding the URL through a DLNA server. I don't know much about WMP or how it constructs its URLs.
0 Kudos
mikempet
Visitor

Re: roVideoScreen URL invalid

Thanks for the reply. I'll try your suggestions on getting information about the playback failure.

The sample player comment says, "Swap the commented values below to play different video clips...", so I replaced the original URL 'urls = ["http://video.ted.com/talks/podcast/DanGilbert_2004_480.mp4"] with the ones previously listed pointing to my local video.

Given the "URL=invalid" and "Unspecified or invalid track path/url" messages when substituting my video URLs, I assumed I was specifying an incorrect path or there is some nuance when connecting to Windows Media Player.

When I press play:

Displaying video:
srt =
Unknown event: 11 msg: Unspecified or invalid track path/url.
play failed:
Closing video screen

I'll look at adding the error query and logging feature and report back. I am reviewing Roku ECP section to get up to speed on that subject. Cheers
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: roVideoScreen URL invalid

Displaying video:
srt =
Unknown event: 11 msg: Unspecified or invalid track path/url.
play failed:
Closing video screen


That's right. This part of your output is telling you it can't find playable content at the URL you gave it.
0 Kudos
mikempet
Visitor

Re: roVideoScreen URL invalid

Do you beleive my (local network) URL paths are incorrect? If so, what needs to change?

You mentioned you don't have experience with Windows Media Player (WMP). Perhaps there's someone out there that has done this before and can contribute to this thread.
0 Kudos
RokuMarkn
Visitor

Re: roVideoScreen URL invalid

You can easily verify whether you have a valid URL by pasting it into a browser address bar. If your computer can use the URL, the Roku should be able to use it.

--Mark
0 Kudos
mikempet
Visitor

Re: roVideoScreen URL invalid

Yes, I placed a web page in the same folder as the mp4 and can load it with a web brower from my development laptop on the network.

\\mike-hp-i7\Users\standard\Videos\test\index.html

I cannot use the http locator in the browser, probably since it's considered a file from the network viewpoint.

In the sampleVideo code I tried the following URL (and several variations) without success.

urls = ["http://mike-hp-i7/Users/standard/Videos/test/SDV_1024.mp4"]

It would be nice to know what the Roku Media Player uses for the URL, since it loads it okay. Is it possibly loading it as a file resource instead?

In the meantime, I will continue to search for clues. Thanks for your assistance.
0 Kudos
RokuMarkn
Visitor

Re: roVideoScreen URL invalid

You need to find a URL that starts with http: or https: that works in your browser. That's the only kind of URL that will work with the Roku.

--Mark
0 Kudos
EnTerr
Roku Guru

Re: roVideoScreen URL invalid

"mikempet" wrote:
Yes, I placed a web page in the same folder as the mp4 and can load it with a web brower from my development laptop on the network.
\\mike-hp-i7\Users\standard\Videos\test\index.html
I cannot use the http locator in the browser, probably since it's considered a file from the network viewpoint.
...
It would be nice to know what the Roku Media Player uses for the URL, since it loads it okay. Is it possibly loading it as a file resource instead?

The \\server\path format you see shows this was done over CIFS/SMB (microsoft file sharing or "samba"). It is not http-related and while you can write URL for that (smb://mike-hp-i7/Users/standard/Videos/test/index.html), i don't believe Roku supports smb.

The fact that DLNA channel was able to see and play the content hints it is accessible over http(s) but we don't know the exact port/url.
0 Kudos
mikempet
Visitor

Re: roVideoScreen URL invalid

Yes, that makes sense.

'The fact that DLNA channel was able to see and play the content hints it is accessible over http(s) but we don't know the exact port/url.'

I was not aware that Roku supports DLNA, but I'm new to this area. Most of the forums say it does not, but there are hints Roku was planning to in the future. I'll look more into WMP streaming details for clues. Thanks
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.