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


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

  • 共有ライブラリの確認
      $ ldd /usr/local/bin/mjpg_streamer
        linux-vdso.so.1 (0x7eb54000) /usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f67000) libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76f2a000) libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76f17000) libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76dd8000) /lib/ld-linux-armhf.so.3 (0x76f7d000)

  • 起動コマンド
      $ mjpg_streamer \
      -i "input_raspicam.so -x 640 -y 480 -fps 15 -q 80" \
      -o "output_http.so -p 8080 -w /home/pi/mjpg-streamer/www" &
        MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34 i: fps.............: 15 i: resolution........: 640 x 480 i: camera parameters..............: Sharpness 0, Contrast 0, Brightness 50 Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0 Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none' Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128 Rotation 0, hflip No, vflip No ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000 o: www-folder-path......: /home/pi/mjpg-streamer/www/ o: HTTP TCP port........: 8080 o: HTTP Listen Address..: (null) o: username:password....: disabled o: commands.............: enabled i: Starting Camera Encoder Buffer Size 81920

  • コマンドパラメータ
      -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
        pi 7468 920 1 23:56 pts/0 00:00:00 mjpg_streamer -i input_raspicam.so -x 640 -y 480 -fps 15 -q 80 -o output_http.so -p 8080 -w /home/pi/mjpg-streamer/www


      $ 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