How to install and test Motion software on Ubuntu

If you are setting up DIY monitoring on your Ubuntu, Motion is one of the reliable apps to consider. Also, setting up a simple monitor on your Ubuntu is a quick process. All you need is an installed webcam for your Ubuntu and the Motion package. Configuration is easy; In this guide we will learn all the steps you should follow, from installation to configuring the Motion software.

Installing Motion on Ubuntu

Motion is currently available in the Ubuntu repositories and can be installed using the apt tool. The version shipped with the repository is stable, but not the latest released version.

To quickly install Motion on your Ubuntu:

$ sudo suitable To install movement

Various dependency packages are installed alongside the Motion package.

After installing the packages, verify that Motion is installed by checking the version:

$ movement –Execution

For our case, we installed Motion version 4.3.2. As previously mentioned, the version of Motion installed with this option is not the latest version. To get the latest version, you must access it from the project’s version page on GitHub.

Configuring Motion on Ubuntu

To configure Motion, you should have the webcam or cameras that you are configuring with Motion to receive the surveillance footage.

The Motion folder is created in the /etc/motion directory and contains various configuration files required to use Motion. Note that the Motion program was developed for use by the Linux distribution and is written in C. You can choose how Motion saves the surveillance as a video or image. Also, it runs headless; Once you know how to configure it, you can use it.

The first step is to open the motion.conf file. The configuration file describes how the cameras will be linked and provides four options for configuration files that you can use. In this case, let’s use camera4.conf as the configuration file for your webcam or camera.

$ sudo nano /Etc/movement/motion.conf

Once you have the configuration file open, scroll down and locate the camera configuration files section. Your job here is to uncomment the config file you want to use and make sure it has the correct path to where we are creating the config file. Remove the semicolon in camera4.conf and set the correct path.

Next, use an editor of your choice to create the /etc/motion/camera4.conf file.

$ sudo nano /Etc/movement/camera4.conf

Note that Motion includes examples of how to define the configuration file. For example, /etc/motion/camera4-dist.conf describes how to associate your camera.

Open the camera4.conf file and add the script as in the following image. You should only change the destination directory to suit your file system and where you want to save the captured images or videos. Motion runs on localhost, so we define the streaming port in the last line.

Your /etc/motion/ should have the various files shown in the image below. The only new file is camera4.conf; the others are created during installation. Suppose you want to connect multiple cameras; Create a configuration file for each camera.

You can initiate the movement to start monitoring when your configuration file is ready. Run the following command:

$ sudo /etc/container/movement

The terminal output signals that monitoring has started.

You can now open your browser and access the following URL:

https://local host:8080/

A window will appear with all the cameras you have configured for your DIY surveillance, confirming that your setup is working properly. You can click on any of the cameras to expand their view.

Here’s how to use Motion to create a simple surveillance system on your Ubuntu.

Conclusion

Motion is a Linux package that supports creating a surveillance system using the connected webcam or cameras. After installing the Motion package, configure the webcam configuration file as described in this guide. Then open your browser to confirm your setup. You now have a personal surveillance system on your Ubuntu.

Related Posts