Implementing Video Monitoring Capabilities by using hardware-based Encoders of the Raspberry Pi Zero 2 W Journal: SoftwareX
Thomas Ederer ,, Igor Ivkić , · 2025
Read Implementing Video Monitoring Capabilities by using hardware-based Encoders of the Raspberry Pi Zero 2 W Journal: SoftwareX by Thomas Ederer ,, Igor Ivkić , (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-12487.txt.
Introduction
Thomas Ederer and Igor Ivkic present a 2025 paper on video monitoring with a tiny, low-cost computer board. Single-board computers are cheap and flexible tools for watching wildlife and plants in the field. A newer small board adds built-in hardware for encoding images and video, which opens the door to live video tasks.
Their solution moves video encoding off the main processor and onto that hardware. They trace the data flow through the encoding app and cut needless copying of image data to speed things up. An underwater camera example shows the feature in action. The work extends cheap field gear to true video surveillance.
Catalog record
| CREATOR | Thomas Ederer ,, Igor Ivkić , |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 16 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2507-12487
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Implementing Video Monitoring Capabilities by using hardware-based Encoders of the Raspberry Pi Zero 2 W Journal: SoftwareX Thomas Ederer ,, Igor Ivkić , Abstract Single-board computers, with their wide range of external interfaces, provide a cost-effective solution for studying animals and plants in their natural habitat. With the introduction of the Raspberry Pi Zero 2 W, which provides hardware-based image and video encoders, it is now possible to extend this application area to include video surveillance capabilities. This paper demonstrates a solution that offloads video stream generation from the CPU ( CPU ) to hardware-based encoders. The flow of data through an encoding application is described, followed by a method of accelerating image processing by reducing the number of memory copies. The paper concludes with an example use case demonstrating the application of this new feature in an underwater camera. Metadata Nr. Code metadata description Please fill in this column C1 Current code version v0.4.0 C2 Permanent link to repository https://github.com/tederer/octowatch-videoservice C3 Permanent link to Reproducible Capsule https://github.com/tederer/octowatch-videoservice/tree/v0.4.0 C4 Legal Code License MIT License C5 Code versioning system used git C6 Software code languages, tools, and services used C++ C7 Compilation requirements, operating environments & dependencies Raspbian GNU/Linux 12(bookworm) C8 Link to developer documentation/manual https://underwater-camera-project.github.io C9 Support email for questions [email protected] Table 1: Code metadata 1 Motivation and Significance The study of animals and plants in their natural habitat requires undisturbed observation, as this is the only way to ensure the collection of reliable data. The observational data collected helps to better understand how they function within the ecosystem and can be used to advocate for the protection of threatened environments. To achieve this goal, researchers in the field of biology jolles2021a , allan2018 are already using inexpensive single-board computers such as the Raspberry Pi mathe2024 , nayyar2015 to build measurement and control systems. Previous publications almero2021 , cazenave2014 , coro2021 , dadios2022 , huang2018 , jury2001 , mouy2020 , novy2022 , phillips2019 , purser2020 , giddens2021 , lertvilai2020 , ambroz2017 , baghdadi2023 demonstrate the wide range of applications for the Raspberry Pi . These projects have in common the connection of a camera module to a single-board computer. Software executing on the CPU of the computer is responsible for converting the camera’s raw images into a video stream. However, this type of video generation consumes computing time of the CPU , which cannot be used for other tasks. The following figure shows a comparison of software- and hardware-based JPEG ( JPEG ) encoders. Figure 1: Comparing the Encoding Time required for Converting Raw Camera Images (YUV420, 800 x 600 pixels) to JPEG Format using various Encoding Methods. The performance of the encoding was evaluated by measuring the time taken to encode 1,000 images. Before using the images, they were converted to the output format (YUV420) of the camera module, and then each image was encoded 100 times. The time required for this process was measured, and the results demonstrated that the speed of libjpeg9 is not sufficient to produce a video stream with 30 frames per second. Using libjpeg62-turbo is a viable option; however, it occupies one CPU core almost entirely. The optimal solution is to perform the encoding of the images in hardware, as this is fast (approximately 4 milliseconds per image) and reduces the load on the CPU . In our previous publication ederer2024a , we demonstrated a way to overcome this limitation by using the hardware-based image and video encoders of the Raspberry Pi Zero 2 W for video stream generation. An underwater camera for remote monitoring of octopuses in the northern Adriatic Sea was developed to generate two video streams: one for local recording and another integrated into a web page for remote access via the Internet. This eliminates the necessity of observers being on-site, thereby reducing the on-site presence and assisting research projects in undertaking their observations in a more cost-effective manner. The following figure shows the housing (made of water pipes) of the underwater camera and its components mounted in an adaptable installation framework: Figure 2: Underwater Camera using the hardware-based Image and Video Encoders of the Raspberry Pi Zero 2 W for Video Stream Generation. This paper is a continuation of ederer2024a and shows how to use the hardware-based video and image encoders of the Raspberry Pi Zero 2 W to integrate video surveillance capabilities into existing measurement and control tasks. First, we present the overall software architecture of the video service and explain how the data flow is used to generate two video streams from a sequence of raw images. Next, we discuss the effectiveness of the underlying framework in minimizing image copying. Finally, we show how a combination of implemented software and freely available hardware components can be used to provide two independent video streams in an underwater camera. 2 Software description The purpose of the Video Service is to convert the images from the camera module into two independent video streams and make them available over the network. At startup, the service configures the camera module and then waits for images from the scene in front of the camera. Each image received is passed to the hardware-based encoders for conversion to H.264 and MPJPEG ( MPJPEG ) formats, which generate a sequence of NAL ( NAL ) packets (for H.264) and JPEG images (for MPJPEG ). Before the packets are sent, each JPEG image must be augmented with additional data so that it can be processed by the receiver as a MPJPEG video stream. The converted data can be consumed independently of each other via separate network ports. 2.1 Software architecture The software is designed as a Linux service implemented in the programming language C++ on top of the libraries libcamera (v0.4.0), Boost.Asio (1.82.0) and the V4L2 ( V4L2 ) API ( API ) (linux-libc-dev:6.1.140-1). The object-oriented interface of libcamera reduces the time taken to integrate camera modules into applications by hiding device-specific implementation details. Figure 3 illustrates the software stack of the Video Service consisting of existing components (light grey) and those to be implemented (dark grey). Figure 3: Software stack of the Video Service, consisting of existing Components (light grey) and those to be implemented (dark grey). As hardware-based encoders are not yet supported by the libcamera library, the underlying V4L2 API had to be used for this part of the implementation. The network communication components are based on Boost.Asio , which is a cross-platform C++ library for network and low-level I/O programming. It is possible to modify camera settings during runtime by utilizing the Remote Control Interface of the service. The core of the Video Service is a game loop valente2005 , which uses a number of components. At the consuming end the service receives two images in different resolutions from the camera module and transfers them to the corresponding encoder. This offloads image scaling from the CPU to the camera module. Images with a high resolution (1920 x 1080 pixels) are used to generate the H.264 video stream itut_h264 , while those with a lower resolution (800 x 600 pixels) are used to generate the MPJPEG video stream. Furthermore, the multipart streamer component adds metadata borenstein1992 to each JPEG image to enable web browsers to