Recently started working with the NVENC API. I’m successfully decoding N distinct h264 bits streams into NV12, resize and stitch all the frames into a final 1080p or 4K frame, and then pass this final frame to the encoder.
Some background (not really relevant to this issue, but offers some context)
For this purpose, I select one of those N input h264 streams as the “driver”: whenever the final 4K frame gets changed because of that select input stream, I shoot out a request to the NVENC to encode the fat frame (1080p or 4k).
What I do
All the above works as expected, except on sporadic occasions where I get the timestamps messed up. Here is a real log dump:
On input I feed in the following timestamps:
37037652351 37037658351 37037664351 37037670351 37037676351 37037682351
On output I get:
37037652351 37037658351 37037664351 37037682351 <<<<<BANG!!!! 37037670351
Notice how 37037670351 and 37037676351 were skipped.
Any hints on what might go wrong?