The original video will surely have dynamic frame-timing, and it's important to preserve that timing for temporal synchrony with the gaze data exported from pupil labs. Right now, that process isn't working - we assume a FIXED frame rate (frames-per-second).
The solution involves inheriting the original video frames' presentation time stamp (PTS) and decoding time stamp (DTS). These integer values encode the timing-related information in units of .time_base. I think the solution requires setting the output video's frames or packets dts and pts to the original video frames values. Unfortunately, my efforts to do this have resulted in error because of non-monotonic pts values. Urgh.