OS: Ubuntu 20.04 LTS
SDK: NVIDIA Video CODEC SDK 12
GOAL: H.264 and HEVC encoding
I’m working on encoding frames grabbed from a high resolution camera. The encoding is working for both H.264 and HEVC.
I’d like to add timestamp (PTS) into the encoded video. I have the timestamp for each frame. I used NV_ENC_PIC_PARAMS::inputTimeStamp as an input parameter. However, I don’t think the timestamp data is successfully added thru encoding since if I use ffprobe against the encoded video, both start_timestamp and start_pts are N/A. For example, using this command: ffprobe -show_format -show_streams file.hevc
As far as code, we can just base it on the sample AppEncCuda, by expanding it a bit by adding additional input parameter - NV_ENC_PIC_PARAMS.
- I believe adding timestamp is supported by Video CODEC SDK 12 as its doc indicates. Am I right?
- Any additional step should I take to add timestamp in the encoding?
- Any suggestion on how to determine/verify that timestamp is added?
Thanks for your help!