12

What Ubuntu software is there to use a webcam as a recording camera (Like a Security System). It NEEDS to detect movement in the room, take pictures and/or record.

7 Answers 7

10

You could try using motion (V4L capture program supporting motion detection), a command line only utility.

To install this from the standard repository, execute:

sudo apt install motion

It's been pretty useful for me. Keep in mind motion will not record any audio.

Notes

  • By default target_dir (defined in /etc/motion/motion.conf) is /var/lib/motion/.

  • On Debian based systems on the config file you might need to change /usr/etc/motion/ to /etc/motion/. Then restart motion service.

  • Remove old files with a cron job. To keep last 60 days would be something like:

    /usr/bin/find /var/lib/motion/ -mtime +60 -and -type f -and -name "*mkv" -delete
    
2
  • I gave the answer to lukasz but gave you a point because motion is console based and also very simple to use. It can be helpful for remote movement detection and things like that, hold the kids away from the PC at least. Apr 5, 2011 at 23:44
  • On v4.3.2 we need to sudo sh -c "mkdir /var/log/motion && chown motion /var/log/motion" to avoid these errors on service start Jan 4 at 19:23
3
  • ffmpeg

    for video only:

    ffmpeg -f video4linux2 -s 320x240 -i /dev/video0 out.
    

    for audio and video:

    ffmpeg -f oss -i /dev/dsp -f video4linux2 -s 320x240 -i /dev/video0 out.mpg
    
  • ZoneMinder surveillance system. Maybe the best and most complex open source tool.

3
  • +1 for the explanation of ffmpeg with video and video+sound. Apr 5, 2011 at 23:44
  • 1
    How is the provided solutions capture the motion detection, please explain, I tried it and it did not work in motion detection. Aug 28, 2013 at 18:22
  • +1 @AshishSharma how does this do motion detection at all! Nov 27, 2014 at 10:05
3

wxCam supports the movement detection.

Last release: 2011-11.

wxCam is a webcam application for linux. It supports video recording (in an avi uncompressed and Xvid format), snapshot taking, and some special commands for philips webcams, so you can also use the program for astronomy purposes. It supports both video4linux 1 and 2 drivers, so it should work on a very large number of devices.

3

Shinobi (source)

Shinobi is a ZoneMinder alternative.

The Open Source CCTV platform written in Node.JS (Camera Recorder - Security Surveillance Software). From its site:

  • Records IP Cameras and Local Cameras
  • Streams by WebSocket
  • Save to WebM and MP4: Other formats will be added after codec choices are less confusing.
  • API
    • Get videos
    • Get monitors
    • Change monitor modes : Disabled, Watch, Record
    • Embedding streams

Also: Webcamoid is a full featured and multiplatform webcam suite. Check here how to install.

2

Try Cheese, the standard webcam app in Ubuntu.

Its installed by default, go to Applications > Sound & Video

It has recording capabilities (video and sound), and it take snapshots as pictures. But i guess it lacks motion sensor.

2

guvcview is the best in the smooth video as if you are a recorder.

sudo apt-get install guvcview
1

ffmpeg, Cheese, V4L are all great tools - simple to the max - and yet they lack motion detection capability.

If motion detection is a must you should really take a look at ZoneMinder (open source) and/or Xeoma (closed source but has a very simple free mode with motion detector and some notifications).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .