Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1306496
  • 博文数量: 860
  • 博客积分: 425
  • 博客等级: 下士
  • 技术积分: 1464
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-20 19:57
个人简介

对技术执着

文章分类

全部博文(860)

文章存档

2019年(16)

2018年(12)

2015年(732)

2013年(85)

2012年(15)

我的朋友

分类: 嵌入式

2015-03-14 17:11:49

一个用于网络摄像机的开源软件 --- mjpg-streamer


luther@gliethttp:~$ wget

"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.

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.

This tool can be modified and distributed according to the terms of the GPL v2.

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 and take the risk yourself to use it.

To view the stream use VLC or Firefox and open the URL:


To view a single JPEG just call:


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"

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 "&ignored.mjpg"

It might be necessary to configure mplayer to prefer IPv4 instead of IPv6
# vi ~./mplayer/config
add or change the option: prefer-ipv4=yes
 
阅读(655) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~