Dear all,
We face a strange problem when doing H264 encode on DM368-ex. If we set the key frame interval to 30 (idrFrameInterval = 30), that's ok. But if we set to 16, the statistics of the frame rate is not so good, we will face 1006 or 1007 ms for encoding 30 fps which we expect is 1000 ms.
<avenc> Module | Avg Time/Frame | Frame-rate | Total time | Total Frames |
<avenc> CAPTURE | 33.30 | 30.03 | 999 | 30 |
<avenc> ENCODE:H264 | 33.53 | 29.82 | 1006 | 30 |
And if we set the key frame interval even to 5, the statistics is also good. Seems not due to the little value of interval of key frame but due to the special number of key frame interval.
My question is: does anybody know is there any relationship between the fps and key frame interval required for deliver 30 fps? if we want 30 fps, do we only accept key frame in: 1, 2, 5, 15 and 30?
P.S. we use dm36x-codec-2.20.00.05 and dvsdk3-3.10.00.19 with below configuration for encode H.264:
dynamicParams_h264.rcAlgo = 6;
dynamicParams.targetBitRate = 3000*1000;
dynamicParams.refFrameRate = 30 * 1000;
dynamicParams.targetFrameRate = 30 * 1000;
Any suggestion are welcome and if you want any more info please let me know. Thanks.