H265 encoded video time duration is slower than expected

Hi Im using the following pipeline to encode the video

"appsrc name=%s ! rawvideoparse use-sink-caps=false width=%d height=%d format=gray16-le framerate=(fraction)(%d/1) ! videocrop right=%u ! videoconvert ! video/x-raw,format=I420,framerate=(fraction)(%d/1)  ! nvvidconv ! video/x-raw(memory:NVMM),format=NV12,framerate=(fraction)(%d/1) ! nvv4l2h265enc bitrate=%lu control-rate=1  maxperf-enable=1  EnableTwopassCBR=1 MeasureEncoderLatency=1 ! h265parse ! queue ! matroskamux ! filesink location=%s/%s sync=false async=false"

I’m trying to reduce the saved video time duration. I thought by changing the framerate the time duration of the video will change but I see no effect. Currently, the saved video is slower than expected.

Can you suggest how can I change the total video duration?

The performance can be capped by the software converter. Please execute sudo nvpmodel -m 0 and sudo jetson_clocks. To run CPU cores at max clocks. This is optimal solution on Jetson platforms since hardware engines does not support 16-bit GRAY. Has to use CPU cores for the conversion.

Thanks for this info. I’ll try this out. But my question is a little different.

Currently, when I save the video, the video plays for 11 sec. But the actual time of capture is around 2 sec. Hence, it looks like the video is in slow motion.

How can I reduce that 11 sec to the actual 2 sec?

It may help by adding the plugin: videorate

Please give it a try.

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