Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4253474
  • 博文数量: 1148
  • 博客积分: 25453
  • 博客等级: 上将
  • 技术积分: 11949
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-06 21:14
文章分类

全部博文(1148)

文章存档

2012年(15)

2011年(1078)

2010年(58)

分类: 嵌入式

2011-04-25 19:22:25

MJPG-streamer 文件中的 README

  1. "MJPG-streamer", is a command line application that copied JPG-frame from a single input plugin to 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流文件,然后,通过网络,(浏览器)传输到网络上,我们就可以使用浏览器或者播放器来查看 远程视频。


  1. 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标准的,也就是指通常所说的免驱摄像头 设备。

  1. This tool can be modified and distributed according to the terms of the GPL v2.
这个工具,可以被修改或者发布在 GPL的框架协议下。

  1. 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 to use the software you are obliged to check if the sourcecode does what you expect it to do andto use it.
    take the risk yourself

目前大家都知道,这个软件没有问题,但是这个软件是一个年轻的、不被广泛使用的,它可能产生一些问题。假如你正在使用这个软件,你必须清楚你要怎么做,做什么。假如你想使用这个软件,你应该负责任的检查这个源代码是不是你期望的,防止冒险。

  1. To view the stream use VLC or Firefox and open the URL:
  2. http://127.0.0.1:8080/?action=stream
检测流文件通过使用VLC(视频线路连接器)或者浏览器,打开URL

  1. To view a single JPEG just call:
  2. http://127.0.0.1:8080/?action=snapshot
显示一个单一的JPEG图像


  1. To compile and start the tool:
  2. # tar xzvf mjpg-streamer.tgz
  3. # cd mjpg-streamer
  4. # make clean all
  5. # export LD_LIBRARY_PATH=.
  6. # ./mjpg_streamer -o "output_http.so -w ./www"
怎么样编译这个软件和使用它


  1. If you have libv4l2 library you could compile it using it.
  2. There are some cameras which has extra controls using it, and you can set much more resolutions.
  3. # tar xzvf mjpg-streamer.tgz
  4. # cd mjpg-streamer
  5. # make USE_LIBV4L2=true clean all
  6. # export LD_LIBRARY_PATH=.
  7. # ./mjpg_streamer -o "output_http.so -w ./www"
假如你有一个libv4l2 库,你可以编译使用它。这里有一些摄像头额外的控制使用它。



  1. If you would like to replace a WebcamXP based system with an mjpg-streamer based you may use the
  2. WXP_COMPAT make argument. If you compile with this argument the mjpg stream will be available as cam_1.mjpg and the
  3. still jpg snapshot as cam_1.jpg.
  4. # make WXP_COMPAT=true


  5. More examples can be found in the start.sh bash script.

  6. In case of error:
  7.  * the input plugin "input_uvc.so" depends on libjpeg, make sure it is installed.

  8. Dependencies for the input plugin "input_uvc.so":
  9.  * libjpeg
  10.  * recent Linux-UVC driver (newer then revision #170)

  11. Dependencies for the output plugin "output_autofocus.so":
  12.  * libmath
  13.  

  14. To play the HTTP M-JPEG stream with mplayer:
  15. # mplayer -fps 30 -demuxer lavf ""
通过mplayer 视频播放器来 显示视频

  1. It might be necessary to configure mplayer to prefer IPv4 instead of IPv6
  2. # vi ~./mplayer/config
  3. add or change the option: prefer-ipv4=yes

阅读(2556) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~