TEncoder_int
TEncoder_int = ( Enc_IsActive_bool, Enc_Bytes_Written_kb_readonly, Enc_Audio_Enabled_bool, Enc_Audio_Channels, Enc_Audio_SamplesPerSec, Enc_Audio_BitsPerSample, Enc_Audio_BitRate_kb, Enc_Audio_PCM_Format, Enc_Video_Enabled_bool, Enc_Video_Width, Enc_Video_Height, Enc_Video_BitCount, Enc_Video_AvgTimePerFrame, Enc_Video_BitRate_kb, Enc_Video_rc_MinBitRate_kb, Enc_Video_rc_MaxBitRate_kb, Enc_Video_rc_BufferSize_kb, Enc_Video_IDR_Interval, Enc_Video_Max_BFrames, Enc_Video_FrameRate_x100, Enc_IsRealTime_bool, Enc_IsScreenRecording_bool, Enc_Video_Thread_Count, Enc_Video_GPU_Encoder, Enc_Video_GPU_EncoderDevice, Enc_Video_Quality_min, Enc_Video_Quality_max, Enc_Playable_While_Being_Recorded_bool, Enc_Video_Sampling_Interval_Ms, Enc_Video_Sampling_FrameRate_x100, Enc_Video_Dropped_Frame_Count_readonly, Enc_Video_Encoded_Frame_Count_readonly, Enc_Video_IDR_Interval_Frames, Enc_Video_Profile, Enc_Video_Level, Enc_Video_LowLatency_bool, Enc_Video_MaxRefFrames, Enc_Video_RateControlMode, Enc_Video_H264_CABAC_Enable_bool, Enc_Video_Deblock_Enable_bool, Enc_Video_SlicesPerFrame, Enc_Video_IntraRefresh_Enable_bool, Enc_Video_IntraRefresh_Percent, Enc_Audio_Output_SamplesPerSec, Enc_Audio_Output_Channels );
Integer settings of the Datastead Encoder, set with Encoder_SetInt and read with Encoder_GetInt.
Set with Encoder_SetInt before starting the video, e.g. Encoder_SetInt (EncoderID, Enc_Video_BitRate_kb, 2000), and read with Encoder_GetInt.
These settings apply to the Datastead Multipurpose Encoder only (the "Datastead Multipurpose Encoder" entry of the VideoCompressors / AudioCompressors lists, and the encoder instances created by Encoders_CreateInstanceForRecording / Encoders_CreateInstanceForStreaming), not to the Media Foundation encoders of these lists.
Suffixes: _bool: 1 or 0; _kb: kbit/s for the bit rates; _x100: the value multiplied by 100 (Enc_Video_FrameRate_x100 = 1500 for 15 fps); _readonly: read with Encoder_GetInt only.
Audio: Enc_Audio_Channels, Enc_Audio_SamplesPerSec, Enc_Audio_BitsPerSample and Enc_Audio_PCM_Format describe the audio received by the encoder and are set from the audio source when the video starts. The encoded sample rate and channel count are set with Enc_Audio_Output_SamplesPerSec and Enc_Audio_Output_Channels (the audio is converted).
The string settings are listed in TEncoder_str, the GPU encoders in TGPUEncoder. See Recording through the Datastead Encoder and Streaming through the Datastead Encoder.
| Value | Description |
|---|---|
Enc_IsActive_bool |
1: the encoder instance is used when the video starts. Required for the instances created by Encoders_CreateInstanceForRecording / Encoders_CreateInstanceForStreaming (otherwise they are ignored); set automatically for the encoder ID 0 |
Enc_Bytes_Written_kb_readonly |
number of kilobytes written so far |
Enc_Audio_Enabled_bool |
1: the audio is encoded. Required for the instances created by Encoders_CreateInstanceForRecording / Encoders_CreateInstanceForStreaming; set automatically for the encoder ID 0 (AudioRecording) |
Enc_Audio_Channels |
number of channels of the audio received by the encoder, set automatically from the audio source. To encode another number of channels, use Enc_Audio_Output_Channels |
Enc_Audio_SamplesPerSec |
sample rate of the audio received by the encoder, set automatically from the audio source. To encode at another sample rate, use Enc_Audio_Output_SamplesPerSec |
Enc_Audio_BitsPerSample |
bits per sample of the audio received by the encoder, set automatically from the audio source. The encoded sample format is the one of the audio codec |
Enc_Audio_BitRate_kb |
audio bit rate, in kbit/s; 0 (default): 64 kbit/s |
Enc_Audio_PCM_Format |
sample format of the audio received by the encoder (TAudioPCMFormat), set automatically from the audio source |
Enc_Video_Enabled_bool |
1: the video is encoded. Required for the instances created by Encoders_CreateInstanceForRecording / Encoders_CreateInstanceForStreaming; set automatically for the encoder ID 0 |
Enc_Video_Width |
encoded width, in pixels; 0 (default): width of the video source |
Enc_Video_Height |
encoded height, in pixels; 0 (default): height of the video source |
Enc_Video_BitCount |
bit depth of the video received by the encoder, set automatically |
Enc_Video_AvgTimePerFrame |
frame duration in 100 ns units, set automatically from Enc_Video_FrameRate_x100 or from the video source |
Enc_Video_BitRate_kb |
target video bit rate, in kbit/s; 0 (default): 2000 kbit/s, 10000 kbit/s with a GPU encoder |
Enc_Video_rc_MinBitRate_kb |
rate control: minimum video bit rate, in kbit/s |
Enc_Video_rc_MaxBitRate_kb |
rate control: maximum video bit rate, in kbit/s |
Enc_Video_rc_BufferSize_kb |
rate control: buffer size, in kbit |
Enc_Video_IDR_Interval |
distance between two key frames, in frames; 0 (default): 30 |
Enc_Video_Max_BFrames |
maximum number of consecutive B-frames |
Enc_Video_FrameRate_x100 |
frame rate declared to the encoder and in the encoded stream, multiplied by 100 (e.g. 1500 for 15 fps); 0 (default): frame rate of the video source. The encoder keeps the timestamps of the frames and does not drop frames to reach this rate: to encode fewer frames, use Enc_Video_Sampling_Interval_Ms |
Enc_IsRealTime_bool |
set automatically |
Enc_IsScreenRecording_bool |
set automatically: 1 when recording the screen (vs_ScreenRecording) |
Enc_Video_Thread_Count |
number of threads of the video encoder; 0 (default): 4 |
Enc_Video_GPU_Encoder |
GPU encoder, a TGPUEncoder value passed as an integer (default Enc_GPU_None: software encoder) |
Enc_Video_GPU_EncoderDevice |
GPU used when the machine has several: NVIDIA NVENC: index of the GPU (0 = first); Intel QSV: 1 to 3 for the 2nd to 4th adapter; -1 (default): chosen by the encoder |
Enc_Video_Quality_min |
lowest quantizer allowed (qmin), 1 to 51: the lower the value, the better the quality and the larger the file; 0 (default): encoder default |
Enc_Video_Quality_max |
highest quantizer allowed (qmax), 1 to 51, see Enc_Video_Quality_min; 0 (default): encoder default. Both values are swapped when Enc_Video_Quality_min is the higher one |
Enc_Playable_While_Being_Recorded_bool |
1: the file can be played while it is being recorded; set automatically when VideoPlayableWhileRecording is true |
Enc_Video_Sampling_Interval_Ms |
time-lapse during a live capture: encodes one video frame every Enc_Video_Sampling_Interval_Ms milliseconds (e.g. 1000: one frame per second), the other frames are skipped; the frames encoded keep their timestamps. 0 (default): every frame is encoded |
Enc_Video_Sampling_FrameRate_x100 |
|
Enc_Video_Dropped_Frame_Count_readonly |
number of video frames dropped since the current file was opened, because the encoder and the disk did not keep up with the video source (real time encoding) |
Enc_Video_Encoded_Frame_Count_readonly |
number of video frames encoded since the current file was opened |
Enc_Video_IDR_Interval_Frames |
reserved, not applied: the distance between two key frames is set with Enc_Video_IDR_Interval, in frames |
Enc_Video_Profile |
encoder profile, as an FFmpeg profile number (e.g. H.264: 77 main, 100 high); 0 (default): profile of the encoder. Applied to the encoders that use the generic FFmpeg profile setting (e.g. libopenh264, the software encoder of "h264"). The GPU encoders take it from their own option: Enc_Extra_Parameters "-profile:v high" |
Enc_Video_Level |
encoder level, as an FFmpeg level number (e.g. 41 for 4.1); 0 (default): level chosen by the encoder. Applied to the encoders that use the generic FFmpeg level setting; for the others, use their own option in Enc_Extra_Parameters (e.g. "-level:v 4.1" with NVENC) |
Enc_Video_LowLatency_bool |
reserved, not applied |
Enc_Video_MaxRefFrames |
maximum number of reference frames; 0 (default): encoder default. Applied to the encoders that use the generic FFmpeg setting (e.g. NVENC, QSV, AMF) |
Enc_Video_RateControlMode |
reserved, not applied: the rate control follows Enc_Video_BitRate_kb, Enc_Video_rc_MinBitRate_kb / MaxBitRate_kb / BufferSize_kb and Enc_Video_Quality_min / max; other modes through Enc_Extra_Parameters (e.g. "-rc:v vbr" with NVENC) |
Enc_Video_H264_CABAC_Enable_bool |
reserved, not applied (with libopenh264: Enc_Extra_Parameters "-coder:v cabac") |
Enc_Video_Deblock_Enable_bool |
reserved, not applied |
Enc_Video_SlicesPerFrame |
number of slices per frame; 0 (default): encoder default. Applied to the encoders that use the generic FFmpeg setting (e.g. libopenh264, NVENC, QSV) |
Enc_Video_IntraRefresh_Enable_bool |
reserved, not applied |
Enc_Video_IntraRefresh_Percent |
reserved, not applied |
Enc_Audio_Output_SamplesPerSec |
encoded audio sample rate (e.g. 48000); 0 (default): sample rate of the audio source. The audio is resampled when it differs from the source; when the audio codec does not support this rate, the closest rate it supports is used (e.g. 44100 becomes 48000 with Opus) |
Enc_Audio_Output_Channels |
encoded number of audio channels (1: mono, 2: stereo); 0 (default): channels of the audio source |