Getting timestams from gstreamer pipeline

I am trying to write a Python program that reads images from a GStreamer pipeline that uses nvarguscamerasrc and obtains accurate timestamps for each frame.

If I set silent=false on nvarguscamerasrc, it prints timestamps that according to the Argus library documentation is the number of nanoseconds since the start of the system’s monotonic clock.

How do I get a timestamp from a GStreamer pipeline that accurately represents these timestamps? I tried adding each samples DTS to the pipeline’s base_time. This yields numbers that are similar to the timestamps printed by nvarguscamerasrc, but are about 15 milliseconds later.

The test program I am using is

Timestamp of each frame is stored in PTS in GstBuffer structure:

Please check if you can read the value out in appsink

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