Hi,
I am encountering an issue with the PTS/DTA while using a GStreamer pipeline (using v4l2-h264 encoder) to handle RTSP streaming on a Jetson TX2 platform.
My GStreamer pipeline is configured as follows:
—! identity name=1_identity_before silent=FALSE ! nvv4l2h264enc control-rate=1 bitrate=50000000 iframeinterval=150 insert-sps-pps=true ! video/x-h264, stream-format=(string)byte-stream ! h264parse ! identity name=1_identity_after silent=FALSE ! rtph264pay name=pay0 pt=96
To investigate the problem, I used identity elements before and after the nvv4l2h264enc element to log PTS and DTS values. I am noticing an unexpected ordering in the PTS values in the stream coming out of the encoder (as reported by 1_identity_after).
The idntity before the encoder reports good values for both pts and dts
Specifically, there are cases where the DTS is greater than the PTS, which seems unusual.
PTS DTS PTS_DIFF DTS_DIFF
171148337000 171148337000 33330000 33330000
171214997000 171181667000 66660000 33330000
171181667000 171214997000 -33330000 33330000
171248328000 171248328000 66661000 33331000
171281658000 171281658000 33330000 33330000
171314988000 171314988000 33330000 33330000
171348318000 171348318000 33330000 33330000
171381649000 171381649000 33331000 33331000
171414979000 171414979000 33330000 33330000
171448309000 171448309000 33330000 33330000
171514970000 171481639000 66661000 33330000
I tried to run with debug on the encoder, but no relevant warning/error.
Can anyone shed some light on what could be causing these disordered PTS values after the encoder, and how I might rectify it? Any help with understanding this issue would be greatly appreciated.
Thank you.