Nginx + proxy_store + flv/mp4
mdounin at mdounin.ru
Mon Oct 5 20:38:42 MSD 2009
On Mon, Oct 05, 2009 at 12:04:41PM -0400, benjinx wrote:
> I'm trying to set up sort of an origin/edge config for nginx to stream
> mp4s and flvs.
> I'm using proxy_store to cache flvs/mp4s from the origin on the
> frontends. I also want to enable seeking in those files using the
> flv and mp4 (mp4 is a module from h264.code-shop.com) directives.
> The problem I have is that I can't get the seeking to work if the file hasn't
> previously been cached on the frontend and I don't want to enable flv/mp4
> modules on the backend since that would mean the cache on the frontend
> is polluted with lots of "seeked" files. I only want the whole files cached.
> Is it possible to somehow make nginx do this:
> 1. If file not in proxy store, get from backend wait until completely downloaded else go to 2
> 2. Start streaming from local cache
> What I mean is - is it possible to get nginx to ALWAYS read from local store (proxy_store) and
> not just pass along the data received from backend?
> I want seeking to always work and I only want one file cached locally.
> Thanks for an AWESOME webbserver!
You may try to use
instead of flv on frontend. It works as filter, and should be
able to handle flv seeking while still downloading full file from
backend to use in cache/proxy_store.
More information about the nginx