I need to train my multi-camera tracking model with videos recorded by NX Witness.
This model requires for successive time points:
- a set of synchronized frames from each camera
- the related absolute timestamp
Of course, "synchronization" is approximate in this case (less than 100 ms, which is easily achieved with 20 FPS videos and negligible latency caused by the network and by NX Witness).
I thought about two methods for extracting such data from NX Witness:
1) using the /media/[camera uuid].mp4?pos=[start]&endPos=[end] endpoint
But I'm wondering whether I can reliably infer the frame timestamps from the PTS.
Also, I'm concerned with recording interruptions: for example, one minute could be missing in a camera, thus the video files would not be synchronized from the beginning to the end.
By the way, I know I can use accurate_seek but "this causes the stream to be transcoded" and I don't need a precise start timestamp: I only want synchronized frames, no matter when they start.
2) directly using the video chunks in .../HD Witness Media/hi_quality/uuid_[camera id]/[year]/[month]/[day]/[hour]/[start timestamp]_[duration].mkv
In this case, I'm wondering whether I can compute the frame timestamps by using the "start timestamp" / "duration" in the file name and interpolating with the PTS.
I'm concerned with video interruptions in this case as well.
In short, what's the best way to extract video files from NX Witness and reliably associate each frame with an absolute timestamp?
Thanks for reading.
Please sign in to leave a comment.