Hi!
I have established a gstreamer pipeline on TDA4VM for decoding H264 bitstreams, which includes the following elements: appsrc queue avdec_h264 appsink. It works normally, but the decoding speed is not ideal.
The H264 test file I used is encoded from a 1280 long/720 wide image in NV12 format. It only has I and P frames, with a GOP of 15 and a total of 240 frames. The complete decoding time is 3469ms, approximately 14ms to decode one image. This is sufficient for a single camera frame rate, but we need four cameras to decode simultaneously, which clearly does not meet the expected speed.
Here are my configurations for each element:
GstElement *pipeline, *appsrc , *appsink; GstElement *h264_decoder; ... g_object_set(G_OBJECT(appsrc), "caps", gst_caps_new_simple("video/x-h264", "stream-format", G_TYPE_STRING, "byte-stream", \ "alignment", G_TYPE_STRING, "au", NULL), NULL); g_object_set(G_OBJECT(appsink), "sync", FALSE, NULL); g_object_set(G_OBJECT(appsink), "emit-signals", TRUE, NULL); g_object_set(G_OBJECT(appsink), "max-buffers", 200, NULL); g_object_set(G_OBJECT(h264_decoder), "max-threads", 10, NULL);
Is there any way to improve the encoder speed? May I have any good suggestions? Thank you!