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

简介: <p style="margin-top: 5px; margin-bottom: 5px; padding-top: 0px; padding-bottom: 0px; word-wrap: break-word; color: rgb(102, 102, 102); font-family: 宋体, Arial; font-size: 16px; line-height: 26px;">本

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

相关文章
|
设计模式 JSON 前端开发
Struts2框架知识分享
【6月更文挑战第7天】Struts2框架知识分享
433 0
|
Linux
linux下ffmpeg安装
<p style="border: 0px; font-family: Muli, sans-serif; font-size: 15px; margin-top: 0px; margin-bottom: 1.5em; outline: 0px; padding-top: 0px; padding-bottom: 0px; vertical-align: baseline; word-wrap
10275 57
|
C++ Python
[ROS2] --- 手动编写一个节点
[ROS2] --- 手动编写一个节点
652 1
|
Linux Windows Ubuntu
grub2与grub区别
<ul style="margin: 0px; padding: 0px; border: 0px; list-style: none; color: rgb(50, 62, 50); font-family: simsun; font-size: 14px; line-height: 21px;"> <li style="margin: 0px 0px 0px 30px; padding:
6355 0
|
前端开发 小程序 JavaScript
微信小程序 - DZMDrawingBoard - (Canvas封装的画板、手写签名、生成图片、保存相册...库)
微信小程序 - DZMDrawingBoard - (Canvas封装的画板、手写签名、生成图片、保存相册...库)
593 0
|
机器学习/深度学习 算法 数据挖掘
【论文泛读】 Faster R-CNN:利用RPN实现实时目标检测
【论文泛读】 Faster R-CNN:利用RPN实现实时目标检测
【论文泛读】 Faster R-CNN:利用RPN实现实时目标检测
|
关系型数据库 MySQL
二进制日志的保存时间参数binlog_expire_logs_seconds和expire_logs_days的设置
在MySQL 8.0中,默认的二进制日志的保存时间参数binlog_expire_logs_seconds和expire_logs_days的设置如下
1862 0
|
Linux Ubuntu 开发工具
linux下FFmpeg编译生成ffplay
<p style="color: rgb(51, 51, 51); font-family: tahoma, 宋体; font-size: 14px; line-height: 22px; text-align: justify; background-color: rgb(250, 250, 252);">1、确认Makefile中指定的config.mak(在ffmpeg根目录下)中:CO
9580 1
|
关系型数据库 MySQL Linux
linux命令--ldconfig和ldd用法
<p style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 26px;"><span style="font-family: 'andale mono', times;"><span style="font-size:12px;">一、ldconfig<br></span></span>
2717 0
|
Windows 数据可视化 安全
Windows PE入门基础知识:Windows PE的作用、命名规则、启动方式、启动原理
<span style="line-height: 35px; background-color: rgb(233, 253, 232); font-size: 20px; font-family: 楷体, 楷体_GB2312; color: rgb(255, 0, 127);"></span><p style="margin-top: 0px; margin-bottom: 10px; pa
3083 0