See Sources, for hardware install and an exemple on using the motion package.

One useful configuration that you could add to your rpi /boot/config.txt is this one :

# sh

Now motion should write to a disk which is plugged or on a network. I have a freebox revolution network drive for this.

# sh
sudo pico /etc/fstab

add this line at the end of the file and customise to your needs

# sh
//\040dur/Raspberrypi/motion /mnt/freebox/motion cifs auto,guest,uid=motion,gid=motion,iocharset=utf8,rw,file_mode=0777,dir_mode=0777 0 0 

update your motion.conf file to reflect the target_dir used

# sh
target_dir = /mnt/freebox/motion


Convert all your images into a video, using ffmpeg:

# sh
ffmpeg -y -r 15 -pattern_type glob -i '*.jpg' -c:v libx264 video.mp4

Before concatenating, you may need to replace the event id in the filename, the first two digits including the dash (eventId-date-frame.jpg) which will looks like 32-20140621225139-10.jpg. Using sed:

# sh
find . name *.jpg -type f | sed -r 's/^[0-9]{2}-(.+)/mv & \1/' | bash

or with the OSX sed version (bsd)

# sh
find . name *.jpg -type f | sed -E 's/^[0-9]{2}-(.+)/mv & \1/' | bash

remove the piped bash for testing.


Created on 20-06-2014 by Eric le bihen

comments powered by Disqus