Decoding Settings
1.Preview the page

2. Function Introduction
2.1 Global Configuration

A. This section presents the basic parameters for network stream decoding settings, which are used for quickly and uniformly modifying the decoding settings for all channels. After configuring the global parameters, simply click the “Apply to All” button and all channel parameters will be automatically set to the same global parameters.
2.2 Network stream

B.It supports inputting live network streams, and then converting or transcoding the network streams for output. For example: Most of the network cameras used for surveillance in the market only support RTSP streams. To push the stream from the surveillance camera to the RTMP-SERVER, it is necessary to convert the RTSP stream into an RTMP stream address.
The video encoding standard of the input network live stream must be H264 or H265, and the audio format must be AAC, PCMA, MP2, or MP3. If only converting the stream, since no re-encoding is performed, the video quality and audio quality of the network stream will not be changed, nor will the bitrate of the converted output.
When set to transcoding output, then the “video decoding” switch needs to be turned on, and subsequently in the “encoding parameters” column, parameters such as the resolution of the encoded output, encoding method, rate control method, rate, frame rate, GOP interval, etc. need to be set.
stream url: For IPcam, it is usually the RTSP address. In fact, here any protocol (RTMP/HTTP/SRT/UDP, etc.) of the stream address can be filled in, as long as it is supported by LinkSDK.
The reference format of the SRT protocol is srt://ip:port? mode=caller&latency=50.
Framerate: Since some cameras do not specify the video frame rate in the protocol, the encoder cannot calculate the frame rate properly during transcoding. Users need to manually fill in the frame rate. In most cases, leaving it as -1 is fine. The encoder will automatically determine and, when unable to make a decision, will abandon the frame rate control and perform transcoding based on the input frame rate.
Buffer mode: “Normal”: with a small buffer and receiving data for decoding; “Nobuffer”: without buffer, receiving data and decoding immediately; “Buffer”: with a large buffer, decoding synchronously according to timestamps; “Sync”: only for original network streams with frame synchronization, achieving the effect of device decoding and synchronization at other decoding ends. If combined with the frame synchronization function on the encoding settings page, it can achieve the synchronization effect between the encoded network stream and the original network stream.
Buffer time: in milliseconds. It is effective only when the buffer mode is “Buffered” and “Frame synchronization”. The larger the value, the greater the delay.
Protocol: Only for RTSP settings, selectable “UDP, TCP”, it is recommended to choose “TCP” (rtp over rtsp mode), which can ensure data integrity and prevent packet loss.
Video decode: Video decoding switch. If no transcoding is required, only for protocol conversion (such as rtsp to rtmp), this switch does not need to be enabled.
Audio decode: Audio decoding switch. If no transcoding is required, only for protocol conversion (such as rtsp to rtmp), this switch does not need to be enabled.
Enable: The total switch for this network input channel.
HDMI: Click the “Output” button to output the decoded data of this network input channel to the HDMI output port.
Since the audio codec of the main chip will occupy a lot of CPU resources, it is recommended to only enable the audio decoding switch when audio needs to be transcoded or mixed into the Mix channel.
2.3 File Carousel

Encoding parameters

A. This is consistent with the parameters in the “Global Configuration” section, but each one corresponds to an encoding channel, and each channel can be set to a different encoding parameter. The first line of each channel parameter is the main encoding parameter and the second line is the secondary encoding parameter.
Channel name: Can be displayed on the “Running Status” page for easy management.
Video Size: Set the resolution of the video encoder. Common resolutions are enumerated in the list. If you need other resolutions, see “Advanced Encoding Parameters” below.
Rate control: The options are CBR, VBR, and AVBR. If you are not sure which one to choose, you are advised to use AVBR to obtain the optimal effect in most scenarios.
Bitrate: Video bit rate (unit: kbps). The setting range refers to the maximum bit rate of the model.
Frame rate: 1-60 frames.
GOP: GOP is also called keyframe interval. Note that the unit here is seconds, supporting decimal.
Enalbe: channel opening and closing
Advanced coding parameter(Set some advanced parameters about the type of video encoding)
A. width-heigh:Used to set the video encoding resolution not in the list. After setting here, the encoding parameter resolution list will display blank, but it will not affect the normal operation of the video encoder.

B. smart encode:Advanced P-frame mode, which improves the encoded video quality at the same bit rate, but increases the key frame interval. SmartP is more suitable for static scenarios, while DualP is more suitable for highly dynamic scenarios. Note that it will cause ROI failure if enabled.
C. minQP-maxQP:Used to set the quality range of video coding in VBR bit rate control mode.
D. fixIQP-fixPQP:Used to set the I frame and P frame quality in FixQP bitrate control mode.
E. low latency:The function takes effect only after the system restarts. Low delay encoding can reduce the delay of the encoding output, but will lose the scaling ability, so the resolution of the encoder output must be consistent with the resolution of the input source.
Video config

A. full framerate deinterlace:Our exclusive feature, when the input source signal is interlaced video, it can be interlaced without losing the frame rate, and it is non-interlaced.
B. Rotate:This function can be used for the collection and processing of signal sources of special equipment, such as mobile phones, etc., and the input signal image can be rotated.
C. crop:The input value is in ‘pixels’. Please be careful that the value does not exceed the maximum range of the signal source.
Network stream

A. ENC series products support the input of network broadcast stream, and then convert and output the network broadcast stream, or transcode and output the video broadcast stream of other protocols. For example, surveillance cameras in the market can only support THE RTSP live stream. In order to push the surveillance camera stream to the RTMP-server, you need to change the RTSP stream to the RTMP live stream.
B. The video encoding standard of the input webcast must be H264 or H265, and the audio encoding standard must be AAC, PCMA, MP2, or MP3. If only the protocol of the live stream is converted, the video stream does not need to re-encode the received live network stream, so it will not change the video picture quality and audio quality of the live network stream, nor will it change the output bit rate.
C. When we need to transcode to output the video and audio parameters we want, we need to turn on the “video decode” switch, and then set the resolution, encoding mode, bit rate control mode, bit rate, frame rate, GOP interval and other parameters of the encoding output in the column of “Encode – Encode config”.
D. Stream url: If IPcam, usually RTSP address. In fact, you can fill in the stream address of any protocol (RTMP/HTTP/SRT/UDP, etc.) .For example”RTSP :// Username: password @IP address/cam/live”, “SRT://IP address:SRT listening port?Mode=caller&latency=50; “ .
E. framrate: Because some IP cameras do not describe the video frame rate in the protocol, the encoder cannot normally calculate the frame rate when transcoding the frame rate control. Therefore, users need to manually enter the frame rate. In most cases, the encoder will automatically judge by keeping -1. When the decision cannot be made, it will abandon the frame rate control and transcode according to the input frame rate.
F. Buffer mode: “real-time “: no buffering, decoding immediately after receiving data; General “: with a small buffer, decode at receive rate;” Synchronous “: with a large buffer, according to the timestamp synchronous decoding.
H. Protocol: This parameter is set only for RTSP. The value can be UDP or TCP. You are advised to select TCP, that is, RTP over RTSP, to ensure data integrity and prevent packet loss.
I. Video decode: Video decoding switch. If the video decoding switch is not required and only protocols (for example, RTSP to RTMP) are transferred, this switch is not required.
J. Audio decode: Audio decoding switch. If no transcoding is required and only protocols (for example, RTSP to RTMP) are transferred, this switch is not required.
K. enalbe:Main switch of the network input channel.
