50 messages in ru.sysoev.nginxRe: about h.264 streaming cache support
FromSent OnAttachments
Sean AllenMay 9, 2008 10:30 am 
Igor SysoevMay 9, 2008 10:40 am 
Sean AllenMay 9, 2008 2:11 pm 
Jonathan VanascoMay 9, 2008 6:32 pm 
RapseyMay 10, 2008 12:32 am 
Sean AllenMay 12, 2008 11:00 pm 
mikeJun 13, 2008 6:03 pm 
RapseyJun 13, 2008 10:14 pm 
Igor SysoevJun 13, 2008 10:24 pm 
mikeJun 13, 2008 10:30 pm 
mikeJun 13, 2008 10:40 pm 
Igor SysoevJun 13, 2008 10:46 pm 
Igor SysoevJun 13, 2008 10:50 pm 
mikeJun 16, 2008 1:06 pm 
Maxim DouninJun 16, 2008 3:59 pm 
mikeJun 16, 2008 4:36 pm 
Igor SysoevJun 17, 2008 1:19 am 
mikeJun 17, 2008 11:56 am 
Igor SysoevJun 17, 2008 1:32 pm 
ThomasOct 7, 2008 3:15 pm 
Kon WilmsOct 7, 2008 3:20 pm 
Kon WilmsOct 7, 2008 4:03 pm 
伍鹏Oct 7, 2008 5:19 pm 
伍鹏Oct 7, 2008 5:54 pm 
伍鹏Oct 7, 2008 7:56 pm 
伍鹏Oct 7, 2008 10:08 pm 
ThomasOct 8, 2008 2:50 am 
伍鹏Oct 8, 2008 3:15 am 
Kon WilmsOct 8, 2008 9:00 am 
ThomasOct 8, 2008 11:54 am 
伍鹏Oct 8, 2008 5:29 pm 
焦胜强Oct 8, 2008 6:09 pm 
ThomasOct 9, 2008 3:18 am 
伍鹏Oct 9, 2008 4:12 am 
ThomasOct 9, 2008 10:42 am 
伍鹏Oct 9, 2008 7:38 pm 
mikeOct 9, 2008 7:50 pm 
伍鹏Oct 9, 2008 8:08 pm 
伍鹏Oct 10, 2008 6:33 pm 
伍鹏Oct 11, 2008 8:19 pm 
RapseyOct 14, 2008 7:33 am 
ThomasOct 14, 2008 9:03 am 
RapseyOct 14, 2008 9:24 am 
ThomasOct 14, 2008 9:33 am 
RapseyOct 14, 2008 11:25 am 
yong xueOct 15, 2008 5:58 am 
mikeOct 15, 2008 8:21 am 
伍鹏Oct 15, 2008 4:40 pm 
ThomasNov 10, 2008 6:47 am 
伍鹏Nov 27, 2008 12:00 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: about h.264 streaming cache supportActions...
From:伍鹏 (wup@openv.cn)
Date:Oct 7, 2008 10:08:10 pm
List:ru.sysoev.nginx

Dear all,

nginx.conf example

---------------------------------- location ~ \.mp4$ { mp4; }

----------------------------------

Best Regard,

Peng Wu 2008-10-08

-------------- Tech. VP http://www.openv.com 26th Floor, Block 16, jianwai SOHO, No.39 Middle East Third Ring Rd Chaoyang District Beijing 100022 China Tel: (010)5878 7828 Fax: (010)5878 7900 Email : wup@openv.cn

------------------------------------------------------------- 发件人:伍鹏 发送日期:2008-10-08 11:20:07 收件人:ngi@sysoev.ru 抄送: 主题:about h.264 streaming cache support

Dear all,

I have implemented an H.264 pseudo streaming module. And now I want to add cache
feature to this module.

My situation is that we have some data centers across country, and each data
center has some servers to provide video clips to our users. Because we want to
simplify the management of the storage and video files synchronization problem,
we maintain only one central storage. The servers on edge data centers should
cache the most visited video clips based on LRU algorithm.

I read the ngx_httpd_proxy_module.c file, and I think it is a good starting
point. I know a simplified module capable of this cache feature should work like
this: Step 1.if the requested file has been found on local disk, return the file Step 2.if the requested file has not been found on local disk, proxy this
request to original server and send the response to user and save the file to
local disk.

I know I can implement Step 1 on ngx_http_proxy_handler function. For Step 2 I
know I should create the proxy request on ngx_http_proxy_create_request
function, but I do NOT know on which function I can save the response file to
local disk and how. Should I implement this feature on
ngx_http_proxy_finalize_request function? And which data structure contains the
returned file data, is it u->buffering?

Thank you very much!

You can download the H.264 pseudo streaming module from
http://218.244.191.134:8081/mp4.tar.bz2

compile & intall 1. wget http://218.244.191.134:8081/mp4.tar.bz2 2. tar xfj mp4.tar.bz2 3. mv mp4 your_path/nginx-0.7.17/src/http/modules 4. cd your_path/nginx-0.7.17 5. ./configure --with-http_flv_module --add-module=src/http/modules/mp4 6. make 7. make install 8. kill -HUP `cat /usr/local/nginx/logs/nginx.pid`

a simple demo http://218.244.191.134:8081/playertest/mp4_streaming_nginx_test.html

Enjoy!

Best Regard,

Peng Wu 2008-10-08