Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3055936
  • 博文数量: 535
  • 博客积分: 15788
  • 博客等级: 上将
  • 技术积分: 6507
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-07 09:11
文章分类

全部博文(535)

文章存档

2016年(1)

2015年(1)

2014年(10)

2013年(26)

2012年(43)

2011年(86)

2010年(76)

2009年(136)

2008年(97)

2007年(59)

分类: 系统运维

2010-11-24 15:00:54

转自:

I was looking forward for this feature for last 3 months! And at last, it is ! Now, 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_module introduced in 0.4.7 (but there was a bug in its implementation, that can 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_moduleoption:

# ./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:

1
2
3
4
5
6
7
8
9
10
11
12
...
http {
    ...
    server {
        ...
        location ~ \.flv$ {
            flv;
        }
        ...
    }
    ...
}

This option will instruct nginx to add special “header” information to 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 the end of file” (this is the idea of flv streaming).

Last your action, if it was not done before, should be conversion of your video files to FLV format and adding meta info to your created flv files. You can read how to do it in my previous post.

As always, I want to ask you, if you like this post, 

阅读(1999) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~