Encoder frame rate settings

I tried to execute v4l2_camera_cuda with my usb camera.
My cam outputs 5 fps in YUY2.
The sample application worked. But output.h264 is recorded as 30fps.
I changed setFramerate(5,1) in source code .
I played the file(output.h264) with VLC player.

How can I set correct framrate ?

HW:Jetson Xavier NX DevKit
SW: JP4.4

Hi,
Please check if you see correct frame rate in executing ffprobe:

$ ffprobe -i sample_720p.h264
(...skip...)
Input #0, h264, from 'sample_720p.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 30 fps, 30 tbr, 1200k tbn, 60 tbc

Hi,
I checked my file(output.h264)
The file generated by camera_v4l2_cuda with option( -s 1920x1080, -r 5).
I changed cmd_parse, -r means framerate of encoder.

And I analyze the same file, th file contains stream data as 5fps.

Input #0, h264, from './output.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc

I found this jetson nano encode h264 video framerate can not change. - Jetson & Embedded Systems / Jetson Nano - NVIDIA Developer Forums

I add setInsertVuiEnabled(true), then my file plays in 5fps.

Thank you your coorperation.

1 Like