Это старая версия документа.
IPCAM
Трансляция камер видеонаблюдения для сайта
Установка nginx
apt-get install build-essential apt-get install libpcre3 libpcre3-dev cd /usr/src/ wget http://nginx.org/download/nginx-1.9.0.tar.gz tar -xzvf nginx-1.9.0.tar.gz cd nginx-1.9.0 ./configure --prefix=/usr --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-http_ssl_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module make make install
nano /etc/nginx/sites-enabled/ipcam
server { listen 8088; # rtmp stat location /hls { types { application/vnd.apple.mpegurl m3u8; } root /tmp; add_header Cache-Control no-cache; add_header 'Access-Control-Allow-Origin' '*'; } location = /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; } location / { add_header 'Access-Control-Allow-Origin' '*'; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }
Установка ffmpeg
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html \ libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev \ libtheora-dev libvorbis-dev libvpx-dev libx11-dev libxfixes-dev libxvidcore-dev
cd /usr/src/ wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz && \ tar -xf yasm-1.2.0.tar.gz && cd yasm-1.2.0 && ./configure make && make install git clone git://git.videolan.org/x264.git cd x264 ./configure --enable-shared make && make install
cd .. svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg cd ffmpeg ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \ --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \ --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis \ --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab make && make install