Environment: L4T 28.1
Our application use MMAPI to encode video. Our capture framerate is 60fps, and we want to encode 30fps video, so we use "setFrameRate(30, 1)". But we get the statistical encode-framerate is 60fps. API "setFrameRate" does not appear to be in effect.
Is "setFrameRate" a effective API?
Thank you for reply.
I have used your attached package, and i can get correct timestamp. But fps is still wrong.
Can you share more information about ‘But fps is still wrong’?
As you suggest,for encodeing 30fps, I used setFrameRate(300, 1), but framerate was still 60fps.“setFrameRate” does not appear to be in effect.
I don’t understand your issue. If you apply the package on r28.1 and setFrameRate(30, 1), you will see timestamps in 33ms interval. What do you mean framerate is still at 60fps? Can you share a sample code?
In my application,include capture and encode:
1: use v4l2 api to capture video data, and data contains timestamp. Capture frame-rate is 60fps, timestamp interval is 16ms
2: set capture timestamp to encode by “v4l2_buf.flags |= V4L2_BUF_FLAG_TIMESTAMP_COPY”,
Now,I want to set encode frame-rate to 30fps, so use setFrameRate(30, 1), but I get timestamp from encode. timestamp interval is still 16ms, not 33ms.
Hi wuyingdong, for your case, please set ‘setFrameRate(30, 1)’ and not set ‘v4l2_buf.flags |= V4L2_BUF_FLAG_TIMESTAMP_COPY’.