Raspberry Pi: Streaming video and microphone from Microsoft LifeCam

  1. Wireless Video and Audio streaming using JPEG format WebcamInitially, I was using YUV format of PS3 Eye and encode the data to JPEG format to stream the video data over TCP/UDP, but it was taking large cpu usage of Rpi.
    I was thinking this could be due to the JPEG encoding...
    Microsoft LifeCam supports MJPEG format, and I am hoping this will reduce the cpu usage because PI does not need to deal with encoding.
    Well, let's see...
  2. Microsoft LifeCam support format
    I used Microsoft LifeCam Cinema 720p HD Webcam, and here is the support formats.

    v4l2-ctl --list-formats

    ioctl: VIDIOC_ENUM_FMT
            Index       : 0
            Type        : Video Capture
            Pixel Format: 'YUYV'
            Name        : YUV 4:2:2 (YUYV)

            Index       : 1
            Type        : Video Capture
            Pixel Format: 'MJPG' (compressed)
            Name        : MJPEG

    If you want to check details of each format, use "v4l2-ctl --list-formats-ext" command.


  3. Start Streaming!

    TX (RPi)
    gst-launch -v v4l2src ! "image/jpeg,width=320,height=240,framerate=30/1" ! multipartmux ! tcpserversink host=x.x.x.x port=5000 sync=false alsasrc device=hw:1 ! audioconvert ! audioresample ! 'audio/x-raw-int,rate=8000,width=16,channels=1' ! udpsink host=x.x.x.x port=5001
    RX (Android phone)
    Please refer to the previous work using Android smartphone streaming.(Link)
Hardware:
    Raspberry Pi
    Microsoft LifeCam Cinema 720p HD Webcam
    EW-7781Uh WiFi dongle
    Android phone (Droid X)

Summary:
    Video and microphone streaming was tested using MJPEG format of Microsoft LifeCam.

    Video and audio latency was reasonable (< 1 sec). 
    RPi CPU usage was less than 30% (top command)

Reference:


                 

Raspberry Pi Power Monitor

Power Consumption Monitor using Raspberry Pi Sometimes I get tired of using test equipment to monitor the current and/or power...