字体:  

Flash Video (FLV) Streaming With Nginx

ELM 发表于: 2007-11-05 23:46 来源: 榆树社区

I was looking forward for this feature for last 3 months! And at last, it is there! Now, nginx works on our streaming servers perfectly and flv streaming will not be Lighttpd’s unique feature anymore. This post is about how to use new Nginx module http_flv_moduleintroduced in 0.4.7 (but there was a bug in its implementation, thatcan be fixed with my patch) and made completely perfect in 0.4.8.


First of all, to use new module, you should (re)complile nginx with –with-http_flv_module option:

CODE:

# ./configure --with-http_flv_module ...SOME-OTHER-OPTS...Next your action should be activation of flv streaming module for your flv files in nginx.conf:

CODE:

...

http {

    ...

    server {

        ...

        location ~ \.flv$ {

            flv;

        }

        ...

    }

    ...

}


This option will instruct nginx to add special “header” informationto data stream if user asked for some flv file and passed parameter“?start=XXX”, which means “give me that flv file from byte XXX to theend of file” (this is the idea of flv streaming).
Last your action, if it was not done before, should be conversion ofyour video files to FLV format and adding meta info to your created flvfiles. You can read how to do it in my previous post.
As always, I want to ask you, if you like this post, support it on Digg.com

From: http://blog.kovyrin.net/2006/10/ ... lv-streaming-nginx/