Datastead Encoder




Datastead Encoder


The Datastead Encoder is a new set of codecs allowing to:

- compress video in various formats including MPEG4, MJPEG, H264, HEVC, eventually by using the GPU encoder if available (NVidia, AMD and Intel Quicksync supported),

- compress audio in various formats including AAC, Mpeg2

- record to file in various container formats (.avi, .mp4, .mkv, etc...),

- stream in various formats like UDP, RTMP, RTP, etc...

The Datastead Encoder requires the Datastead Multipurpose Encoder version 2 or newer to be installed, however it does not launch FFmpegLGPL.exe, nor requires to run any external process.

One or more Datastead Encoder instances can be associated with a given TVideoGrabber component (e.g. an encoder instance performing the recording and another instance performing the streaming of the same TVideoGrabber instance)

A Datastead Encoder instance can record what is being displayed/rendered to a file, or send a live stream to the network.

When adding an Encoder instance, it returns an unique ID that is then used to configure this instance.


To install it:

- option 1:

run the .exe installer located in the "Install" folder of the Multipurpose Encoder package. Then TVideoGrabber will locate the binaries automatically.

- option 2:

copy the x86 and x64 folders containing the encoder binaries:

- either directly under the folder where is located the application's ".exe", e.g.:

Example of layout:


- either to another folder, that you specify with VideoGrabber.ExtraDLLPath

VideoGrabber.ExtraDLLPath = "c:/AnotherFolder"

and the corresponding layout:



Note: the instance and parameters must be configured before starting the video.

Creating and configuring an instance

- to create an instance that will write to a file, invoke Encoders_CreateInstanceForRecording

- to create an instance that will stream to the network, invoke Encoders_CreateInstanceForStreaming

Both functions return an unique ID that is attribued when creating the instance.

To configure then encoder, this ID must be passed to Encoder_SetStr and Encoder_SetInt.

While the video is running:

- the instance can be paused with Encoder_Pause and resumed with Encoder_Resume

if recording:

- the current file being written can be closed and a new file opened by invoking Encoder_NewOutputFile

- the current file being written can be closed by invoking Encoder_CloseOutputFile

- the total amount of bytes written can be read with Encoder_GetInt (Enc_Bytes_Written_kb_readonly, ...)

Once the video is stopped (VideoGrabber.Stop()):

- an encoder instance can be eventually removed by invoking Encoders_RemoveInstance, otherwise it will be active again when restarting the video.

- to remove all the encoders instances associated with a TVideoGrabber component invoke Encoders_RemoveAllInstances

Restarting the video after stopped

If an instance is not removed it will be active again when restarting the video.

So if it is configured for recording, this will overwrite the current recording file, unless a new file is specified with Encoder_NewOutputFile before invoking StartPreview()


The recording is described in Recording through the Datastead Encoder


The streaming is described in Streaming through the Datastead Encoder

See Also
Pause/resume during recording Recording methods and properties Encoder_GetInt Encoder_Pause Encoder_Resume Encoder_SetInt Encoder_SetStr Encoders_CreateInstanceForRecording Encoders_CreateInstanceForStreaming Encoders_RemoveAllInstances Encoders_RemoveInstance