View Source Evision.CUDACodec (Evision v0.1.34)
Summary
Functions
Variant 1:
createVideoReader
Variant 1:
createVideoReader
Creates video writer.
Creates video writer.
Creates video writer.
Creates video writer.
Types
@type t() :: %Evision.CUDACodec{ref: reference()}
Type that represents an CUDACodec
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
@spec createVideoReader(Evision.CUDACodec.RawVideoSource.t()) :: Evision.CUDACodec.VideoReader.t() | {:error, String.t()}
@spec createVideoReader(binary()) :: Evision.CUDACodec.VideoReader.t() | {:error, String.t()}
Variant 1:
createVideoReader
Positional Arguments
source:
RawVideoSource
.RAW video source implemented by user.
Keyword Arguments
params:
VideoReaderInitParams
.Initializaton parameters. See cv::cudacodec::VideoReaderInitParams.
Return
- retval:
VideoReader
Has overloading in C++
Python prototype (for reference only):
createVideoReader(source[, params]) -> retval
Variant 2:
Creates video reader.
Positional Arguments
filename:
String
.Name of the input video file.
Keyword Arguments
sourceParams:
[int]
.Pass through parameters for VideoCapure. VideoCapture with the FFMpeg back end (CAP_FFMPEG) is used to parse the video input. The
sourceParams
parameter allows to specify extra parameters encoded as pairs(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)
. See cv::VideoCaptureProperties e.g. when streaming from an RTSP source CAP_PROP_OPEN_TIMEOUT_MSEC may need to be set.params:
VideoReaderInitParams
.Initializaton parameters. See cv::cudacodec::VideoReaderInitParams.
Return
- retval:
VideoReader
FFMPEG is used to read videos. User can implement own demultiplexing with cudacodec::RawVideoSource
Python prototype (for reference only):
createVideoReader(filename[, sourceParams[, params]]) -> retval
@spec createVideoReader( Evision.CUDACodec.RawVideoSource.t(), [{atom(), term()}, ...] | nil ) :: Evision.CUDACodec.VideoReader.t() | {:error, String.t()}
@spec createVideoReader(binary(), [{atom(), term()}, ...] | nil) :: Evision.CUDACodec.VideoReader.t() | {:error, String.t()}
Variant 1:
createVideoReader
Positional Arguments
source:
RawVideoSource
.RAW video source implemented by user.
Keyword Arguments
params:
VideoReaderInitParams
.Initializaton parameters. See cv::cudacodec::VideoReaderInitParams.
Return
- retval:
VideoReader
Has overloading in C++
Python prototype (for reference only):
createVideoReader(source[, params]) -> retval
Variant 2:
Creates video reader.
Positional Arguments
filename:
String
.Name of the input video file.
Keyword Arguments
sourceParams:
[int]
.Pass through parameters for VideoCapure. VideoCapture with the FFMpeg back end (CAP_FFMPEG) is used to parse the video input. The
sourceParams
parameter allows to specify extra parameters encoded as pairs(paramId_1, paramValue_1, paramId_2, paramValue_2, ...)
. See cv::VideoCaptureProperties e.g. when streaming from an RTSP source CAP_PROP_OPEN_TIMEOUT_MSEC may need to be set.params:
VideoReaderInitParams
.Initializaton parameters. See cv::cudacodec::VideoReaderInitParams.
Return
- retval:
VideoReader
FFMPEG is used to read videos. User can implement own demultiplexing with cudacodec::RawVideoSource
Python prototype (for reference only):
createVideoReader(filename[, sourceParams[, params]]) -> retval
@spec createVideoWriter( binary(), {number(), number()} ) :: Evision.CUDACodec.VideoWriter.t() | {:error, String.t()}
Creates video writer.
Positional Arguments
fileName:
String
.Name of the output video file. Only raw h264 or hevc files are supported.
frameSize:
Size
.Size of the input video frames.
Keyword Arguments
codec:
Codec
.Codec.
fps:
double
.Framerate of the created video stream.
colorFormat:
ColorFormat
.OpenCv color format of the frames to be encoded.
encoderCallback:
EncoderCallback
.Callbacks for video encoder. See cudacodec::EncoderCallback. Required for working with the encoded video stream.
stream:
Evision.CUDA.Stream.t()
.Stream for frame pre-processing.
Return
- retval:
Evision.CUDACodec.VideoWriter.t()
Python prototype (for reference only):
createVideoWriter(fileName, frameSize[, codec[, fps[, colorFormat[, encoderCallback[, stream]]]]]) -> retval
@spec createVideoWriter(binary(), {number(), number()}, [{atom(), term()}, ...] | nil) :: Evision.CUDACodec.VideoWriter.t() | {:error, String.t()}
Creates video writer.
Positional Arguments
fileName:
String
.Name of the output video file. Only raw h264 or hevc files are supported.
frameSize:
Size
.Size of the input video frames.
Keyword Arguments
codec:
Codec
.Codec.
fps:
double
.Framerate of the created video stream.
colorFormat:
ColorFormat
.OpenCv color format of the frames to be encoded.
encoderCallback:
EncoderCallback
.Callbacks for video encoder. See cudacodec::EncoderCallback. Required for working with the encoded video stream.
stream:
Evision.CUDA.Stream.t()
.Stream for frame pre-processing.
Return
- retval:
Evision.CUDACodec.VideoWriter.t()
Python prototype (for reference only):
createVideoWriter(fileName, frameSize[, codec[, fps[, colorFormat[, encoderCallback[, stream]]]]]) -> retval
createVideoWriter(fileName, frameSize, codec, fps, colorFormat, params)
View Source@spec createVideoWriter( binary(), {number(), number()}, Evision.CUDACodec.Codec.t(), number(), Evision.CUDACodec.ColorFormat.t(), Evision.CUDACodec.EncoderParams.t() ) :: Evision.CUDACodec.VideoWriter.t() | {:error, String.t()}
Creates video writer.
Positional Arguments
fileName:
String
.Name of the output video file. Only raw h264 or hevc files are supported.
frameSize:
Size
.Size of the input video frames.
codec:
Codec
.Codec.
fps:
double
.Framerate of the created video stream.
colorFormat:
ColorFormat
.OpenCv color format of the frames to be encoded.
params:
EncoderParams
.Additional encoding parameters.
Keyword Arguments
encoderCallback:
EncoderCallback
.Callbacks for video encoder. See cudacodec::EncoderCallback. Required for working with the encoded video stream.
stream:
Evision.CUDA.Stream.t()
.Stream for frame pre-processing.
Return
- retval:
Evision.CUDACodec.VideoWriter.t()
Python prototype (for reference only):
createVideoWriter(fileName, frameSize, codec, fps, colorFormat, params[, encoderCallback[, stream]]) -> retval
createVideoWriter(fileName, frameSize, codec, fps, colorFormat, params, opts)
View Source@spec createVideoWriter( binary(), {number(), number()}, Evision.CUDACodec.Codec.t(), number(), Evision.CUDACodec.ColorFormat.t(), Evision.CUDACodec.EncoderParams.t(), [{atom(), term()}, ...] | nil ) :: Evision.CUDACodec.VideoWriter.t() | {:error, String.t()}
Creates video writer.
Positional Arguments
fileName:
String
.Name of the output video file. Only raw h264 or hevc files are supported.
frameSize:
Size
.Size of the input video frames.
codec:
Codec
.Codec.
fps:
double
.Framerate of the created video stream.
colorFormat:
ColorFormat
.OpenCv color format of the frames to be encoded.
params:
EncoderParams
.Additional encoding parameters.
Keyword Arguments
encoderCallback:
EncoderCallback
.Callbacks for video encoder. See cudacodec::EncoderCallback. Required for working with the encoded video stream.
stream:
Evision.CUDA.Stream.t()
.Stream for frame pre-processing.
Return
- retval:
Evision.CUDACodec.VideoWriter.t()
Python prototype (for reference only):
createVideoWriter(fileName, frameSize, codec, fps, colorFormat, params[, encoderCallback[, stream]]) -> retval