:: installing nginx with h264 streaming

52 sec read

:: download and extract package

# wget //nginx.org/download/nginx-1.0.0.tar.gz
# tar xzf nginx-1.0.0.tar.gz
# wget //h264.code-shop.com/download/nginx_mod_h264_streaming-2.2.7.tar.gz
# tar -zxvf nginx_mod_h264_streaming-2.2.7.tar.gz
# wget //www.openssl.org/source/openssl-0.9.8o.tar.gz
# tar xzf openssl-0.9.8o.tar.gz

:: create file patch (for h264)

# vi nginxpatch.diff
--- ../nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.c.orig	2010-05-24 18:04:43.000000000 +0400
+++ ../nginx_mod_h264_streaming-2.2.7/src/ngx_http_streaming_module.c	2010-05-24 18:05:02.000000000 +0400
@@ -155,10 +155,6 @@
   }

   /* TODO: Win32 */
-  if (r->zero_in_uri)
-  {
-    return NGX_DECLINED;
-  }

   rc = ngx_http_discard_request_body(r);

:: patching

# patch -p1 < nginxpatch.diff

:: compiling nginx

# cd nginx-1.0.0
# ./configure --add-module=/root/nginx_mod_h264_streaming-2.2.7 --sbin-path=/usr/local/sbin --with-http_ssl_module --with-openssl=/root/openssl-0.9.8o --with-http_flv_module --user=daemon --group=daemon
# make && make install

:: setup nginx.conf
### add this line on location section

location ~ .mp4$ {
  mp4;
}
# vi /usr/local/nginx/conf/nginx.conf
### like this
location / {
            root   html;
            index  index.html index.htm;

            location ~ .mp4$ {
                 mp4;
            }

        }

:: running daemon
### testing configure

# /usr/local/sbin/nginx -t

### reload / restart

# /usr/local/sbin/nginx -s reload

### starting nginx

# /usr/local/sbin/nginx

:: testing video

# cd /usr/local/nginx/html
# wget //h264.code-shop.com:8080/workers_world_co64_box64.mp4 -O testing.mp4

open your video using web browser:

//hostname/testing.mp4

:: links
+ google
+ h264.shop.code
+ freebsd

How to fix problem with the editor ‘vi’

:: git error with vi error: There was a problem with the editor 'vi'   :: how to fix the problem 0. check path...
sysadmin.id
10 sec read

Apache :: MP4 Streaming

:: How to Enable mp4 Streaming in Apache + Installing mod h624 streaming wget //h264.code-shop.com/download/apache_mod_h264_streaming-2.2.7.tar.gz tar -xzf apache_mod_h264_streaming-2.2.7.tar.gz cd mod_h264_streaming-2.2.7/ ./configure --with-apxs=`which apxs2` make...
sysadmin.id
18 sec read

Apache :: Flash / FLV Streaming

:: How to Configure Apache for FLV Streaming + Installing mod_flvx wget //people.apache.org/~pquerna/modules/mod_flvx.c which apxs /usr/bin/apxs /usr/bin/apxs -cia mod_flvx.c + setup mod_flvx in http.conf...
sysadmin.id
15 sec read