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: 
lotusweb
Visitor

How can I load video file from outside of the public_html?

I have video files stored outside the public_html folder for security purposes.
How can I load video file from outside of the public_html folder?

I'm using XML it code like this. but this code is not work on my ROKU.

***********************************
<item sdImg="/home/~fuji/fci.png" hdImg="/home/~fuji/fci.png">
<title>Iron Chef</title>
<contentId>10001</contentId>
<contentType>Talk</contentType>
<contentQuality>SD</contentQuality>
<media>
<streamFormat>mp4</streamFormat>
<streamQuality>SD</streamQuality>
<streamBitrate>1500</streamBitrate>
<streamUrl>/home/~fuji/DieHard.mp4</streamUrl>
</media>
<synopsis>video description</synopsis>
<genres>Clip</genres>
<runtime>1260</runtime>
</item>
***********************************
0 Kudos
4 REPLIES 4
RokuJoel
Binge Watcher

Re: How can I load video file from outside of the public_htm

Figure out what the url is if you were to load in a web browser, for example it is likely that the correct url is something like:

http://www.myserver.com/~fuji/fci.png
http://www.myserver.com/~fuji/DieHard.mp4

if you have content in other folders just reference the folders below the current folder for example

http://www.myserver.com/~fuji/myimages/fci.png

The paths you have in your XML appear to be paths to the data on your server from the file system, not from the web.

- Joel
0 Kudos
lotusweb
Visitor

Re: How can I load video file from outside of the public_htm

can I load video without using domain name?

for e.g. using this URL. fci.png is under public_html folder.
http://www.myserver.com/~fuji/fci.png

~fuji is account name it is not visible for user.

I want to put fci.png above public_html folder.

I was try to use ../../ to find files above public_html folder. but it is not work using XML.

It is possible to do it or impossible to do it?
0 Kudos
RokuMarkn
Visitor

Re: How can I load video file from outside of the public_htm

Perhaps you should explain what you're trying to do with these files. In Apache, only files in the public_html folder are visible via HTTP. Roku uses HTTP for streaming, so it can only see the same files that a browser would see.

--Mark
0 Kudos
RokuJoel
Binge Watcher

Re: How can I load video file from outside of the public_htm

whatever is in your public_html folder will show up at http://myserver.com/filename.ext

I don't think a relative address like ../../filename will work from the device. If you have a php or other script running on your server, you might be able to reference things on the server like that, but not externally. A web page can generate an explicit reference from an relative url, but only because it knows the context.

Your xml needs an explicit path, unless you prepend a path to it when you are processing the xml on the device, but you still wind up with an explicit path.

The only way around using your domain name is if your server has a fixed ip address and then you can use that instead.

- Joel
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.