TDA4VEN-Q1: Issues with keyframe usage

Part Number: TDA4VEN-Q1


Tool/software:

Hi TI experts,

RTOS:10.0

Linux OS:10.0

HW: our own board

We have a requirement for mandatory keyframe insertion in the project, but occasionally there may be delays in the effectiveness of keyframe insertion. The meaning is that I found that in the continuously captured frame data, the keyframe only appeared in the third frame by configuring V4L2_CID_SPEGVNet EO-FORCE_KEY_CRAME.

Do you have any software recommendations for forcibly inserting keyframes?

At present, the software has created three encoding channels based on the/dev/video1 device node. If these three encoding channels do not use a locking mechanism, will there be any problems?

BR.

  • Hello,

    Do you have any software recommendations for forcibly inserting keyframes?

    The SDK recommends using Gstreamer for encoding purposes. There are pipeline plugins we have tested and support for forcing IDR frames. From the logs, it doesn't look like your application is using GStreamer. Is there a particular reason you're not using GStreamer? 

    Thank you,
    Sarabesh S.

  • Hi Sarabesh S,

    Yes, we did not use Gstreamer, it was based on CPU loading considerations. The current flow is: capture node ->ldc node ->v4l2h265enc ->rtp ->IHU decode

    BR.

  • Hello,

    I will test and share a pipeline for you just to verify key-frame insertion is working. Will probably get that over to you tomorrow or early next week.

    Thanks,
    Sarabesh S.

  • IDR period is set with a combination of enabling header information and GOP size. Could you try the following gstreamer pipeline on its own with a YUV420 input stream:

    • gst-launch-1.0 filesrc location=/input_file.yuv ! rawvideoparse width=1920 height=1080 format=nv12 framerate=30/1 colorimetry=bt601 ! v4l2h264enc extra-controls="enc,prepend_sps_and_pps_to_idr=1,video_gop_size=1" ! filesink location=/output_file.264

    Thanks,
    Sarabesh S.

  • Hi Sarabesh S,

    I think you misunderstood my meaning. In most cases, setting V4L2_CID_MPEG_VIDEO_FROCE_KEY_FRAME can indeed successfully set IDR frames. The current issue is that during our testing process, we have encountered a situation where after setting V4L2_CID_MPEG_VIDEO_FROCE_KEY_FRAME, there are two consecutive frames of P frames followed by I frames. We hope that the first frame after setting V4L2_CID_MPEG_VIDEO_FROCE_KEY_FRAME will be an I frame.

    BR.