Ok when I’m encoding, the PTS values on the demux src pad drop down to 39msec which matches what the encoder has at its src pad - except for the initial one which I imagine is large due to the encode “starting up”.
Why would the pts values on the demuxer be affected? And why would they decrease? Whatever it is the end result is the qtmux and filesink seem to record files that look fine and play back ok - but are at random fps values - sometimes at 33 fps for example - so the files are shorter in time.
Apr 02 17:16:10 nano-1 python[24125]: DEMUX SRC PAD Source 0, Batch meta PTS 11860735423 diff 39 (in msec
Apr 02 17:16:10 nano-1 python[24125]: DEMUX SRC PAD Source 0, Batch meta PTS 11900704849 diff 39 (in msec
Apr 02 17:16:10 nano-1 python[24125]: ENC SRC PAD Source 0, Batch meta PTS 11780797313 diff 11780 (in msec
Apr 02 17:16:10 nano-1 python[24125]: ENC SRC PAD Source 0, Batch meta PTS 11820766244 diff 39 (in msec
Apr 02 17:16:10 nano-1 python[24125]: ENC SRC PAD Source 0, Batch meta PTS 11860735423 diff 39 (in msec
Apr 02 17:16:10 nano-1 python[24125]: ENC SRC PAD Source 0, Batch meta PTS 11900704849 diff 39 (in msec
Apr 02 17:16:10 nano-1 python[24125]: DEMUX SRC PAD Source 0, Batch meta PTS 11940497197 diff 39 (in msec
Prior to adding in the encoder (dynamically linked on a tee) the demux src pad just continually oscillates between 80 and 120 msec as shown in previous posts.
My encoder is configured as follows:
g_object_set (G_OBJECT (instances[source_id].encoder), “bufapi-version”, TRUE, NULL);
g_object_set (G_OBJECT (instances[source_id].encoder), “iframeinterval”, 10, NULL);
g_object_set (G_OBJECT (instances[source_id].encoder), “maxperf-enable”, TRUE, NULL);
g_object_set (G_OBJECT (instances[source_id].encoder), “bitrate”, 2000000, NULL);
g_object_set (G_OBJECT (instances[source_id].encoder), “qos”, TRUE, NULL); //handle qos events from downstream elements
NOTE: Setting QoS on the encoder and the filesink seems to make no difference - however I found a comment in deepstream-app code that says you shold always use QoS.