h.264 streaming support?

mike mike503 at gmail.com
Tue Jun 17 03:37:20 MSD 2008


Problem is we need to use PHP to authenticate the user is allowed to
see the flv file... Igor says it can be used with X-Accel-Redirect.

So if the path was

/video/view/play.php?file=12345

I could do:

location /video/view/ {
   flv;
}

and that would work? Thanks a ton.

I guess it might also be possible to look at outputting the magic FLV
byte string instead of piggybacking it on nginx ... hmm

On 6/16/08, Maxim Dounin <mdounin at mdounin.ru> wrote:
> Hello!
>
> On Mon, Jun 16, 2008 at 01:07:20PM -0700, mike wrote:
>
> > So pseudo code for a file named "/videoplay.php":
> >
> > header("Content-type etc...")
> >
> > if(isset($_GET['start'])) {
> >  $start = intval($_GET['start']);
> >  header("X-Accel-Redirect:
> /path/to/file.flv?start=$start");
> > } else {
> >  header("X-Accel-Redirect: /path/to/file.flv");
> > }
> >
> > and in nginx.conf, I could have:
> >
> > location /videoplay.php {
> >
>
> -location /videoplay.php {
> +location /path/to/ {
>
> > flv;
> > }
> >
> > would this work together?
> >
>
> You should use flv on actual files, not on your php script.
>
> Maxim Dounin





More information about the nginx mailing list