Skip to content
Steven P. Goldsmith edited this page May 23, 2013 · 36 revisions

Installation

You assume all the risks that come with flashing an Android device. It's very painless and hard to screw up, but if you do brick your Mini PC you are on your own!

I had problems using mjpg-streamer, uvccapture, fswebcam which return VIDIOC_DQBUF: Invalid argument or something similar. Cheese, gstreamer and vlc player (cvlc) worked. gstreamer worked the best, so that's what we are going to use here.

  1. Test USB camera under the original ROM
    • Boot up Mini PC with original ROM and configure your Google account
    • Download camera app if your ROM doesn't have one
    • Plug in your camera and take a picture
    • If that worked then there's a good chance it will work under PicUntu!
  2. Install Finless 1.7 ROM on MK808. If you have another Mini PC model check for Finless on that model (you can skip to step 3, but Finless makes the reboot process easier)
  3. Install PicUntu 0.9 RC3
    • Follow Install directions
    • When complete reboot into PicUntu using terminal with original ROM or Reboot app in Finless Rom (use bootloader option)
    • Make sure networking is working (ping gateway, etc.)
  4. Test camera under PicUntu
    • SSH into Mini PC as root/12qwaszx
    • lsusb
      • You should see something like:
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
        Bus 002 Device 002: ID 03f0:a707 Hewlett-Packard
      • Note "Hewlett-Packard" is my camera
    • Add non-privileged user
      • adduser <username>
      • adduser <username> sudo
      • usermod -a -G video <username>
    • Install gstreamer
    apt-get install python-gi python3-gi \
         gstreamer1.0-tools \
         gir1.2-gstreamer-1.0 \
         gir1.2-gst-plugins-base-1.0 \
         gstreamer1.0-plugins-good \
         gstreamer1.0-plugins-ugly \
         gstreamer1.0-plugins-bad \
         gstreamer1.0-libav
    • Install uvcdynctrl
    apt-get install uvcdynctrl
    • reboot
    • SSH in as user you just created
    • Get camera information
      • export GST_DEBUG="*v4l2*:5"
      • gst-launch-1.0 -v v4l2src num-buffers=1 ! fakesink&>debug.txt
      • nano debug.txt
      • Find out what formats are supported (MJPG support, excellent, no encoding required for gstreamer):
      getting src format enumerations
        got 6 format(s):
           YUYV
           MJPG
           YU12 (emulated)
           YV12 (emulated)
           BGR3 (emulated)
           RGB3 (emulated)
      • Find resolutions, frame rates, etc. in debug.txt
      probed caps: video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 15/2, 5/1 }; video/x-raw, format=(string)YUY2, width=(int)800, height=(int)600, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YUY2, width=(int)352, height=(int)288, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YUY2, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YUY2, width=(int)176, height=(int)144, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YUY2, width=(int)160, height=(int)120, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; image/jpeg, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; image/jpeg, width=(int)800, height=(int)600, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; image/jpeg, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; image/jpeg, width=(int)352, height=(int)288, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; image/jpeg, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; image/jpeg, width=(int)176, height=(int)144, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; image/jpeg, width=(int)160, height=(int)120, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)I420, width=(int)800, height=(int)600, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)I420, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)I420, width=(int)352, height=(int)288, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)I420, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)I420, width=(int)176, height=(int)144, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)I420, width=(int)160, height=(int)120, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YV12, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YV12, width=(int)800, height=(int)600, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YV12, width=(int)352, height=(int)288, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YV12, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YV12, width=(int)176, height=(int)144, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)YV12, width=(int)160, height=(int)120, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)BGR, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)BGR, width=(int)800, height=(int)600, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)BGR, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)BGR, width=(int)352, height=(int)288, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)BGR, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)BGR, width=(int)176, height=(int)144, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)BGR, width=(int)160, height=(int)120, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)RGB, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)RGB, width=(int)800, height=(int)600, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)RGB, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)RGB, width=(int)352, height=(int)288, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)RGB, width=(int)320, height=(int)240, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)RGB, width=(int)176, height=(int)144, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }; video/x-raw, format=(string)RGB, width=(int)160, height=(int)120, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction){ 30/1, 25/1, 20/1, 15/1, 10/1, 5/1 }
      • For a more consice list use
        uvcdynctrl -f
      Listing available frame formats for device video0:
        Pixel format: YUYV (YUV 4:2:2 (YUYV); MIME type: video/x-raw-yuv)
          Frame size: 640x480
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 352x288
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 320x240
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 176x144
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 160x120
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 800x600
            Frame rates: 15, 10, 5
          Frame size: 1280x720
            Frame intervals: 2/15, 1/5
        Pixel format: MJPG (MJPEG; MIME type: image/jpeg)
          Frame size: 640x480
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 352x288
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 320x240
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 176x144
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 160x120
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 800x600
            Frame rates: 30, 25, 20, 15, 10, 5
          Frame size: 1280x720
            Frame rates: 30, 25, 20, 15, 10, 5
    • Let's see if we can record a 500 frame video
      • export GST_DEBUG="*v4l2*:0"
      • gst-launch-1.0 v4l2src num-buffers=500 ! image/jpeg ! avimux ! filesink location=video.avi
      • Don't worry about libv4l2: error dequeuing buf: Success messages since we will mute those later on
      • SCP video to your desktop PC and see if it recorded correctly

Clone this wiki locally