GalactusB
GalactusB

Reputation: 21

gStreamer : How to print frame level PTS

I am a newbie to gstreamer API. I managed to use gst libs slowly but now for my project I need to print out frame level timestamps for the H.264 video. The gstreamer pipeline command I am using is attached with the question. I tried silent-identity=false, -verbose mode but I get too much info. I just want the frame level timestamps enabled and then dump into a file. Any suggestions would be great and much appreciated.

This is the command I am using for gstreamer

gst-launch-1.0 -v \ filesrc location=$fname ! qtdemux name=mdemux ! tee name=t t. !
queue max-size-bytes=4294967295 max-size-buffers=4294967295 max-size-time=18446744073709551615 !
h264parse ! video/x-h264,stream-format=byte-stream ! queue !
rtph264pay config-interval=1 ! udpsink host=$host port=$port \

Upvotes: 0

Views: 1741

Answers (1)

GalactusB
GalactusB

Reputation: 21

I found a solution which is what exactly I needed. I changed my command line into a script

gst-launch-1.0 -v \ filesrc location=$fname ! qtdemux name=mdemux ! tee name=t t. ! queue max-size-bytes=4294967295 max-size-buffers=4294967295 max-size-time=18446744073709551615 ! h264parse ! video/x-h264,stream-format=byte-stream ! queue ! rtph264pay config-interval=1 ! udpsink host=$host port=$port \

I put the above command pipeline into ./test1.sh | grep -op "(?<=dts: )(\d+:){2}\d+.\d+"

So then I piped into a log file and there I had frame-by-frame timestamps saved. Took me 3 days to figure this out. But Stack Overflow has been great so far.

Upvotes: 0

Related Questions