Up 起動 作成: 2021-01-27
更新: 2021-02-28


  • mjpg-streamer にパスが通っているか,チェック
      $ which mjpg_streamer
        /usr/local/bin/mjpg_streamer

  • 起動コマンド
      $ cd ~/mjpg-streamer
      $ mjpg_streamer \
      -i "./input_uvc.so -f 10 -r 320x240 -d /dev/video0 -y -n" \
      -o "./output_http.so -w ./www -p 8080"
      MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39 i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 320 x 240 i: Frames Per Second.: 10 i: Format............: YUYV i: JPEG Quality......: 80 i: TV-Norm...........: DEFAULT o: www-folder-path......: ./www/ o: HTTP TCP port........: 8080 o: HTTP Listen Address..: (null) o: username:password....: disabled o: commands.............: enabled

  • コマンドパラメータ
      -d : video device to open (your camera)
      -f : frames per second
      -r : resolution
      -n : do not initalize dynctrls of Linux-UVC driver
      -y : Use YUV format, default: MJPEG (uses more cpu power)
      -r : resolution


  • プロセスを確認:
      $ ps -ef|grep mjpg
      ubuntu 2117 2003 7 10:25 pts/0 00:00:10 mjpg_streamer -i ./input_uvc.so -f 10 -r 320x240 -d /dev/video0 -y -n -o ./output_http.so -w ./www -p 8080


      $ mjpg_streamer -h ----------------------------------------------------------------------- Usage: mjpg_streamer -i | --input "<input-plugin.so> [parameters]" -o | --output "<output-plugin.so> [parameters]" [-h | --help ]........: display this help [-v | --version ].....: display version information [-b | --background]...: fork to the background, daemon mode ----------------------------------------------------------------------- Example #1: To open an UVC webcam "/dev/video1" and stream it via HTTP: mjpg_streamer -i "input_uvc.so -d /dev/video1" -o "output_http.so" ----------------------------------------------------------------------- Example #2: To open an UVC webcam and stream via HTTP port 8090: mjpg_streamer -i "input_uvc.so" -o "output_http.so -p 8090" ----------------------------------------------------------------------- Example #3: To get help for a certain input plugin: mjpg_streamer -i "input_uvc.so --help" ----------------------------------------------------------------------- In case the modules (=plugins) can not be found: * Set the default search path for the modules with: export LD_LIBRARY_PATH=/path/to/plugins, * or put the plugins into the "/lib/" or "/usr/lib" folder, * or instead of just providing the plugin file name, use a complete path and filename: mjpg_streamer -i "/path/to/modules/input_uvc.so" ----------------------------------------------------------------------- [-fps | --framerate]...: set video framerate, default 5 frame/sec [-x | --width ]........: width of frame capture, default 640 [-y | --height]........: height of frame capture, default 480 [-quality].............: set JPEG quality 0-100, default 85 [-usestills]...........: uses stills mode instead of video mode [-preview].............: Enable full screen preview [-timestamp]...........: Get timestamp for each frame -sh : Set image sharpness (-100 to 100) -co : Set image contrast (-100 to 100) -br : Set image brightness (0 to 100) -sa : Set image saturation (-100 to 100) -ISO : Set capture ISO -vs : Turn on video stablisation -ev : Set EV compensation -ex : Set exposure mode (see raspistill notes) -awb : Set AWB mode (see raspistill notes) -ifx : Set image effect (see raspistill notes) -cfx : Set colour effect (U:V) -mm : Set metering mode (see raspistill notes) -rot : Set image rotation (0-359) -stats : Compute image stats for each picture (reduces noise for -usestills) -drc : Dynamic range compensation level (see raspistill notes) -hf : Set horizontal flip -vf : Set vertical flip