Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7193517
  • 博文数量: 510
  • 博客积分: 12019
  • 博客等级: 上将
  • 技术积分: 6836
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-01 16:46
文章分类

全部博文(510)

文章存档

2022年(2)

2021年(6)

2020年(59)

2019年(4)

2018年(10)

2017年(5)

2016年(2)

2015年(4)

2014年(4)

2013年(16)

2012年(47)

2011年(65)

2010年(46)

2009年(34)

2008年(52)

2007年(52)

2006年(80)

2005年(22)

分类: LINUX

2016-10-28 17:59:38

ubuntu 环境

1、下载nginx 

  wget
  wget

2、编译安装

      

点击(此处)折叠或打开

  1. configure --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' --prefix=/usr/local/ --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-mail --with-mail_ssl_module --with-http_xslt_module --add-module=../nginx-rtmp-module-master
    make
     sudo make install

3、nginx配置
在nginx.conf 内增加  

点击(此处)折叠或打开

  1. rtmp {
  2.     server {
  3.         listen 1935;

  4.         application myapp {
  5.             live on;
  6.         }
  7.         application hls {
  8.             live on;
  9.             hls on;
  10.             hls_path /tmp/hls;
  11.         }
  12.     }
  13. }
4、采集视频
因没摄像头 就用 录制屏幕了
ffmpeg -re  -f alsa -ac 2 -i pulse -f x11grab -r 30 -s 1024x768 -i :0.0   -vcodec libx264  -acodec aac   -ar 44100 -strict -2 -ac 1 -f flv -s 1024x768 -q 10 rtmp://192.168.11.70:1935/myapp/test1


5、播放
   简单用vlc方式
   串流里面输入    rtmp://192.168.11.70:1935/myapp/test1

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