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

How to cache several video clips locally

Hi,
I am trying to develop an app for Video clip seemless playing (e.g Ad or VOD purpose ) and i would like to achieve the following functionality.
1. Is it possible to launch this app by default when Roku boots up? if so how without any user interaction?
2. When the app is launched, it connects to a server and get list of video clips url and it downloads to a cache directory (assuming Roku 3 is used), can i download to Micro SD card and read it? if so how?
3. Lets say in #2 above, it download 10 (or few or more) clips during bootup, but while playing any clips, is ROKU capable of go to the server and download new list of video clips to cache directory? I guess, what i am try to ask is it doable and is Roku is multi threaded ? I don't want the Roku to wait (display blank screen etc) while downloading new or next clip to be played
4. If internet connection is not available, roku keep playing from cache directory (in the event of rebooting i don't want to loose any previously downloaded content) until internet connection is up (how can i detect internet connection is up or down before trying to reach the server? Also i need to consider the case Internet is up but the server is down case too)
5. Assuming Roku can periodically connects to my server, Is it possible for me to force reboot the app or Roku device remotely? if so how?

If someone could shed some code would be very helpful.

Thanks a million in advance for your time.
Nithyaak
0 Kudos
11 REPLIES 11
RokuMarkn
Visitor

Re: How to cache several video clips locally

1. No
2. No, a channel can't read or write the SD card. It's only for system use.
3. Yes, you can perform asynchronous HTTP operations. See ifUrlTransfer in the docs.
4. Moot since the answer to #2 was no.
5. If your channel is communicating with the server, it can choose to exit the channel, but it can't reboot the whole unit.

--Mark
0 Kudos
nithyaak
Visitor

Re: How to cache several video clips locally

Thanks Martin.
I am conused with ROKU 3 spec:

"
Storage Expansion

microSD card slot for additional game and channel storage
"

What is the internal memory limit where i can store files inside roku3?
Thanks
0 Kudos
RokuMarkn
Visitor

Re: How to cache several video clips locally

The SD card is only used by the system to store channel packages and related information.
The File System page in the docs describes the various storage options available.

--Mark
0 Kudos
TheEndless
Channel Surfer

Re: How to cache several video clips locally

How large are the clips you're talking about caching locally? The available memory on the Roku, even the Roku 3, isn't big enough to download and cache much, unless your videos are really small.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
nithyaak
Visitor

Re: How to cache several video clips locally

my clips will be around 1 GB (several clips )
0 Kudos
TheEndless
Channel Surfer

Re: How to cache several video clips locally

"nithyaak" wrote:
my clips will be around 1 GB (several clips )

Then you won't be caching them locally. I believe even the highest end Roku only has 512 MB total, so you'll need continuous network access the duration of playback.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
nithyaak
Visitor

Re: How to cache several video clips locally

Thanks Endless. I still don't understand why roku won't allow either USB or MicroSD to store content for Channel development. I wish they allow it
0 Kudos
EnTerr
Roku Guru

Re: How to cache several video clips locally

"nithyaak" wrote:
Thanks Endless. I still don't understand why roku won't allow either USB or MicroSD to store content for Channel development. I wish they allow it

They could but there are twists and turns. For example uSD card is encrypted filesystem. And on USB probably would be limited to FAT32 for r/w.

Main reasoning was probably that they'd like the player to be more of a stateless machine that gets what's needed from the network turns clear slate-ish on restart. (Yes, i know about registry but that's intentionally limited)

Anybody know what's Amazon FireTV stance on that?
0 Kudos
destruk
Binge Watcher

Re: How to cache several video clips locally

They want to sell their BrightSign product, so a stand-alone use like this wouldn't be in their best interest in that regard.
You would be able to copy your files to USB, and send it to your customers to set up onsite playing from usb with a custom playlist - with buffering between each video clip.
The largest file I've been able to store on a roku is about 200MB in the tmp directory - with most all other channels removed. Even from tmp you'd still have buffering delays between clips.
The roku isn't really suited for this purpose - lots of other set boxes do this kind of thing much much easier/better.
0 Kudos