Multimedia API encoder Restart

Hi
I am using multimedia API to encode video
The encoder is initialized to work in blocking mode
I have a thread that do dequeue of capture buffers
We need to stop the encoder include clean up all buffers and start it again.
To stop pipe and clean up I do the following steps:

  1. Stop command
  2. join capture dequeue thread
  3. Unmapped buffers
  4. Request buffers 0
    I tried to send stop command but when I send stop command I can’t dequeue all capture buffers (I get EPIPE errno)
    How can I stop pipe in blocking mode so I can dequeue the buffers after?

Hi,
The complete encoding process is demonstrated in

/usr/src/jetson_multimedia_api/samples/01_video_encode

From initialization, execution and termination. Please refer to it to develop your use-case. Not sure about detail if your use-case, but if EoS is sent to encoder, you would need to terminate the current encoding task and re-initialize a new one.

Hi
I need after the encoder run to change the formats (change frame width, height etc.) the encoder setup and run it again WITHOUT closing the encoder file descriptor

Hi,
Runtime framerate/bitrate change is supported. Please refer to the sample and check

Runtime configurable parameter string should be of the form:
"f<frame_num1>,<prop_id1><val>,<prop_id2><val>#f<frame_num1>,<prop_id1><val>,<prop_id2><val>#..."
e.g. "f20,b8000000,i1#f300,b6000000,r40/1"

Runtime resolution change is not supported. If resolution changes, please terminate the current object and re-initialize NvVideoEncoder with new resolution.

I don’t need runtime resolution change, I need to change resolution and set new format without closing the file descriptor.
Today I stop streaming unmap buffers and request zero buffers and after that set the new format request new buffers the map them.

Hi,

This is not supported. Please close current fd and re-open it.

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