Not returned from NvVideoEncoder::setBitrate()

When encoding with WebRTC, we call NvVideoEncoder::setBitrate() to change the bitrate.
The process returns immediately up to the 3000th call, but after the 3001st call, it does not return at all (the number of times varies each time, but it is always approximately the same number).
It is as if the caller has deadlocked and does not return forever.
It takes about two hours for this to occur.

In that case, the following will appear in syslog.

May 17 10:12:23 Xavier-abc01 kernel: [56874.024250] host1x 13e10000.host1x: nvhost_get_syncpt: failed to find free syncpt
May 17 10:12:23 Xavier-abc01 kernel: [56874.024407] falcon 15380000.nvjpg: nvhost_get_syncpt_host_managed: failed to get syncpt

We are using the following version. This is the latest that can be raised with our hardware.

abc@Xavier-abc01:~$ dpkg-query --show nvidia-l4t-core
nvidia-l4t-core 32.6.1-20210726122859

Could you please help us to find a solution?
Thank you.

It looks like memory leak happens in running the app. Please apply this for a try:
Memory Leak (Alloc/free mismatch) in Tegra multimedia API (encoder) - #6 by DaneLLL

This is a known leak in the release.

Thank you so much for your reply.
We tried it, but no luck.
Nothing has changed.

Currently have no further idea about it. Would need your help to share a test app so that we can try to replicate the issue on Xavier developer kit.

I will try to replicate it with ‘jetson_multimedia_api/samples.’

We couldn’t replicate it, but found the cause.
Because we invoked our application, which called NvVideoEncoder::setBitrate(), as an external process and didn’t consume its stdout buffer, the application stopped because of stdout buffer full.

In other words, we thought that the stdout buffer was filled by ‘cout’ in NvVideoEncoder::setBitrate().
We corrected our program to consume its stdout buffer.
After that, we can call NvVideoEncoder::setBitrate() as often we want.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.