Thank you! I made the following changes and it seems to have done the trickI thought maybe you could setin your new output class's __init__ method, and then test (and clear) it in your derived outputtimestamp. I think that's the suggestion you were already making yourself - sounded plausible to me!!Code:
self.first_frame = True
Code:
# Define an output which divides all the timestamps by a factorclass TimelapseOutput(FileOutput): def __init__(self, file=None, pts=None, speed=10): self.speed = int(speed) self.first_frame = True super().__init__(file, pts) def outputtimestamp(self, timestamp): if self.first_frame == True: # Print timecode format for the first line print("# timestamp format v2", file=self.ptsoutput, flush=True) self.first_frame = False # Divide each timestamp by factor to speed up playback timestamp //= self.speed super().outputtimestamp(timestamp)
Thanks again

Statistics: Posted by rpdom — Mon Feb 12, 2024 11:11 am