Input sources might contain several resolutions:
Constraints
Maximum resolution must be known. You can only change the resolution; changing the chroma mode or bit-depth is not allowed.
CtrlSWAPI
AL_Encoder_SetInputResolution
:Maximum resolution is specified in channel
parameters.
Refer to the API section for more details on new APIs. Provide multiple resolution files in the .cfg file in the following format:
[INPUT] #-------------------------------------------------
YUVFile = input_1.yuv
Format = NV12
Width = 1920
Height = 1080
CmdFile = input_cmd.txt
[DYNAMIC_INPUT] #-------------------------------------------------
YUVFile = input_2.yuv
Width = 720
Height = 480
Provide the number of frame index for input and variable fps
parameters (for DRC with variable FPS) in the input_cmd.txt
file.
50: Fps=30, Input=1
90: Fps=60, Input=2
Use the following command to generate an output file that contains an encoded file containing various resolutions.
ctrlsw_encoder -cfg test.cfg -o output
DRC Encode: Checking encoder use case for DRC using transcoding of DRC file which is encoded at the control software level, use:
gst-launch-1.0 filesrc location=test.avc ! h264parse ! omxh264dec low-latency=0 internal-entropy-buffers=9 ! queue max-size-bytes=0 ! omxh265enc target-bitrate=50000 ! video/x-h265, profile=main, alignment=au ! filesink location=test_out.hevc