Camera Board and Motion
Hi everyone, I'm using Wheezy and have Motion working perfectly with a USB webcam, and I was wondering if there are any extra steps when configuring/connecting the Pi camera to motion as compared to the USB webcam, and if so, what are those steps? Thanks!
Re: Camera Board and Motion
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Re: Camera Board and Motion
How do I set up Motion-mmal?
Re: Camera Board and Motion
It was very easy. I got a working system in a few minutes without understanding anything about motion or ever having used it before.
That got me going. Then I started wading into the config file to tweak things. See also this post and subsequent in that thread: http://www.raspberrypi.org/phpBB3/viewt ... 61#p374790
Code: Select all
$ sudo apt-get install -y libjpeg62 libjpeg62-dev libavformat53 libavformat-dev libavcodec53 libavcodec-dev libavutil51 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev
$ wget https://www.dropbox.com/s/xdfcxm5hu71s97d/motion-mmal.tar.gz
$ tar zxvf motion-mmal.tar.gz
$ ./motion -n -c motion-mmalcam.conf
-
- Posts: 2
- Joined: Mon Nov 04, 2013 12:00 pm
Re: Camera Board and Motion
I've done this and I can get the camera capturing images but I have to manually start the Motion software running by typing the following....
./motion -n -c motion-mmalcam.conf
How can I get it to start running automatically at start-up?
Cheers
Duckegg999
./motion -n -c motion-mmalcam.conf
How can I get it to start running automatically at start-up?
Cheers
Duckegg999
-
- Posts: 4
- Joined: Sat Nov 02, 2013 2:43 am
Re: Camera Board and Motion
Has anyone used the UV4L drivers for the camera module and motion as explained here
http://www.linux-projects.org/modules/s ... e&artid=14
?
http://www.linux-projects.org/modules/s ... e&artid=14
?
-
- Posts: 3
- Joined: Wed Sep 03, 2014 5:51 pm
Re: Camera Board and Motion
Hey guys, I've done all that, but i can't access it over web...
Re: Camera Board and Motion
Hello , I have the same problem.
Motion working perfectly with a USB webcam.
When a movement, save the image and send it by mail.
But with camera on board motion does not work.
I tried different procedures, for example uv4l driver:
wget http://www.linux-projects.org/listing/u ... /lrkey.asc && sudo apt-key add ./lrkey.asc
Add the following line to the file /etc/apt/sources.list : deb http://www.linux-projects.org/listing/u ... /raspbian/ wheezy main
sudo apt-get update
sudo apt-get install uv4l uv4l-raspicam
uv4l --driver raspicam --auto-video_nr
device is registered as dev0, but motion not working with thid device. In each Picture is text: unable to open video device
motion.conf contains parameters:
# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video0
# The video input to be used (default: 8)
# Should normally be set to 0 or 1 for video/TV cards, and 8 for USB cameras
input 8
I tried to set instead of 1 or 0 instead of 8, but it does not work.
I do not know how to set the motion to acquire images from internal on board Cameras
Motion working perfectly with a USB webcam.
When a movement, save the image and send it by mail.
But with camera on board motion does not work.
I tried different procedures, for example uv4l driver:
wget http://www.linux-projects.org/listing/u ... /lrkey.asc && sudo apt-key add ./lrkey.asc
Add the following line to the file /etc/apt/sources.list : deb http://www.linux-projects.org/listing/u ... /raspbian/ wheezy main
sudo apt-get update
sudo apt-get install uv4l uv4l-raspicam
uv4l --driver raspicam --auto-video_nr
device is registered as dev0, but motion not working with thid device. In each Picture is text: unable to open video device
motion.conf contains parameters:
# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video0
# The video input to be used (default: 8)
# Should normally be set to 0 or 1 for video/TV cards, and 8 for USB cameras
input 8
I tried to set instead of 1 or 0 instead of 8, but it does not work.
I do not know how to set the motion to acquire images from internal on board Cameras
Re: Camera Board and Motion
1) Stop all uv4l stuff.
2) Load the official driver instead :
3) Restart motion ( follow the instructions for using motion with standard webcams).
ghans
EDIT: typo , thanks to castikp for pointing it out
2) Load the official driver instead :
Code: Select all
sudo modprobe bcm2835-v4l2
ghans
EDIT: typo , thanks to castikp for pointing it out
Last edited by ghans on Wed Oct 15, 2014 8:54 am, edited 1 time in total.
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Re: Camera Board and Motion
See http://www.raspberrypi.org/forums/viewt ... 43&t=89146castikp wrote: But with camera on board motion does not work.
Re: Camera Board and Motion
sudo modprobe bcm2835-v4l2
and camera is working properly
Thank you
I write text "bcm2835-v4l2" to file /etc/modules
And camera working also after restart.
and camera is working properly
Thank you
I write text "bcm2835-v4l2" to file /etc/modules
And camera working also after restart.
-
- Posts: 1
- Joined: Fri Oct 17, 2014 7:31 am
Re: Camera Board and Motion
I have worked with raspbery pi model B earlier and now upgraded to B+ now . Initially everything worked well, now the basic video capturing using motion isn't working its displaying a message "unable to open video device" while watching on a browser.
Ref:http://www.codeproject.com/Articles/665 ... nce-camera
Ref:http://www.codeproject.com/Articles/665 ... nce-camera
Re: Camera Board and Motion
I've been trying but I can't get it running..jbeale wrote:It was very easy. I got a working system in a few minutes without understanding anything about motion or ever having used it before.
That got me going. Then I started wading into the config file to tweak things. See also this post and subsequent in that thread: http://www.raspberrypi.org/phpBB3/viewt ... 61#p374790Code: Select all
$ sudo apt-get install -y libjpeg62 libjpeg62-dev libavformat53 libavformat-dev libavcodec53 libavcodec-dev libavutil51 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev $ wget https://www.dropbox.com/s/xdfcxm5hu71s97d/motion-mmal.tar.gz $ tar zxvf motion-mmal.tar.gz $ ./motion -n -c motion-mmalcam.conf
Code: Select all
./motion: error while loading shared libraries: libavformat.so.53: cannot open shared object file: No such file or directory
Re: Camera Board and Motion
Did you try apt-get install libavformat53?natdm wrote:I've tried to apt-get install libavformat but I get nothing.
-
- Posts: 40
- Joined: Sun Oct 05, 2014 5:02 pm
Re: Camera Board and Motion
yes but gave up and went back to usingdjscoutmaster wrote:Has anyone used the UV4L drivers for the camera module and motion as explained here
http://www.linux-projects.org/modules/s ... e&artid=14
?
sudo modprobe bcm2835-v4l2 and a 2B (although having problems using the same with a B+)
which seems to work fine with 4.1
how to consume raspivid raw output
Hi everyone,
I am using pi camera for CV. here is my problem on consume raw output stream,
hardware: Rev 1.3 camera
software setup: raspivid --whdith 320 --height 240 --flush --framerate 10 --timeout 0 --nopreview --raw - --raw-format rgb --output /dev/null
I suppose to consume raw data from process pipeline stream. I am thinking that since each image is bytes length of width*height*3, so each image's rgb matrix should be byte[width*height*3], I just read stream order by order,
but this does not work as I respected. I find that the first image is total correct, then from second one, the images are dislocated, then from somewhere again correct, then dislocated,..... the video is flashing in looking.
the image
I am using pi camera for CV. here is my problem on consume raw output stream,
hardware: Rev 1.3 camera
software setup: raspivid --whdith 320 --height 240 --flush --framerate 10 --timeout 0 --nopreview --raw - --raw-format rgb --output /dev/null
I suppose to consume raw data from process pipeline stream. I am thinking that since each image is bytes length of width*height*3, so each image's rgb matrix should be byte[width*height*3], I just read stream order by order,
Code: Select all
for ......
byte[] bytes=new byte[width*height*3];
stream.readFull(bytes);
...
//convert to image
...
the image