Welcome 微信登录

首页 / 操作系统 / Linux / Ubuntu 10.04上实现在办公室远程监控家中电脑摄像头

在办公室远程监控家中电脑摄像头,在伟大的Ubuntu 10.04上实现。1安装软件:
代码:sudo apt-get install ffmpeg
备份原始配制:
代码:sudo mv /etc/ffserver.conf /etc/ffserver.conf_backup
编辑配制,把它改为下面的内容
代码:sudo gedit /etc/ffserver.conf

代码:Port 8090
# bind to all IPs aliased or not
BindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 10000
# Suppress that if you want to launch ffserver as a daemon.
#NoDaemon

<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 5M
</Feed>

# FLV output - good for streaming
<Stream test.flv>
# the source feed
Feed feed1.ffm
# the output stream format - FLV = FLash Video
Format flv
VideoCodec flv
# this must match the ffmpeg -r argument
VideoFrameRate 15
# generally leave this is a large number
VideoBufferSize 80000
# another quality tweak
VideoBitRate 200
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 1
VideoQMax 5
VideoSize 352x288
# this sets how many seconds in past to start
PreRoll 0
# wecams don"t have audio
Noaudio
</Stream>

# ASF output - for windows media player
<Stream test.asf>
# the source feed
Feed feed1.ffm
# the output stream format - ASF
Format asf
VideoCodec msmpeg4
# this must match the ffmpeg -r argument
VideoFrameRate 15
# generally leave this is a large number
VideoBufferSize 80000
# another quality tweak
VideoBitRate 200
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 1
VideoQMax 5
VideoSize 352x288
# this sets how many seconds in past to start
PreRoll 0
# wecams don"t have audio
Noaudio
</Stream>

运行:

代码:ffserver

再开一终端,也可以让ffserver在后台运行:


代码:ffmpeg -r 15 -s 352x288 -f video4linux2 -i /dev/video0 http://localhost:8090/feed1.ffm


在另一台电脑上,用支持网络的播放器打开:
<!-- m -->mms://xx.xx.xx.xx:8090/test.asf<!-- m -->

xx.xx.xx.xx 为装有ubuntu的公网ip 或域名。
<!-- m -->
路由器用户要开端口映射或dmz主机Gateway W350l 在 Linux下的无线网卡问题解决Ubuntu 10.04上腾达W541U V2.0 无线网卡驱动的使用相关资讯      Ubuntu教程 
  • Ubuntu教程 - 使用Ubuntu拷贝CD和  (12/18/2013 14:38:16)
  • 让Ubuntu 12.10支持RAR和7Z文件解  (11/15/2012 18:51:50)
  • Windows 7硬盘安装Ubuntu 12.10图  (11/03/2012 19:22:47)
  • 完美安装Ubuntu 12.10最新AMD显卡  (11/27/2012 08:17:47)
  • Win 7硬盘安装Ubuntu 12.10  (11/05/2012 13:30:34)
  • 虚拟机上Ubuntu 11.10升级到12.04  (10/12/2012 20:00:38)
本文评论 查看全部评论 (0)
表情: 姓名: 字数