By connecting Raspberry Pi to an IP camera with simple steps, you can use Raspberry Pi to store the security camera video footage to external HDD or remotely live view, which is a budget-friendly solution. IP cameras usually use NVR for video file recording and remote viewing. In this case, it is equivalent to using Raspberry Pi to realize the function of NVR. At the same time, you can also experience the fun of DIY in it!

 Table of Content:

When you try to link the pi to the IP camera using this tutorial, the following data needs to be noted in advance.

Recommendation Model Raspberry 3 model B
Monitor size not less than 3.5 inches
Operating Systems for Pi Raspbian OS / NOOBS
Software Recommendations VLC / KODI / OMXplayer

Components Needed

In order to make a Raspberry Pi IP camera viewer, you require certain items:

  • Raspberry Pi
  • Keyboard
  • A monitor
  • IP camera
  • Wireless adapter

Raspberry Pi: First of all, you need Raspberry Pi itself. There have been several generations being released, including Pi model A, model B, A+ and B+ models, Pi 2 model B, and the latest Raspberry Pi 3 model B.

Keyboard: Then you require a keyboard for the Raspberry Pi IP camera. Power is required which is provided by a Micro USB.

Monitor: To view the live video from a Raspberry Pi IP camera, you will need to attach a Raspberry Pi security camera monitor. This can be an HDMI or VGA model.

IP camera: A wireless security camera or PoE IP camera is required to capture your images and videos. The higher the quality of the camera, the better the images and video quality will be.

Wireless adapter: Finally, a wireless adapter is required to ensure that the whole Raspberry Pi security camera setup process runs smoothly.

7 Simple Steps to Make a Raspberry Pi IP Camera Viewer

DIY Security Camera System Raspberry Pi

The following are 7 simple steps to learn how to connect your Raspberry Pi to an IP camera. By transmitting IP camera's stream to the Raspberry Pi in real time, you can turn your Raspberry Pi into an IP camera viewer.

Quick Navigation:

  1. Install a screen or monitor for your Pi.
  2. Install Raspbian OS or NOOBS for your Pi.
  3. Set the WiFi network connection.
  4. Reboot to test if the WiFi is working properly.
  5. Get the IP camera username, password and IP address.
  6. Install a suitable video player software.
  7. Access the video stream of the IP camera.

Step 1.Install a screen or monitor for your Pi.

Select and install a screen for your Raspberry Pi surveillance camera so that you can view the camera feed on it.

You can pick the perfect LCD or touchscreen compatible with the Pi from Amazon and other online stores.

Connect Rasberry Pi to IP Camera

Depending on your budget and needs there are a variety of options here, if you are on a tight budget, you can use a small size screen. Of course, if the budget is sufficient, you can try new features such as the touch screen, or choose a large screen to have a better IP camera live viewing effect.

  • Screen brand: Adafruit PiTFT, NeoSec, Tiny
  • Screen size: 3.5 inches, 5 inches, 7 inches, 11.5 inches (We recommend that the screen size is not less than 3.5 inches to ensure a good preview effect).
  • Other features: e-ink screen, touch screen
  • Buy on: Amazon, eBay

We don't recommend e-ink screens because, in our experience, their refresh rate is usually too low and they don't have enough colors.

Touch screen is a cool new feature that you can try on a budget, but I want to make it clear that touch screen is not a must-have option in this project.

Step 2. Install Raspbian OS or NOOBS for your Pi.

Install Raspbian, the officially supported Raspberry Pi operating system, for your Pi. Or you can use NOOBS, a simple Raspbian installer to help you set up the raspberry Pi IP camera software.

To install Raspbian:

  1. Download the Raspbian CD image on your computer, both Mac and PC.
  2. The Raspbian CD image is compressed, so you will need to uncompress it.
  3. Download the CD-ROM writer, insert the microSD card, and write the CD-ROM image on your computer.
    • For MAC users, please use the program that comes with your system.
    • For Windows users, please use Win32 Disk Imager.
    • For Linux users, please use Etcher.
  4. Insert the microSD card into the Pi and start it up with the default username and default password of Raspberry Pi.

Or install NOOBS:

Installing NOOBS may be a simpler operation, and you can even purchase a SD card with NOOBS pre-installed.

If you want to install NOOBS yourself, here are some steps to guide you.

  1. Download NOOBS and unzip it. The NOOBS file you downloaded is in .zip file format, so you have to unzip it first.
  2. Insert the SD card into your computer and format it to FAT.
  3. Simply drag the NOOBS file to the newly formatted SD card. Note that it is the uncompressed file.
  4. Simply insert the SD card into your Raspberry Pi and boot the disk. After booting to NOOBS, you will see a menu where you can select the operating system you want to install on the Pi.

Step 3.Set your Raspberry Pi IP camera to WiFi network connection.

Then your Raspberry Pi IP camera will need an Internet connection. It is best to set up WiFi on it so that you can run your Pi without a monitor, and you can use the IP address, username and password to make a remote SSH connection.

To set up WiFi for your Raspberry Pi, you will need to connect your screen, keyboard, mouse, and WiFi adapter to the Pi, and then log into your terminal. Set up the adapter, then enter your WiFi network information so the adapter knows how to connect to WiFi. If you have questions, you can turn to the Raspberry Pi forums for advice.

Step 4. Reboot to test if the WiFi is working properly.

Use the command to reboot your Pi and test to see if your Pi is actually WiFi enabled.

sudo reboot

Step 5.Get the IP camera username, password and video IP address.

Assume that your IP camera is already in proper working condition. Get the username and password of  your Raspberry Pi IP camera, they are used for authentication when accessing the video stream on the IP camera in step 7.

If your IP camera is newly purchased, here are what you need to do.

  • Turn on the camera, according to the instruction manual.
  • Open the phone App and use the IP camera to scan the QR code on the phone screen according to the instructions. Perform binding.
  • If you are using a computer Client, follow the instructions and use the IP camera to scan the QR code on the computer screen to bind.
  • Set the WiFi password according to the instructions to make the IP camera work properly.

If you have forgotten your password, the only way is to reset the IP camera to the default password. You can usually find it on the back of the camera or inside the user manual.

You can get the video IP address of the IP camera in the mobile App, or the Client on the computer.

Step 6.Install a suitable video player software.

Select a suitable player to use as a Raspberry Pi IP camera viewer. There are many video playing software on Raspberry Pi, here we recommend some common ones for you to choose. Note that you should choose one that can play video based on IP address, or one that can play video based on RTSP address.

Commonly used Raspberry Pi video player software recommended.

  • VLC Media Player
  • KODI
  • OMXPlayer or MPlayer

Install VLC Media Player
Here's the command to install VLC Media Player.

sudo apt install -y vlc

VLC Media Player is one of the most commonly used multimedia software in the world. In most cases, Windows PC users prefer to watch videos on VLC Media Player. However, this application supports Linux environments that are just as powerful as the Windows operating systems. It can even play 4K Ultra HD videos; but you have to watch out for the lag problem.
Install KODI
Here's the command to install KODI.

sudo apt-get update

sudo apt-get install kodi

With a rich selection of plugins, KODI is one of the most famous and widely used media players for the Raspberry Pi. KODI's main purpose is to run local as well as web-based media files on a larger screen. Over time, with frequent updates, this media player began to attract the attention of Raspberry Pi users worldwide.
Install OMXPlayer
Here's the command to install OMXPlayer.

sudo apt-get install omxplayer

If you are using the official Raspbian operating system, then OMXPlayer is already included in the system. Even if you don't have Raspbian or you have an older version of OMXPlayer, you can easily download and install it on your Pi 3. Please note that OMXPlayer does not have a user interface, which means you need to use some command line code to make it play videos.

Step 7.Access the video stream of the IP camera.

Start accessing the Raspberry Pi security camera video stream from the player. Make sure to change the IP address, username and password to match your IP camera.

Remember the three things we got in step 5 above? The username, the password and the IP camera's IP address.

Now we are going to access the IP camera's video stream on the Raspberry Pi by using these three things.
For Video player with user interface(for example VLC Media Player)

  • First start VLC: Start menu -> Sound and Video -> find VLC Media Player
  • Then set the address of the video stream: Go to Media >> Open Network Stream >> Network
  • Input the RTSP url.
  • The RTSP URL should be:

    Main Stream: rtsp://admin:password@ip_address:554//h264Preview_01_main
    Sub Stream: rtsp://admin:password@ip_address:554//h264Preview_01_sub

For Video player without user interface(for example MPlayer)
Simply type in the command below to start viewing your camera feed. Change the IP address, username and password to match your camera:

mplayer fbdev2:/dev/fb1 ”http://192.168.1.9:90/videostream.asf?user=USERNAME&pwd=PASSWORD”

Note that for different software, their command line code is also slightly different.

Done! After a while you can see the live Raspberry Pi IP camera stream. If that fails, try installing MPlayer again or check if the IP camera network is working properly.

Use Raspberry Pi as an IP Camera Sever

Most IP cameras require support of a central network video recorder (NVR) to handle the recording, video and alarm management.

Fortunately, you can choose to install the following software commonly used on Raspberry Pi to implement the server function.

To use the Raspberry Pi as an NVR with an IP camera, our software recommendations are as follows.

1. Shinobi

Shinobi introduction: Shinobi as an open source CCTV solution is developed using Node.js (server-side JavaScript). The project is very active and has two versions: Community and Pro, however, you can also use the Pro version for personal use.

Installation requirements: Your camera should be an IP device and should be ONVIF compliant.

Supported features: Recording and IP camera management.

2. MotionEyeOS

MotionEyeOS Introduction: MotionEyeOS, a free open-source application, allows you to turn a Raspberry Pi with a camera into a home video monitoring system, where the photos and videos can either stay on your device (and home network) or, if you choose, be uploaded automatically to a cloud-storage service such as Google Drive or Dropbox.

Installation requirements: The protocol of the IP camera should support RTSP.

Supported features: Frame rate, screen text, automatic screenshot/recording, motion monitoring, etc.

How to set up MotionEyeOS?

  • Download the image file and use Win32DiskImager to write the image.
  • Initial IP configuration default DHCP, you can go to the router management page to find the device IP. The default device name is ‘meye + random string'.
  • After you find it, browser directly accesses the LAN IP. The default administrator username is ‘admin' and default password is empty.
  • Click the plus sign in the upper left corner to add a camera, select IP camera in thedrop-down menu, and choose RTSP as the protocol.
  • Fill in the RTSP stream address and the authenticated user name password.

3. PiNVR

Introduction: PiNVR allows users to view, record and control cameras using Raspberry Pi. Its basic version is free for personal use, no registration required.

Installation requirements: Support for ONVIF-compatible IP cameras.

Supported features: Recording and IP camera management.

Note: Please note that the three solutions described above can be suitable for personal DIY solutions, but they are not recommended for long-term video surveillance, home security or corporate use. Because the GPU performance of Raspberry Pi is very limited, and long-term operation will make the chip generate a lot of heat. If you install a fan cooler, it will generate a lot of noise. Also, the operation is not stable.

Editor's Choice:

We recommend customers with home security, enterprise security needs to choose mature NVR products. We recommend the Reolink NVR, which is easier to set up, has a more user-friendly interface, and has a comprehensive after-sales service team and warranty policy for 2 years’ limited warranty.

 

Connect IP Cameras to Raspberry Pi: Things to Consider

When you decide to connect IP cameras to Raspberry Pi, make sure you have the proper equipment. You should also ensure that the IP address you record and use is correct. You can check this through the command prompt in Raspberry or through the main Raspberry interface that displays your connection information.

To turn off your Raspberry Pi, avoid unplugging the power cord. You can use the following command:

pi@raspberrypi~sudo shutdown now

Is Using a Pi as a Security Camera the Best Option?

”There are lots of ready-made IP cameras on the market and I was just wondering whether these might be a better option (practically or cost-wise).”

If you're willing to go through the learning curve and have the required equipment at hand, it's a good try to set up your own Raspberry Pi security camera.

However, if you are looking for a Raspberry Pi network camera solution for extra HDD storage or distant monitoring (200 feet or so), there could be easier solutions.

For example, the PoE security IP camera can be connected to the NVR for 2TB and more storage and placed up to 220 feet away with a simple Ethernet cable connection.

And after you connecting the NVR system to a monitor, the live view will just appear – No software or IP camera configuration needed.

Issues with a DIY Raspberry Pi Security Camera

One of the best parts of a Raspberry Pi surveillance camera is low-costing. Raspberry Pi, a tiny, affordable computer, can be used for video monitoring along with a cheap IP camera.

However, there are also downsides of this the Raspberry Pi IP camera system.

1. Blurry Images

The Raspberry Pi IP camera recording is a little fuzzy, compared to videos/images of HD security cameras, which could reach 4MP, 5MP or even 4K images these days at an affordable price.

2. No Multi-Screen Viewing

Unlike the NVR security camera system, the Raspberry Pi security camera kit can't be manipulated altogether. That's to say, through the Raspberry surveillance camera monitor, you can't see several cameras at the same time.

3. Complex Installation

The whole installation for Raspberry Pi based security surveillance camera is far more complicated than that of the PoE or WiFi IP cameras, which are real plug-and-play.

To make the installation even easier, many people have switched their IP camera on Raspberry Pi to the battery powered wire-free cameras which can be setup for live view and motion detection in 5 minutes!

Final Thoughts About Raspberry Pi IP Camera

In summary, setting up a Raspberry Pi surveillance camera is useful and cost-efficient to providing video surveillance for home. But if you want more, like the Raspberry Pi motion camera, or the Raspberry Pi with night vision, etc, a professional and high quality home security camera is a better choice.

46 thoughts on “7 Simple Steps: Connect Raspberry Pi to IP Cameras Easily

    • Reolink says:

      Streaming it on the internet will need further attempts, and we fail to make it happen at the moment . But watch IP camera live stream from any browser can be realized easily. If you are using a Reolink IP camera, you can access the live videos on IE 10, IE 11, Edge, Google Chrome, Firefox, Safari, with simple clicks.

      • Kuan Wai Lai says:

        I am currently doing it with xiao mi yi home camera since it is what I have at the moment and actually considering other models depending on its price and functions that able to be used by rpi (for instance, audio output, file transfer (clip that recorded during movement detection), and perhaps status signals from IP camera to rpi). I used apache2 with VLC, only Firefox is still supporting the VLC plug-in. I shall look into Reolink IP camera for its spec, thank you for your information and kindly share with me when you successfully stream it on the internet. Thank you in advance!

  1. jtrpop says:

    You should look into Orchid for the Raspberry Pi Free with unlimited retention & cameras. I have it running on my Raspberry Pi 3 connected to 8 ReoLink cameras. Seems to work fine at about 4 cameras regardless of resolution, but adding more makes the Orchid service restart when trying to access the web page viewer. RAM & CPU usage is very low, so its not a hardware issue. Until they work out the kinks with Orchid and more cameras, I have it as my backup NVR recording to a 500g attached drive recording the secondary lower bandwidth stream.

    • mike says:

      I have 4 Reolink IP cameras (RLC-420 and 410) and I could not get the cameras to join the Orchid server on my Raspberry Pi 3. Is there a special configuration I need to do to get this working?

  2. Jim Johnson says:

    What's the entire string to use for mplayer to a Reolink camera? I tried this with the correct IP, port, username, and password, but it doesn't work:
    mplayer fbdev2:/dev/fb1 ”http://192.168.77.199:9000/videostream.asf?user=admin&pwd=PASSWORD”

  3. Reolink says:

    Hi Steven, our team is now testing all Reolink cameras, including the 410 model, on their compatibility with Raspberry Pi. As you can see, some users have successfully added Reolink cameras to their Raspberry Pi system, but we still need to do a further test for detailed information.

    And here is a video that might be helpful: https://www.youtube.com/watch?v=Y2QFu-tTvTI . If you have any questions during the connection, please leave your comment here and we'll discuss together.

  4. Ty Hero says:

    I have a wireless home network set up through access points.
    2 cams to transmitter than from receiver through cat 6 into a router.
    My question is, am I able to view cameras on a monitor using a raspberry pi as a camera lan connection to video?

  5. Anb Bna says:

    Can Raspberry Pi connect 4 IP camera and save video on it by connect 2 hard drive or network map.
    at this time Raspberry will become surveillance station ( look like surveillance station app in Synology ).

    Thank you

    • Amanda says:

      Hi there, it theoritically works, but remember to get the external HDD with a USB cable and its own power supply. Otherwise, the Raspberry Pi will not have enough power to run it. You may try and share with us the results! : )

      • Motiondetection.be says:

        Yes, such a setup will work.
        Keep in mind: might be a good idea to disable WiFi as it will use the same USB bus as the HDD.
        Disabling the WiFi will also consume less power.

  6. Satish Singh says:

    Can we connect 4K IP camera, my need is to cover long distance like 220 ft and I ahve 4K camera which covers 200 ft distance. Can we connect IP or non IP 4K camera with Raspberry ..?
    Please suggest.

  7. Jared says:

    I have a Hikvision doorbell (rca-branded) that I'd like to set up the Pi3 for...specifically as a monitor for my wife and kids to be able to see who's at the door before they open it. The doorbell runs wirelessly through Blue Iris now. This possible?

  8. Amanda says:

    Hi there, yes, as long as you have applied Reolink cameras that supports RTSP and HTTP protocol (B800, battery-powered security cameras & WiFi security systems excluded). You may check out the two links below and learn how to set up motion detection from Reolink cameras on RPi: https://cdn.reolink.com/wp-content/uploads/2019/09/reolink-cam-motion-detection-signal-rpi-1.png & https://cdn.reolink.com/wp-content/uploads/2019/09/reolink-cam-motion-detection-signal-rpi-2.png. Feel free to contact us if you need further assistance. 🙂

    • Jean-Michel Binette says:

      Hi,

      Is it possible to have access to the document you are referring to with the snapshots ?
      I am greatly interested

      Regards

        • Jean-Michel Binette says:

          Hi,

          I am trying to integrate trigger events in SmartThings. That is why I asked and interested with the features available from url.

          Also, is reolink planning on releasing SmartTHings support or Device Handlers ?

          Thanks,

          • Amanda says:

            Hello Jean, I have talked to our R&D team about your request and they figure out that you can only connect Reolink cameras to the SmartThings platform with a third-party cloud. So, it would be rather difficult for you to set it up alone.
            We don't have any plans on releasing the SmartThings support as of now. We will let you know if there any updates. Thank you for your support! 🙂

          • Jean-Michel Binette says:

            Hello Amanda,

            Thank you for your answer 🙂

            I want to use a third party (Raspberry Pi).
            That is why I asked if I could get access to the document you used to extract the ”GetMdState” function. It would be useful for the programming of a solution.

            Same thing applies for an API, would be greatly appreciated! Do you know if one exists ?

            Thanks

          • Amanda says:

            Hello Jean, you can connect Reolink PoE & WiFi IP cameras (B800, E1, battery-powered cameras & WiFi security system excluded) to Raspberry Pi with the document below, https://cdn.reolink.com/wp-content/uploads/2019/11/reolink-cam-getmdstate-1.png, https://cdn.reolink.com/wp-content/uploads/2019/11/reolink-cam-getmdstate-2.png.
            If you don't want to request via token, you may replace the token with the username and password as the document that I share with RPiNovice. Hope this helps.

          • Eng A Qattan says:

            Hi all
            if I like to use GetMdState from NVR,,, like to get from one cam out of 4
            can I use it with specific cam i.e. ch2 for example

          • Amanda says:

            Hi there, it depends on whether your NVR supports this feature or not. Please take a screenshot of your NVR info via the Reolink app or Reolink Client and send it to lorenz@reolink. com (Lorenz is one of our marketing team members). We will send you the CGI-API document asap when we confirm your NVR does support this feature. Hope this helps.

          • Amanda says:

            Hi Alex, Lorenz was on a holiday leave a few days ago and she has just sent the documentation to you via email. Please check your email later and let us know if you have any questions. 🙂

  9. Richard Plenty says:

    I would like to project my 4K reolink camera live 24X7 (or the new 810A) on a 4K Smart TV full screen (HDMI). I have a great mountain view. I have the 4K NVR. Can I use a Pi for that?

    • Amanda says:

      Hello Richard, you may not use Pi for that now since the 4K NVR system doesn't support live stream in 4K via RTSP or RTMP stream now. Hope this helps.

  10. Royal Pro says:

    This is okay and all but saying its not possible to view multiple cameras seems unfair. I have displaycameras running on a raspberry pi and it can do 6 streams at once. Why can't we have a reolink program for the raspberry pi? It's possible to run and record if you have the proper hardware. Granted this was written atleast 4 years ago but an update would be awesome!

  11. Amanda says:

    Thank you for your sharing! We appreciate your work a lot and hope this will help others who are looking for the same solution. 🙂

  12. John Huntington says:

    Thanks so much for this blog post. I'm trying to get a Pi to display a stream from a brand new E1 Zoom Reolink camera. I have VLC installed on the Pi and I can ping the camera from the Pi so I know it can see it on the network. The string rtsp://admin:[password]@192.168.1.226:554//h264Preview_01_main works on VLC on my PC, but whenever I try to connect via VLC on the Pi I get an error, ”Your input can't be opened: VLC is unable to open the MRL... Check the log for details” Unfortunately it's not creating a log file (I went into VLC and changed the log directory/filename to one that I know but there's nothing there). Any suggestions? Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

sales

Limited-time

Up to 15% OFF Reolink smart security cameras