- "MJPG-streamer", is a command line application that copied JPG-frame from a single input pluginto multiple output plugins. It can be used to stream JPEG files over an IP-based network from the webcam to a viewer like Firefox, Cambozola, Videolanclient or even to a Windows Mobile device running the TCPMP-Player.
MJPG-streamer,是一个命令行应用程序,它可以从一个输入设备得到JPG帧,然后将JPG帧输出到输出设备上。它可以从一个网络摄像机中采集JPEG流文件,然后,通过网络,(浏览器)传输到网络上,我们就可以使用浏览器或者播放器来查看 远程视频。- It was written for embedded devices with very limited ressources in terms of RAM and CPU. Its origin, the "uvc_streamer" was written, because Linux-UVC compatible cameras directly produce JPEG-data, allowing fast and perfomant M-JPEG streams even from an embedded device running OpenWRT. The input module "input_uvc.so" captures such JPG frames from a connected webcam.
它可以使用在资源受限的嵌入式设备上,比如RAM受限,CPU受限等等。它的起源,是一个"uvc_streamer"的开始,因为的可移植摄像头,直接产生JPEG数据流,允许了快速的流文件甚至可以运行这些文件在一个嵌入式设备上。输入模块"input_uvc.so"捕捉比如JPG帧从一个连接着的摄像头。Linux-UVC: UVC是由微软主要发起的标准
USB视频类,主要应用于摄像头,扫描仪等设备,微软在其操作系统里安装了标准的UVC驱动程序,如果产品设备符合UVC标 准,则可以不安装驱动程序就可以正常工作,通常被称为免驱设备。AVEO摄像头,如非特别需求,基本都是符合UVC标准的,也就是指通常所说的免驱摄像头 设备。
- This tool can be modified and distributed according to the terms of the GPL v2.
这个工具,可以被修改或者发布在 GPL的框架协议下。- Currently no issues are known, but since this software is quite young and not used widely it may cause problems. You must really know what you are doing, if you use this software. If you want touse the software you are obliged to check if the sourcecode does what you expect it to do andtouse it.
take the risk yourself
目前大家都知道,这个软件没有问题,但是这个软件是一个年轻的、不被广泛使用的,它可能产生一些问题。假如你正在使用这个软件,你必须清楚你要怎么做,做什么。假如你想使用这个软件,你应该负责任的检查这个源代码是不是你期望的,防止冒险。- To view the stream use VLC or Firefox and open the URL:
- http://127.0.0.1:8080/?action=stream
检测流文件通过使用VLC(视频线路连接器)或者浏览器,打开URL- To view a single JPEG just call:
- http://127.0.0.1:8080/?action=snapshot
显示一个单一的JPEG图像- To compile and start the tool:
- # tar xzvf mjpg-streamer.tgz
- # cd mjpg-streamer
- # make clean all
- # export LD_LIBRARY_PATH=.
- # ./mjpg_streamer -o "output_http.so -w ./www"
怎么样编译这个软件,
和使用它
- If you have libv4l2 library you could compile it using it.
- There are some cameras which has extra controls using it, and you can set much more resolutions.
- # tar xzvf mjpg-streamer.tgz
- # cd mjpg-streamer
- # make USE_LIBV4L2=true clean all
- # export LD_LIBRARY_PATH=.
- # ./mjpg_streamer -o "output_http.so -w ./www"
假如你有一个libv4l2 库,你可以编译使用它。这里有一些摄像头额外的控制使用它。- If you would like to replace a WebcamXP based system with an mjpg-streamer based you may use the
- WXP_COMPAT make argument. If you compile with this argument the mjpg stream will be available as cam_1.mjpg and the
- still jpg snapshot as cam_1.jpg.
- # make WXP_COMPAT=true
- More examples can be found in the start.sh bash script.
- In case of error:
- * the input plugin "input_uvc.so" depends on libjpeg, make sure it is installed.
- Dependencies for the input plugin "input_uvc.so":
- * libjpeg
- * recent Linux-UVC driver (newer then revision #170)
- Dependencies for the output plugin "output_autofocus.so":
- * libmath
-
- To play the HTTP M-JPEG stream with mplayer:
- # mplayer -fps 30 -demuxer lavf ""
通过mplayer 视频播放器来 显示视频- It might be necessary to configure mplayer to prefer IPv4 instead of IPv6
- # vi ~./mplayer/config
- add or change the option: prefer-ipv4=yes