Command line 如何使用系统时钟从gstreamer获取时间戳?

Command line 如何使用系统时钟从gstreamer获取时间戳?,command-line,synchronization,gstreamer,Command Line,Synchronization,Gstreamer,我目前有两个命令行管道,用于通过以太网将视频从Raspberry Pi摄像头(ArduCam模块)传输到PC;这些方法非常有效: gst发送者。sh ./video2stdout | gst-launch-1.0 -v fdsrc fd=0 ! \ video/x-h264, width=1280, height=800, framerate=60/1 ! \ h264parse ! rtph264pay ! \ udpsink host=xxx.xxx.xx.xxx port=xxxx gs

我目前有两个命令行管道,用于通过以太网将视频从Raspberry Pi摄像头(ArduCam模块)传输到PC;这些方法非常有效:

gst发送者。sh

./video2stdout | gst-launch-1.0 -v fdsrc fd=0 ! \
video/x-h264, width=1280, height=800, framerate=60/1 ! \
h264parse ! rtph264pay ! \
udpsink host=xxx.xxx.xx.xxx port=xxxx
gst-launch-1.0 -v -e udpsrc port=xxxx \
caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, \
encoding-name=(string)H264, payload=(int)96" ! \
rtph264depay ! h264parse ! mp4mux ! filesink location=video.mp4
gst接收器.sh

./video2stdout | gst-launch-1.0 -v fdsrc fd=0 ! \
video/x-h264, width=1280, height=800, framerate=60/1 ! \
h264parse ! rtph264pay ! \
udpsink host=xxx.xxx.xx.xxx port=xxxx
gst-launch-1.0 -v -e udpsrc port=xxxx \
caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, \
encoding-name=(string)H264, payload=(int)96" ! \
rtph264depay ! h264parse ! mp4mux ! filesink location=video.mp4
然而,我最终将运行多个摄像头,通过外部硬件触发器进行同步,因为我不能保证流将在同一时间开始,所以我需要时间戳——流开始时间或每一帧的时间戳

通过在gst-sender.sh中的h264parse和rtph264pay之间添加'identity silent=false',我可以访问流的缓冲区数据,并使用以下命令检索帧时间戳:

./gst-sender.sh | grep -oP "(?<=dts: )(\d+:){2}\d+.\d+"
看起来gstreamer有一个用于延迟计算的“绝对”时钟时间,但我一直无法找到任何方法从命令行访问它

是否有办法从命令行访问gstreamer的绝对/系统时钟?或者以其他方式获取流开始时间戳?