using the Datastead Encoder
Datastead Encoder
Description
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.
INSTALLATION
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:
c:/appfolder/application.exe
c:/appfolder/x86
c:/appfolder/x64
- either to another folder, that you specify with VideoGrabber.ExtraDLLPath
Example:
VideoGrabber.ExtraDLLPath = "c:/AnotherFolder"
and the corresponding layout:
c:/appfolder/application.exe
c:/AnotherFolder/x86
c:/AnotherFolder/x64
ACTIVATION AND CONFIGURATION
Note: the instance and parameters must be configured before starting the video.
RECORDING
The recording is described in Recording through the Datastead Encoder
STREAMING
The streaming is described in Streaming through the Datastead Encoder
CONFIGURATION OF THE ENCODER
The configuration is achieved through the Encoder_SetInt and Encoder_SetStr functions.
Example of various values that can be passed:
- to select the codec:
Encoder_SetStr (ENCODER_RECORDING_ID, Enc_Video_Codec, "mjpeg");
Encoder_SetStr (ENCODER_RECORDING_ID, Enc_Audio_Codec, "aac");
Encoder_SetStr (ENCODER_RECORDING_ID, Enc_Video_Codec, "mpeg4");
Encoder_SetStr (ENCODER_RECORDING_ID, Enc_Video_Codec, "mpeg2");
Encoder_SetStr (ENCODER_RECORDING_ID, Enc_Video_Codec, "jpeg");
Encoder_SetStr (ENCODER_RECORDING_ID, Enc_Video_Codec, "h264);
Encoder_SetStr (ENCODER_RECORDING_ID, Enc_Video_Codec, "hevc");
- to configure the GPU encoder (usually for the "h264", "hevc" or "mjpeg" codecs:
Encoder_SetInt (ENCODER_RECORDING_ID, , (int) Enc_GPU_Intel_QSV);
(possible values include Enc_GPU_None, Enc_GPU_Auto, Enc_GPU_Intel_QSV, Enc_GPU_NVidia_NVENC, Enc_GPU_AMD_AMF)
- to set the bit rate:
Encoder_SetInt (ENCODER_RECORDING_ID, Enc_Video_Bitrate_kb, 2000);
- to configure the bitrate control:
Encoder_SetInt (ENCODER_RECORDING_ID, Enc_Video_rc_BufferSize_kb, 1000);
Encoder_SetInt (ENCODER_RECORDING_ID, Enc_Video_MinBitrate_kb, 2000);
Encoder_SetInt (ENCODER_RECORDING_ID, Enc_Video_MaxBitrate_kb, 2000);
See Also
Datastead Encoder 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 SetDatasteadFilterDllName