您的位置:首页 > 其它

使用ffserver实现转发实时流媒体(摄像头捕获)

2014-05-06 07:03 239 查看
本系统为ubuntu 10.04LTS

说明1:本实验在本机成功测试通过;

说明2:本实验仅仅测试了视频流,未测试音频流。

1、配置ffserver.conf

-----------------------------ffserver.conf----------------------------start

Port 8090

BindAddress 0.0.0.0

MaxHTTPConnections 2000

MaxClients 1000

MaxBandwidth 1000

CustomLog -

NoDaemon

<Feed feed1.ffm>

File /tmp/feed1.ffm

FileMaxSize 200K

ACL allow 127.0.0.1

</Feed>

<Stream test1.mpg>

Feed feed1.ffm

Format mpeg

VideoBitRate 64

VideoBufferSize 40

VideoFrameRate 3

VideoSize 352x240

VideoGopSize 12

NoAudio

</Stream>

<Stream stat.html>

Format status

ACL allow localhost

ACL allow 192.168.0.0 192.168.255.255

</Stream>

-----------------------------ffserver.conf----------------------------end

2、启动ffserver

命令: ffserver -f doc/ffserver.conf

3、检查服务器状态

在web浏览器中输入地址:http://localhost:8090/stat.html

若能看到 ffserver Status 说明成功启动,通过内容可以看到在ffserver.conf配置的流信息等内容,对整个过程的成功进行有帮助

4、捕获输入流,采集到临时文件feed1.ffm

命令:ffmpeg -f video4linux2 -framerate 30 -i /dev/video0 http://localhost:8090/feed1.ffm
5、请求ffserver播放视频流

命令:ffplay http://cher-ubuntu:8090/test1.mpg
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: