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 notBindAddress 0.0.0.0# max number of simultaneous clientsMaxClients 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.ffmFileMaxSize 5M</Feed># FLV output – good for streaming<Stream test.flv># the source feedFeed feed1.ffm# the output stream format – FLV = FLash VideoFormat flvVideoCodec flv# this must match the ffmpeg -r argumentVideoFrameRate 15# generally leave this is a large numberVideoBufferSize 80000# another quality tweakVideoBitRate 200# quality ranges – 1-31 (1 = best, 31 = worst)VideoQMin 1VideoQMax 5VideoSize 352×288# this sets how many seconds in past to startPreRoll 0# wecams don’t have audioNoaudio</Stream># ASF output – for windows media player<Stream test.asf># the source feedFeed feed1.ffm# the output stream format – ASFFormat asfVideoCodec msmpeg4# this must match the ffmpeg -r argumentVideoFrameRate 15# generally leave this is a large numberVideoBufferSize 80000# another quality tweakVideoBitRate 200# quality ranges – 1-31 (1 = best, 31 = worst)VideoQMin 1VideoQMax 5VideoSize 352×288# this sets how many seconds in past to startPreRoll 0# wecams don’t have audioNoaudio</Stream>

运行:

代码:

ffserver

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

代码:

ffmpeg -r 15 -s 352×288 -f video4linux2 -i /dev/video0 :8090/feed1.ffm 在另一台电脑上,用支持网络的播放器打开:mms://xx.xx.xx.xx:8090/test.asfxx.xx.xx.xx 为装有ubuntu的公网ip 或域名。路由器用户要开端口映射或dmz主机

,自己喜欢的人,那就随便怎么样了,

Ubuntu 10.04上实现在办公室远程监控家中电脑摄像头

相关文章:

你感兴趣的文章:

标签云: