Welcome! Log In Create A New Profile

Advanced

Re: Nginx + proxy_store + flv/mp4

Maxim Dounin
October 05, 2009 12:44PM
Hello!

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

http://mdounin.ru/hg/ngx_http_bytes_filter_module/

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.

Maxim Dounin
Subject Author Posted

Nginx + proxy_store + flv/mp4

benjinx October 05, 2009 12:04PM

Re: Nginx + proxy_store + flv/mp4

Maxim Dounin October 05, 2009 12:44PM

Re: Nginx + proxy_store + flv/mp4

benjinx October 05, 2009 01:19PM

Re: Nginx + proxy_store + flv/mp4

Maxim Dounin October 05, 2009 02:42PM

Re: Nginx + proxy_store + flv/mp4

benjinx October 05, 2009 02:56PM

Re: Nginx + proxy_store + flv/mp4

Maxim Dounin October 05, 2009 06:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 118
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready