class cv::cudacodec::VideoWriter

Overview

Video writer interface. Moreā€¦

#include <cudacodec.hpp>

class VideoWriter
{
public:
    // methods

    virtual
    EncoderParams
    getEncoderParams() const = 0;

    virtual
    void
    write(
        InputArray frame,
        bool lastFrame = false
        ) = 0;
};

Detailed Documentation

Video writer interface.

The implementation uses H264 video codec.

Currently only Windows platform is supported.

  • An example on how to use the videoWriter class can be found at opencv_source_code/samples/gpu/video_writer.cpp

Methods

virtual
void
write(
    InputArray frame,
    bool lastFrame = false
    ) = 0

Writes the next video frame.

The method write the specified image to video file. The image must have the same size and the same surface format as has been specified when opening the video writer.

Parameters:

frame The written frame.
lastFrame Indicates that it is end of stream. The parameter can be ignored.