This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62P-LP: The encoder encodes five images, but the frame rate cannot reach 30 frames per second

Part Number: SK-AM62P-LP
Other Parts Discussed in Thread: AM62P

Tool/software:

Currently, we are using four video streams with resolutions of 1216*864, 640*864, 448*608, and 1920*1080 respectively. When encoded by the encoder, the frame rate can reach 30 frames. However, when a new video stream with a resolution of 1920*1080 is added, making a total of five video streams, the output frame rate of the encoder drops to a maximum of 25 frames. Further verification tests have shown that it is possible to control two 1920*1080 video streams at 25 frames, while the other three can reach 30 frames, and vice versa. Therefore, we would like to confirm whether there is a software limitation on the encoder to control the frame rate and, if so, how to remove it? Our goal is to output all at 30 frames. Are there any other solutions?

The corresponding setting parameters are as follows:

Resolution, Bitrate:
{1216, 864, 8000000},
{640, 864, 8000000},
{448, 608, 8000000},
{1920, 1080, 8000000},
{1920, 1080, 8000000},

GOP:30
Input format: NV12
Output format: h265 (HEVC)

VBR
Level 2

  • Hi Quan Li,

    Appreciate if you could provide the Gstreamer pipeline that you are using to verify the 5 encoder instances? 

    This will help to better support you and I will be able to reproduce this on my end on my AM62P EVM.

    Best Regards,

    Suren

  • Hi Quan,

    I tested 5 encoding pipeline with am62a which is almost the same with am62p except the encoding speed is 240Mp/s for am62a (lower than am62p 300Mp/s) and the fps is more than 40.

    GST_DEBUG_FILE=/run/trace.log GST_DEBUG_NO_COLOR=1 GST_DEBUG="GST_TRACER:7" GST_TRACERS="latency(flags=element)" gst-launch-1.0 -v v4l2src device=/dev/video-imx623-cam0 io-mode=dmabuf-import ! video/x-bayer, width=1920, height=1536, framerate=60/1, format=rggb12 ! queue leaky=2 ! \
    tiovxisp sink_0::device=/dev/v4l-imx623-subdev0 sensor-name=SENSOR_IMX623 wdr-enabled=true dcc-isp-file=/opt/imaging/imx623/dcc_viss_wdr.bin \
    sink_0::dcc-2a-file=/opt/imaging/imx623/dcc_2a_wdr.bin format-msb=11 sink_0::pool-size=8 src_0::pool-size=8 ! queue ! \
    video/x-raw, format=NV12, width=1920, height=1536, framerate=60/1 ! tiovxmultiscaler name=split \
    split. ! queue ! video/x-raw, format=NV12, width=1216, height=864, framerate=60/1 !  v4l2h265enc extra-controls="enc,prepend_sps_and_pps_to_idr=(int)30, video_gop_size=(int)30, video_bitrate=8000000" ! capsfilter caps="video/x-h265, profile=(string)main, level=(string)2.1" ! fakesink \
    split. ! queue ! video/x-raw, format=NV12, width=640, height=864, framerate=60/1 ! v4l2h265enc extra-controls="enc,prepend_sps_and_pps_to_idr=(int)30, video_gop_size=(int)30, video_bitrate=8000000" ! capsfilter caps="video/x-h265, profile=(string)main, level=(string)2.1" ! fakesink \
    split. ! queue ! video/x-raw, format=NV12, width=608, height=448, framerate=60/1 ! v4l2h265enc extra-controls="enc,prepend_sps_and_pps_to_idr=(int)30, video_gop_size=(int)30, video_bitrate=8000000" ! capsfilter caps="video/x-h265, profile=(string)main, level=(string)2.1" ! fakesink \
    split. ! queue ! video/x-raw, format=NV12, width=1920, height=1080, framerate=60/1 ! v4l2h265enc extra-controls="enc,prepend_sps_and_pps_to_idr=(int)30, video_gop_size=(int)30, video_bitrate=8000000" ! capsfilter caps="video/x-h265, profile=(string)main, level=(string)2.1" ! fakesink \
    split. ! queue ! video/x-raw, format=NV12, width=1920, height=1080, framerate=60/1 ! v4l2h265enc extra-controls="enc,prepend_sps_and_pps_to_idr=(int)30, video_gop_size=(int)30, video_bitrate=8000000" ! capsfilter caps="video/x-h265, profile=(string)main, level=(string)2.1" ! fakesink

    Regards,

    Adam

  • Hi 

    One more information. Set width=608, height=448 will work but width=448, height=608 will not work. 

    Regards,

    Adam

  • Hi Adam,

    Can you confirm you are seeing lower FPS on AM62P compared to AM62A?

    Allow me few days to test this on AM62P and revert back with the analysis by early next week. 

    Best Regards,

    Suren

  • Hi Suren,

    I am not saying am62p is slower than am62a. I use am62a to make the test only because am62a has hardware scaler. Testing the same resolution on am62p will require much more cpu consumption as we need either videotestsource or multiple tee and tiscaler, which will be the bottleneck to fps. 

    I think if am62a encoder can handle these resolutions with high fps, am62p will only perform better.

    Regards,

    Adam

  • Hi Adam,

    Is the customer still facing issues with 5 encode streams? Also can you share the pipeline with logs on trying to use width=448, height=608?

    Best Regards,

    Suren

  • Hi Suren,

    Yes, customer is still facing issue with 5 encode streams. It takes me some time to put together the hardware to get the logs with width=448 and height = 608. 

    Regards,

    Adam

  • Hi Adam,

    I tried to play with this simple pipeline with SDK 10.1:

    gst-launch-1.0 -v videotestsrc ! video/x-raw, width=448, height=608, format=NV12 ! kmssink driver-name=tidss and was able to display the color pattern on the hdmi montior that I have connected on my board.

    Also tried encode/decode and it worked fine. 

    [2025-02-05 14:45:37.483] root@am62pxx-evm:/home# gst-launch-1.0 -v videotestsrc ! video/x-raw, width=448, height=608,format=NV12 ! v4l2h264enc ! filesink location=448.h264
    [2025-02-05 14:54:04.412] Setting pipeline to PAUSED ...
    [2025-02-05 14:54:04.428] Pipeline is PREROLLING ...
    [2025-02-05 14:54:04.428] /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)448, height=(int)608, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fr1
    [2025-02-05 14:54:04.460] /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)448, height=(int)608, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fracti1
    [2025-02-05 14:54:04.477] /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)448, height=(int)608, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, intero
    [2025-02-05 14:54:04.524] /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)1, profile=(string)baseline, width=(int)448, height=(int)608, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlao
    [2025-02-05 14:54:04.572] Redistribute latency...
    [2025-02-05 14:54:04.572] /GstPipeline:pipeline0/v4l2h264enc:v4l2h264enc0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)448, height=(int)608, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fracti1
    [2025-02-05 14:54:04.604] /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)448, height=(int)608, framerate=(fraction)30/1, multiview-mode=(string)mono, interlace-mode=(string)progressive, colorimetry=(string)bt601, pixel-aspect-ratio=(fract1
    [2025-02-05 14:54:04.619] Pipeline is PREROLLED ...
    [2025-02-05 14:54:04.620] Setting pipeline to PLAYING ...
    [2025-02-05 14:54:04.620] Redistribute latency...
    [2025-02-05 14:54:04.636] New clock: GstSystemClock
    ^Chandling interrupt.636] 0:00:00.3 / 99:99:99.
    [2025-02-05 14:54:08.427] Interrupt: Stopping pipeline ...
    [2025-02-05 14:54:08.443] Execution ended after 0:00:03.959760125
    [2025-02-05 14:54:08.443] Setting pipeline to NULL ...
    [2025-02-05 14:54:08.443] Freeing pipeline ...
    [2025-02-05 14:54:08.459] root@am62pxx-evm:/home# gst-launch-1.0 -v filesrc location=448.h264 ! h264parse ! v4l2h264dec ! kmssink driver-name=tidss sync=false          
    [2025-02-05 14:54:44.537] Setting pipeline to PAUSED ...
    [2025-02-05 14:54:44.665] Pipeline is PREROLLING ...
    [2025-02-05 14:54:44.681] /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1920
    [2025-02-05 14:54:44.681] /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 1200
    [2025-02-05 14:54:44.683] Redistribute latency...
    [2025-02-05 14:54:44.683] /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)448, height=(int)608, framerate=(fraction)0/1, coded-picture-structure=(string)frame, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, s1
    [2025-02-05 14:54:44.714] /GstPipeline:pipeline0/v4l2h264dec:v4l2h264dec0.GstPad:sink: caps = video/x-h264, width=(int)448, height=(int)608, framerate=(fraction)0/1, coded-picture-structure=(string)frame, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true,1
    [2025-02-05 14:54:44.761] /GstPipeline:pipeline0/v4l2h264dec:v4l2h264dec0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)448, height=(int)608, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-fli1
    [2025-02-05 14:54:44.793] /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)448, height=(int)608, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped1
    [2025-02-05 14:54:44.826] Pipeline is PREROLLED ...
    [2025-02-05 14:54:44.826] Setting pipeline to PLAYING ...
    [2025-02-05 14:54:44.841] Redistribute latency...
    [2025-02-05 14:54:44.841] New clock: GstSystemClock
    ^Chandling interrupt. (0.0 %)0:00.0 / 99:99:99.
    [2025-02-05 14:54:46.777] Interrupt: Stopping pipeline ...
    [2025-02-05 14:54:46.777] Execution ended after 0:00:02.038549846
    [2025-02-05 14:54:46.777] Setting pipeline to NULL ...
    [2025-02-05 14:54:46.841] [  888.305406] vdec 30210000.video-codec: wave5_vpu_firmware_command_queue_error_check: result not ready: 0x800
    [2025-02-05 14:54:46.841] [  888.315357] vdec 30210000.video-codec: wave5_vpu_firmware_command_queue_error_check: result not ready: 0x800
    [2025-02-05 14:54:46.857] [  888.325235] vdec 30210000.video-codec: wave5_vpu_dec_finish_decode: could not get output info.
    [2025-02-05 14:54:46.859] [  888.325273] vdec 30210000.video-codec: wave5_vpu_firmware_command_queue_error_check: result not ready: 0x800
    [2025-02-05 14:54:46.905] Freeing pipeline ...
    [2025-02-05 14:54:46.921] root@am62pxx-evm:/home#