Controlling frame rate of replay and loop replay in camera application

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
1.9.3.10904
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Hello,

I have a doubt regarding the replay frame rate. I took the example rig files. I have managed to make a h264 video which when I play using vlc player plays at the right frame rate i set it to when making. say 1fps . But when I use camera_extra application in driverworks and try to play this back, it plays around 7`-9 fps.

This is the parameter line of rig file.
“parameter”: “video=myvideo.h264,timestamp=video_time_0.txt”,

This video_time_0.txt, I tried to use the default available in docker, I also tried making one with 1 second gap between every frame time. I still see its playing at 7-9 fps.

Hence my question;

  1. How do i control the frame rate in replay?
  2. Is this replay somehow related to the value i have configured in the fsync generator?
  3. Is it possible to keep replaying in loop without rerunning the application again and again?

Thanks!!
Jishnu

Could you explain how you measured the frame rate during replay?

@VickNV while using the camera extra app I tried to use offscreen parameter of the app. The display window pops up and I see the frame rate embedded there in the GL window down left. Is that not the right value?

Could you please share a screenshot of the display window where the frame rate is shown? Additionally, could you provide the exact command or parameters you used to run the camera_extra application with the offscreen option?

Hi @VickNV


This is the run with offscreen=0. (I don’t see the replay video visual may be some codec thing not sure, but I have dumped the frames to confirm I see the frames as these are 8mp camera images stitched together)

Command used is : ./sample_camera_extra --offscreen=0 --profiling=1 --rig=rig.json

Any leads on these questions?

1.    How do i control the frame rate in replay?
2.    Is this replay somehow related to the value i have configured in the fsync generator?
3.    Is it possible to keep replaying in loop without rerunning the application again and again?

Thanks!!
Jishnu

The following source files are related to the camera rendering process:

  • /usr/local/driveworks/samples/src/sensors/camera/camera_extra/*
  • /usr/local/driveworks/samples/src/framework/DriveWorksSample.cpp
  • /usr/local/driveworks/samples/src/framework/DriveWorksSample.hpp

Here’s the relevant section from DriveWorksSample.hpp that sets the rendering rate:

    /**
     * @brief setRenderRate This controls how fast the render callback is called.
     * @param loopsPerSecond The max number of times render should be called per
     *                       second. Default is 60fps.
     * @note If loopsPerSecond is 0 then no limitation happens.
     */
    void setRenderRate(int loopsPerSecond);

You can use this as a reference to adjust the rendering rate in your application. If you have hands-on access to the code, consider exploring these files to understand how you might alter or work with the rendering rate.

1 Like

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