A Draft.VideoEncoder is used to create videos and a Draft.VideoDecoder is used to extract frames from videos.

Implementation Details

Video Encoder

When creating a Draft.VideoEncoder you can specify many parameters including the video’s framerate, kbit rate and codec. For a complete list, please consult the constructor VideoEncoder(). Once your Draft.VideoEncoder is created, you can encode each frame using the method EncodeNextFrame().

Supported Codecs

Draft supports multiple codec options. They include:

  • MPEG4 (default)
  • H264

Video Files Concatenation

It’s possible to concatenate video files using the function ConcatenateVideoFiles() by providing a list of input files and an output file. Note that the input files must all share the same codec and all have the same file extension than the output file.

Video Decoder

When creating a Draft.VideoDecoder you must specify the filename of the video you want to decode. Once your Draft.VideoDecoder is created, you can decode each frame using the method DecodeNextFrame().