using beaglexM as video server

Most project is working on ubuntu, like this one:
http://www.hackourlife.com/diy-webcam-server-or-home-security-monitoring-setup-using-beagleboard-xm-running-ubuntu/

To do so, first thing is to make a ubuntu on beagleboard:
http://elinux.org/BeagleBoardUbuntu

down load the image, the trick is here:

Install image:
Quick install script for "board"
sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot board
"board" options:
  • BeagleBoard Ax/Bx/Cx/Dx - beagle
  • BeagleBoard xM - beagle_xm
  • BeagleBone/Black - bone
So for the BeagleBoard xM:
sudo ./setup_sdcard.sh --mmc /dev/sdX --uboot beagle_xm

after boot up with ubuntu, we could log in as ubuntu with password:temppwd
first thing t try is sudo apt-get update
then we  Install motion by doing:
sudo apt-get install motion

when it's done, it should be like this, with no error


The headless Ubuntu server running on my BeagleBoard XM doesn’t allow access of /dev/video0 (webcam) without root permission, therefore I had to add my user name to group video by doing the following (I am assuming that you have already sshed in to your headless server or are sitting locally on your target machine):
sudo usermod -a -G video ubuntu



Now create a directory .motion in your home directory (i.e. /home/my_user_name):
mkdir .motion



this .motion is not visible with ls, but you can still cd .motion to go in to it.
the we will creat a motion.conf under this folder:
or we can make this file under PC and use fileZilla to transfer to xM in this folder. motion.conf should have these line:

daemon=on
norm=3
input=8
auto_brightness=on
framerate=15
height=288width=352
jpeg_filename=motion/%Y%m%d/%v-%H%M%S-%q
noise_tune=off
output_all=off
output_motion=off
output_normal=off
quality=75
snapshot_interval=0
target_dir=/home/my_user_name/capture
text_left=(c) Abhi
text_right=%d %b %Yn%k:%M:%S
threshold=500
v4l2_palette=6
videodevice=/dev/video0
webcam_localhost=off
webcam_maxrate=100
webcam_port=8080
webcam_quality=85


detail config could be read by typing this

sudo less /etc/motion/motion.conf


Now you launch motion by typing
motion
If all went well you would see the message
[0] Processing thread 0 – config file /home/abhish/.motion/motion.conf
[0] Motion 3.2.12 Started
[0] Motion going to daemon mode


the server is running, open a browser and point to the server. ex:my xM has IP=192.168.0
107, the server is 192.168.0.107:8080
should be able to see the cam running:

In fact, motion is more powerful than this, it could detect motion get jpeg...etc.

留言

這個網誌中的熱門文章

Heltec ESP32+OLED+Lora, hardware testing

micro SD card for ESP32, on lolin32 with OLED and heltec 32 lora oled

Install Network Time Protocol(NTP) on BeagleBone with Angstrom linux and set local time zone