mts: MTS video clips should include a timestamp at least every second

Issue #42 resolved
Alan Noble created an issue

Occasionally timestamps skip a second, as occurs in testTimestamped.ts below:

2019/01/23 16:12:24 DEBUG: Timestamp=1545359654 2019/01/23 16:12:24 DEBUG: *** Missing 1545359655 2019/01/23 16:12:24 DEBUG: Timestamp=1545359656

If the encoder does not receive a timestamp as expected, it should probably extrapolate based on the last timestamp it received.

Comments (7)

  1. Saxon Milton

    this is weird, because we do timestamps realtime, so as soon as we get a nalu and encode into pes, we calculate the pes timestamp.

  2. Saxon Milton

    ahh apologies.
    I think this might just be that the psi's weren't written exactly every 1 second. if we get a big nalu for example, and we haven't yet been able to write a psi, but the timestamp is updated again before this point, then we will skip a second. It might also be that because we're getting timestamps from vidrecord through the response, if a request took a long time to get through, there might be some gap, like 2 seconds, before the next response is sent.

  3. Saxon Milton

    a fix could be to send smaller chunks off, but this will actually reduce performance, in fact, if the chunks were big, we could increase performance alot, but we would get less resolution with these timestamps.

  4. Saxon Milton

    This has been fixed by sending psi on a time basis rather than number of packets sent basis. This will allow for a consistent sending time of psi every second.

  5. Log in to comment