OS:ubuntu 12.04
ffmpeg:N-47141-g4063bb2
x264:0.133.2334 a3ac64b
目标:
使用ffserver建立流媒体服务器
使用ffmpeg对本地文件流化(x264编码器)
使用ffplay播放
ffserver.conf配置
3 |
BindAddress 0.0.0.0 #服务器地址绑定 |
4 |
MaxHTTPConnections 2000 #允许的最大连接数 |
5 |
MaxClients 1000 #最大的客户数 |
12 |
ACL allow 127.0.0.1 #只允许本地连接 |
15 |
################ asf ################ |
20 |
VideoCodec libx264 #编码格式 |
22 |
VideoSize 1024x768 #播放大小 |
24 |
VideoBufferSize 10000000 |
31 |
AVOptionVideo flags +global_header |
32 |
AVOptionAudio flags +global_header |
36 |
################ flv ################ |
46 |
#AudioSampleRate 44100 |
47 |
#AVOptionAudio flags +global_header |
48 |
#AudioCodec libmp3lame |
54 |
VideoBufferSize 1000000 |
60 |
VideoBitRateTolerance 100 |
66 |
#AVOptionVideo quality good |
67 |
#AVOptionVideo cpu-used 0 |
68 |
AVOptionVideo flags +global_header |
69 |
#AVOptionVideo keyint_min 25 |
70 |
#AVOptionVideo qcomp 0.6 |
72 |
#AVOptionVideo me_range 16 |
76 |
################ rtsp ################ |
86 |
#AVPresetVideo default |
87 |
AVPresetVideo superfast |
88 |
AVOptionVideo flags +global_header |
91 |
AVOptionVideo me_range 4 |
96 |
#MulticastAddress 224.124.0.1 |
104 |
#AudioSampleRate 22050 |
105 |
#AVOptionAudio flags +global_header |
108 |
################ html ################ |
112 |
# Only allow local people to get the status |
114 |
ACL allow 192.168.0.0 192.168.255.255 |
115 |
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico |
118 |
# Redirect index.html to the appropriate site |
119 |
<Redirect index.html> |
120 |
URL http://www.ffmpeg.org/ |
启动ffserver服务器
1 |
ffserver -d -f ./ffserver.conf |
使用ffmpeg对本地文件流化
1 |
./ffmpeg -i ./1.mov -vcodec libx264 -qmin 3 -qmax 31 -qdiff 4 -me_range 16 -keyint_min 25 -qcomp 0.6 -b 9000K http://localhost:8090/feed1.ffm |
捕捉本地摄像头数据
1 |
./ffmpeg -f video4linux2 -i /dev/video0 http://localhost:8090/feed1.ffm |
为流媒体增加声音
在ffmserver.conf中打开声音:
5 |
AVOptionAudio flags +global_header |
在输入中加入声音捕获:
1 |
ffmpeg -f v4l2 -i /dev/video0 -f alsa -i hw:0,0 http://localhost:8090/feed_tv.ffm |
使用ffplay播放
1 |
./ffplay mmsh://localhost:8090/test.asf |
2 |
./ffplay http://localhost:8090/test.flv |
3 |
./ffplay rtsp://localhost:554/live.h264 |
git: https://github.com/lnmcc/multi_stream_server.git
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
参照网址: [1]http://blog.csdn.net/redstarofsleep/article/details/45092147 [2]HLS介绍:http://www.cnblogs.co ...
- 流媒体技术学习笔记之(一)nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
参照网址: [1]http://blog.csdn.net/redstarofsleep/article/details/45092147 [2]HLS介绍:http://www.cnblogs.co ...
- Linux-Nginx+rtmp+ffmpeg搭建流媒体服务器
Nginx+rtmp+ffmpeg搭建流媒体服务器 说明: nginx搭建流媒体服务需要用到 nginx-rtmp-module 模块 具体操作步骤: 安装nginx (1)下载第三方扩展模块ngin ...
- centos7+nginx+rtmp+ffmpeg搭建流媒体服务器(保存流目录与http目录不要随意配置,否则有权限问题)
搭建nginx-http-flv-module升级代替rtmp模块,详情:https://github.com/winshining/nginx-http-flv-module/blob/master ...
- 使用nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
参考: 1,使用nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器笔记(一)http://blog.csdn.net/xdwyyan/article/details/4319 ...
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器[转]
转 :http://redstarofsleep.iteye.com/blog/2123752 Nginx本身是一个非常出色的HTTP服务器,FFMPEG是非常好的音视频解决方案.这两个东西通过一个n ...
- 基于EasyDarwin开源流媒体服务器框架实现EasyNVR H5无插件直播流媒体服务器方案
背景分析 在之前的一篇博客<web无插件播放RTSP摄像机方案,拒绝插件,拥抱H5!>中,描述了实现一套H5无插件直播方案的各个组件的参考建议,又在博客<EasyNVR H5流媒体服 ...
- 基于 Red5 的流媒体服务器的搭建和应用
http://www.ibm.com/developerworks/cn/opensource/os-cn-Red5/ Red5 是一个采用 Java 开发的开源免费 Flash 流媒体服务器.Red ...
- 搭建基于nginx-rtmp-module的流媒体服务器
1.业务流程图 2.软件下载 2.1 windows下载obs 2.2 linux 安装nginx(附加rtmp模块) 1.cd /usr/local 2.mkdir nginx 3.cd nginx ...
随机推荐
- java 伪静态的方法
1.jar包支持urlrewritefilter-4.0.3.jar http://files.cnblogs.com/simpledev/urlrewritefilter-4.0.3.rar 2. ...
- NGINX的奇淫技巧 —— 3. 不同域名输出不同伺服器标识
NGINX的奇淫技巧 —— 3. 不同域名输出不同伺服器标识 ARGUS 1月13日 发布 推荐 0 推荐 收藏 6 收藏,707 浏览 大家或许会有这种奇葩的需求...要是同一台主机上, 需要针对不 ...
- time wait duo
linux 下Time_wait过多问题解决 分类: linux FAQ2011-07-14 11:20 3485人阅读 评论(0) 收藏 举报 linux服务器tcp通讯活动ssh 问题起因: 自己 ...
- Java 泛型(Generics)
Generics, 类似C++中的模版. 允许在定义类和接口的时候使用类型参数(type parameters), 声明的类型参数在使用的时候用具体的类型来替换. 如 ArrayList<Str ...
- 深入理解JVM--类的执行机制
在完成将class文件信息加载到JVM并产生class对象之后,就可以执行Class对象的静态方法或者实例方法对对象进行调用了.JVM在源代码编译阶段将源代码编译为字节码文件,字节码是一种中间代码的方 ...
- sudo: /etc/sudoers 的模式为 0551,应为 0440
环境:Ubuntu 12.04.4 LTS 32bit 本想修改/etc/sudoers文件,取消sudo权限的密码.但是因为sudoers文件无‘w’(写)的权限,然后用命令加写权限的时候加错了,加 ...
- Project Euler 92:Square digit chains 平方数字链
题目 Square digit chains A number chain is created by continuously adding the square of the digits in ...
- Hibernate逍遥游记-第7章 Hibernate的检索策略和检索方式(<set lazy="false" fetch="join">、left join fetch、FetchMode.JOIN、)
1. <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hi ...
- C++定义全局变量/常量几种方法的区别
在讨论全局变量之前我们先要明白几个基本的概念: 1. 编译单元(模块): 在IDE开发工具大行其道的今天,对于编译的一些概念很多人已经不再清楚了,很多程序员最怕的就是处理连接错误(LINK ER ...
- phantomjs使用说明
phantomjs使用说明 12条评论 phantomjs实现了一个无界面的webkit浏览器.虽然没有界面,但dom渲染.js运行.网络访问.canvas/svg绘制等功能都很完备,在页面抓取. ...