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

全部博文(1148)

文章存档

2012年(15)

2011年(1078)

2010年(58)

分类: 嵌入式

2011-04-26 08:27:58

本文的copyright归yuweixian4230@163.com 所有,使用GPL发布,可以自由拷贝,转载。但转载请保持文档的完整性,注明原作者及原链接,严禁用于任何商业用途。
作者:yuweixian4230@163.com
博客:
yuweixian4230.blog.chinaunix.net 


看看 MJPG-streamer 文件中的 start.sh 翻译,了解这个工具

更多的方法



start.sh 附件    start_sh.rar  

  1. ## This example shows how to invoke mjpg-streamer from the command line
 这些实例表达了用命令行调用 mjpg-streamer 工具

  1. export LD_LIBRARY_PATH="$(pwd)"
  2. #./mjpg_streamer -i "input_uvc.so --help"

  3. ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w ./www"
  4. #./mjpg_streamer -i "./input_uvc.so -d /dev/video0" -i "./input_uvc.so -d /dev/video1" -o "./output_http.so -w ./www"
  -d 动态使用/dev/video0 设备

  1. #valgrind ./mjpg_streamer -i "./input_uvc.so" -o "./output_http.so -w ./www"
网页测试

  1. #./mjpg_streamer -i "./input_uvc.so" -o "./output_udp.so -p 2001"
  2. 不知道怎么用??

  1. ## pwd echos the current path you are working at,
  2. ## the backticks open a subshell to execute the command pwd first
  3. ## the exported variable name configures ldopen() to search a certain
  4. ## folder for *.so modules
  5. #export LD_LIBRARY_PATH=`pwd`

  1. ## this is the minimum command line to start mjpg-streamer with webpages
  2. ## for the input-plugin default parameters are used
  3. #./mjpg_streamer -o "output_http.so -w `pwd`/www"

  4. 最少命令行格式通过网页使用 mjpg-streamer,因为输入插件都默认设置好了

  1. ## to query help for the core:
  2. # ./mjpg_streamer --help

帮助



  1. ## to query help for the input-plugin "input_uvc.so":
  2. # ./mjpg_streamer --input "input_uvc.so --help"

插件 input_uvc.so 帮助



  1. ## to query help for the output-plugin "output_file.so":
  2. # ./mjpg_streamer --output "output_file.so --help"

插件 output_file.so 帮助



  1. ## to query help for the output-plugin "output_http.so":
  2. # ./mjpg_streamer --output "output_http.so --help"

插件 output_http.so 帮助

  1. ## to specify a certain device, framerage and resolution for the input plugin:
  2. # ./mjpg_streamer -i "input_uvc.so -d /dev/video2 -r 320x240 -f 10"

指定一个特定分辨率的设备,通过调整 输入插件 解决


  1. ## to start both, the http-output-plugin and write to files every 15 second:
  2. # mkdir pics
  3. # ./mjpg_streamer -o "output_http.so -w `pwd`/www" -o "output_file.so -f pics -d 15000"

同时启动两个输出插件,可以每隔15秒设置写文件


  1. ## to protect the webserver with a username and password (!! can easily get sniffed and decoded, it is just base64 encoded !!)
  2. # ./mjpg-streamer -o "output_http.so -w ./www -c UsErNaMe:SeCrEt"

可以通过 用户名和密码 ,从而保护 web服务器


  1. ## If you want to track down errors, use this simple testpicture plugin as input source.
  2. ## to use the testpicture input plugin instead of a webcam or folder:
  3. #./mjpg_streamer -i "input_testpicture.so -r 320x240 -d 500" -o "output_http.so -w www"

  假如你想抓取到错误信息,使用 testpicture 插件作为输入源
使用 testpicture 代替摄像头输入

  1. ## The input_file.so plugin watches a folder for new files, it does not matter where
  2. ## the JPEG files orginate from. For instance it is possible to grab the desktop and
  3. ## store the files to a folder:
  4. # mkdir -p /tmp/input
  5. # while true; do xwd -root | convert - -scale 640 /tmp/input/bla.jpg; sleep 0.5; done &
  6. ## Then the files can be read from the folder "/tmp/input" and served via HTTP
  7. # ./mjpg_streamer -i "input_file.so -f /tmp/input -r" -o "output_http.so -w www"


  1. ## To upload files to a FTP server (edit the script first)
  2. # ./mjpg_streamer -i input_testpicture.so -o "output_file.so --command plugins/output_file/examples/ftp_upload.sh"


通过FTP服务器上传 文件


  1. ## To create a control only interface useful for controlling the pan/tilt throug
  2. ## a webpage while another program streams video/audio, like skype.
  3. #./mjpg_streamer -i "./input_control.so" -o "./output_http.so -w ./www"


产生控制界面接口,平/倾斜 控制,通过网页 ,当其他流文件比如 video/audio音视频


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