0
Skip to Content
Home
RapidPixel SDK
Consulting
Constant Robotics
Constant Robotics
Home
RapidPixel SDK
Consulting
Constant Robotics
Constant Robotics
Home
RapidPixel SDK
Consulting
Home VOutputV4L2 C++ lib. Simple interface to write video frame to V4L2 output devices
voutput4l2_thumbai.png Image 1 of
voutput4l2_thumbai.png
voutput4l2_thumbai.png

VOutputV4L2 C++ lib. Simple interface to write video frame to V4L2 output devices

€600.00

VOutputV4L2 C++ library version 1.0.4 provides video output based on V4L2 API for Linux OS.

We sell source code of this library as is, without future updates and technical support according to perpetual non-exclusive royalty-free license. You pay once and can use this library in your software and hardware products without limits. Please read the license agreement before purchasing: LICENSE. You can buy technical support service for this product.

Add To Cart

VOutputV4L2 C++ library version 1.0.4 provides video output based on V4L2 API for Linux OS.

We sell source code of this library as is, without future updates and technical support according to perpetual non-exclusive royalty-free license. You pay once and can use this library in your software and hardware products without limits. Please read the license agreement before purchasing: LICENSE. You can buy technical support service for this product.

Technical support service technical_support_thumbai.png (Copy) technical_support_thumbai.png (Copy)
Technical support service
from €700.00
Options:

VOutputV4L2 C++ library version 1.0.4 provides video output based on V4L2 API for Linux OS.

We sell source code of this library as is, without future updates and technical support according to perpetual non-exclusive royalty-free license. You pay once and can use this library in your software and hardware products without limits. Please read the license agreement before purchasing: LICENSE. You can buy technical support service for this product.

Purchase options

You can buy the software by bank transfer. Bank transfer available only for companies. To buy software by bank transfer please send us request to info@constantrobotics.com. Also, you can buy technical support service for this product.

Downloads

Programmer’s manual: DOWNLOAD

Overview

VOutputV4L2 C++ library provide interface to write video frame to V4L2 video devices in Linux OS. An example of a video device is v4l2loopback device (virtual video devices). Normal (v4l2) applications will read these devices as if they were ordinary video devices, but the video will not be read from e.g. a capture card but instead it is generated by user's application. Using the library user's application can be as video source for third-party processes. The library provides simple interface. It depends on open source Frame library (describes video frame structure and pixel formats, source code included, Apache 2.0 license) and open source Logger library (provides functions to write logs, source code included, Apache 2.0 license). The library supports C++17 standard and works only on Linux with V4L2 API support. The library supports C++17 standard. Additionally test application depends on OpenCV library to provide user interface.

Simple interface

namespace cr
{
namespace video
{
/// V4L2 video output device class.
class VOutputV4L2
{
public:

    /// Get library version.
    static std::string getVersion();

    /// Class constructor.
    VOutputV4L2();

    /// Class destructor.
    ~VOutputV4L2();

    /// Open device.
    bool open(std::string device);

    /// Write video frame to device.
    bool write(Frame& frame);

    /// Set log level.
    void setLogLevel(cr::utils::PrintFlag flag);

    /// Close device.
    void close(void);
};
}
}

Simple example

#include <iostream>
#include "VOutputV4L2.h"

int main(void)
{
    // Open video device.
    cr::video::VOutputV4L2 videoOutput;
    if(!videoOutput.open("/dev/video4"))
        return -1;

    // Create YUV frame with certain resolution.
    cr::video::Frame frame(640, 480, cr::video::Fourcc::YUV24);

    // Main loop.
    uint8_t value = 0;
    while (true)
    {
        // Fill image by color.
        memset(frame.data, value++, frame.size);

        // Write frame to device.
        if(!videoOutput.write(frame))
            std::cerr << "Cant' write frame" << std::endl; 

        // 33ms delay for 30 fps stream
        std::this_thread::sleep_for(std::chrono::milliseconds(33));
    }
    return 1;
}

You Might Also Like

VSourceLibCamera C++ lib. Video capture and video source control based on Libcamera API
VSourceLibCamera C++ lib. Video capture and video source control based on Libcamera API
€1,500.00
VSourceV4L2 C++ lib. Video capture and video source control based on V4L2 API
VSourceV4L2 C++ lib. Video capture and video source control based on V4L2 API
€1,500.00
VSourceOpenCv C++ lib. Video capture and video source control based on OpenCV
VSourceOpenCv C++ lib. Video capture and video source control based on OpenCV
€200.00

ABOUT US

ConstantRobotics conducts scientific research in video processing, control protocols, and data exchange. Our diverse team of engineers develops software libraries and applications to simplify complex problems. Customers can test our libraries on their own data before making a purchase. Detailed documentation is available on our website. Our main focus is creating real-time algorithms that run on any platform.

CONTACTS

ConstantRobotics Sp. z o.o. Warsaw, Poland, VAT ID: PL5252930273, info@constantrobotics.com

LICENSES FOR SOFTWARE

Our software libraries are distributed under perpetual licenses. We don't restrict distribution of software libraries as a part of your hardware and software products. Our library prices are the same for all our clients and are based on the following principle: you can create a counterpart of our algorithms with the same or better characteristics, but the cost of your own research will be significantly higher than buying ready-made libraries. By purchasing our libraries you get a solution with proven performance. Two licenses are available for our products: a perpetual license for the compiled version of the library and a perpetual license for the source code. You pay once at the time of purchase. Download licenses:

  • LICENSE FOR SOURCE CODE OF SOFTWARE

  • LICENSE FOR COMPILED VERSION OF SOFTWARE

SEND US MESSAGE

Thank you! We will connect you soon.


© 2025 ConstantRobotics

Privacy Policy | Terms & Conditions | Archive