使用ffserver实现转发实时流媒体(摄像头捕获) 分类: TI-AM335X arm-linux-Ubuntu ffmpeg-SDL-VLC-Live555 2015-08-04 09:36 5人阅读 评论(0) 收藏

本系统为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


File /tmp/feed1.ffm
FileMaxSize 200K
ACL allow 127.0.0.1

Feed feed1.ffm
Format mpeg
VideoBitRate 64
VideoBufferSize 40
VideoFrameRate 3
VideoSize 352x240
VideoGopSize 12
NoAudio


Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255

-----------------------------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

版权声明:本文为博主原创文章,未经博主允许不得转载。

原文地址:https://www.cnblogs.com/mao0504/p/4705492.html