Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nchase
Level 7

How to set up files to stream from Amazon S3?

OK, I feel silly asking this, but how does one set up video files to stream properly from an S3 bucket? I have the bucket set up and I can easily call HTML and images from the browser (as a test), but a request for video does nothing. I've set it as a website, and I've set permissions so that everyone has view access. Is there some magical incantation I need to do to make video work?

Thanks!

---- Nick
0 Kudos
2 REPLIES 2\
destruk
Level 10

Re: How to set up files to stream from Amazon S3?

What happens when you try to access the video from a browser?
ie

http://bucketname.s3.amazonaws.com/video.mp4

Usually when it won't download it'll say key doesn't exist or some other message in the browser.
If your filename has spaces you'll need to encode them or double encode them with either a replacement of %2520 or %20 in the url in your xml. On a linux server I had to use %2520, on a windows server I had to use %20 - your results may vary so try a few for your situation to find what works.

Specific filenames are not supported on S3, such as a filename beginning with a hashtag/pound sign like #video.mp4, cryllic characters, spanish/german characters, ampersands (without proper encoding), etc etc.
If your encoded URL for an object on S3 is longer than 1024 characters, the file will not be able to be retrieved.

To comply with Amazon S3 requirements, bucket names:
Can contain lowercase letters, numbers, periods (.), underscores (_), and dashes (-)
Must start with a number or letter
Must be between 3 and 255 characters long
Must not be formatted as an IP address (e.g., 192.168.5.4)

To conform with DNS requirements, we recommend following these additional guidelines when creating buckets:
Bucket names should not contain underscores (_)
Bucket names should be between 3 and 63 characters long
Bucket names should not end with a dash
Bucket names cannot contain two, adjacent periods
Bucket names cannot contain dashes next to periods (e.g., "my-.bucket.com" and "my.-bucket" are invalid)
There is a maximum of 100 buckets


If you can download the file in your browser, then you'll need to examine/re-examine your roku coding to diagnose why it isn't playing.
0 Kudos
nchase
Level 7

Re: How to set up files to stream from Amazon S3?

Thanks for the nudge in the right direction. Weirdly, nothing at all happens when I try to download the file with my browser. No download, no video, nothing.

HOWEVER, I took the same URL and plugged it into VLC and it worked, so I plugged it into my channel and all was well, which is all that matters, I guess!

Thanks again!

---- Nick
0 Kudos