nazargren
Posts: 58
Joined: Mon Jan 07, 2013 11:32 pm

Camera Board and Motion

Thu Jul 18, 2013 4:58 am

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!

ghans
Posts: 7308
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Camera Board and Motion

Thu Jul 18, 2013 5:28 am

You could try motion-mmal .
https://github.com/dozencrows/motion/tree/mmal-test


ghans
• 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

nazargren
Posts: 58
Joined: Mon Jan 07, 2013 11:32 pm

Re: Camera Board and Motion

Thu Jul 18, 2013 3:17 pm

How do I set up Motion-mmal?

User avatar
jbeale
Posts: 3254
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Camera Board and Motion

Thu Jul 18, 2013 4:44 pm

It was very easy. I got a working system in a few minutes without understanding anything about motion or ever having used it before.

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
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

Duckegg999
Posts: 2
Joined: Mon Nov 04, 2013 12:00 pm

Re: Camera Board and Motion

Tue Nov 05, 2013 11:57 am

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

djscoutmaster
Posts: 4
Joined: Sat Nov 02, 2013 2:43 am

Re: Camera Board and Motion

Mon Nov 25, 2013 6:35 pm

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

?

thepichild
Posts: 3
Joined: Wed Sep 03, 2014 5:51 pm

Re: Camera Board and Motion

Wed Sep 03, 2014 6:42 pm

Hey guys, I've done all that, but i can't access it over web...

castikp
Posts: 6
Joined: Sat Sep 27, 2014 8:14 pm
Location: Slovakia

Re: Camera Board and Motion

Fri Oct 10, 2014 1:10 pm

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

ghans
Posts: 7308
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Camera Board and Motion

Sun Oct 12, 2014 1:40 pm

1) Stop all uv4l stuff.
2) Load the official driver instead :

Code: Select all

sudo modprobe bcm2835-v4l2
3) Restart motion ( follow the instructions for using motion with standard webcams).


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

RpiName
Posts: 601
Joined: Sat Jul 06, 2013 3:14 am

Re: Camera Board and Motion

Tue Oct 14, 2014 10:19 am

castikp wrote: But with camera on board motion does not work.
See http://www.raspberrypi.org/forums/viewt ... 43&t=89146

castikp
Posts: 6
Joined: Sat Sep 27, 2014 8:14 pm
Location: Slovakia

Re: Camera Board and Motion

Tue Oct 14, 2014 12:46 pm

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.

avinash chekkilla
Posts: 1
Joined: Fri Oct 17, 2014 7:31 am

Re: Camera Board and Motion

Fri Oct 17, 2014 6:10 pm

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

natdm
Posts: 2
Joined: Mon Sep 28, 2015 5:04 am

Re: Camera Board and Motion

Sat Oct 17, 2015 7:05 pm

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.

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
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
I've been trying but I can't get it running..

Code: Select all

./motion: error while loading shared libraries: libavformat.so.53: cannot open shared object file: No such file or directory
I've tried to apt-get install libavformat but I get nothing.

User avatar
rpdom
Posts: 11213
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK

Re: Camera Board and Motion

Sun Oct 18, 2015 5:47 am

natdm wrote:I've tried to apt-get install libavformat but I get nothing.
Did you try apt-get install libavformat53?

Tim Barker
Posts: 40
Joined: Sun Oct 05, 2014 5:02 pm

Re: Camera Board and Motion

Wed Oct 28, 2015 10:57 pm

djscoutmaster 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

?
yes but gave up and went back to using

sudo modprobe bcm2835-v4l2 and a 2B (although having problems using the same with a B+)

which seems to work fine with 4.1

Return to “Camera board”

Who is online

Users browsing this forum: No registered users and 11 guests