Router Becomes Video Recorder for IP Cameras

Some routers have powerful CPU and USB-port on a board and can be used as a video recorder in addition to routing functions, in order for collect and distribute video and sound from IP-cameras that streams only H264/265 RTSP (as most modern cheap high resolution IP cameras). Moreover, some of routers CPU has DSP (digital signal processor), and so can be highly effective for a video stream decoding (change the resolution, the framerate, etc). As a storage can be used USB flash, USB-HDD, USB-SSD. A NAS in home network can be used too.

Not any router can be upgraded as here described, depend on used CPU and manufacturer's limitations of firmware reflashing. For example, was failed to upgrade the Mediatek MTK7621 based router. But was perfectly upgrade the router based on Qualcomm IPQ4018.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: On the Router Was Installed OpenWrt OS

On the router was installed OpenWrt OS in order to have Linux on a board. OpenWRT OS and the home network was deployed as described on the appropriate page of OpenWrt project for this router model.

Step 2: Dedian Buster, FFmpeg and Samba Was Deployed Within OpenWrt

The FFmpeg package was used for collect the stream from the IP camera and store that in files by piecemeal (2 minutes length of each part). OpenWrt OS haves FFmpeg build in, but this version not work with H264/265 stream at this moment, despite this stream type is most used in cheap high resolution IP-cameras.

But up on OpenWrt OS (lightweight Linux) can be installed Debian OS (fullweight Linux). Then fullweight FFmpeg package can be installed at Debian and this version can works with H264/265 stream from IP cameras.

First step was dramatically increased the memory of the router with a USB flash (but USB-HDD or USB-SSD is best). Same time, this storage can be used for video archive if no NAS in the home network. The Samba was installed.

Second step was installed fullweight Debian OS under debootstrap.

Third step the FFmpeg was installed.

Step 3: Connect IP Camera, Configure Crontab And... Thats All

The IP camera can be connected to the router wired or Wi-Fi.

Using ONVIF Device Manager was found the link to the camera's RTSP stream.

With noted RTSP link of the camera, the Crontab of OpenWrt was configured for save video from IP camera in files and for control of the video archive size.

That's all. Ever since this router is not only router, but video recorder too. Was no experiment with two ore more IP cameras, but test with one only IP camera do not show overload of the router's CPU.

The video archive can be shared not only in the home network, but with global access in Internet too. For make this, need to install FTP server in OpenWrt, and use router's port mapping with static IP, external IP, or temporary IP with alerts about them changes.

If the router's computer planned to use only as video recorder, then is good idea to switch off Wi-Fi radios on a board - will be less EM radiation and more power for USB.

Detailed instructions and commands case here.

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    Discussions