Astra SDK with saved Depth Videos

Hello everyone,

Does anyone have experience using the Astra SDK with previously saved depth videos? All the examples I have seen so far directly read the frames from a live camera stream. The depth videos I want to process were previously saved directly from an orbbec astra camera.

Thank you!

i guess it was recorded using the openni viewer tool. Do the files have the extension .oni ?
if so: basically this is a framewise listing of the paramaters to record (selected in the viewer).
you might look into the cpp-source of the viewer to get further info.


Thank you for the reply, Andreas.

Sorry for the confusion, but no - the videos were recorded in a custom fashion using opencv and do not have the .oni extension. I don’t think they will contain the same framewise listing of the parameters but they will contain the exact “” from when the frame came from a camera stream.

Do you know of a way to essentially replace the StreamReader with frames streamed from the saved video? I will look into the cpp-source of viewer for further inspiration.

with the openni viewer tool you can open an .oni file instead of the device stream. as we are on unix (everything is a file - including streams) with openni the only thing you need beside a redirect to the file is a ticker feature (i.e. read 320x240x16bit all 40ms to get 25 frames/second). should be in the viewer tool source.
Furthermore there might be a header section in the .oni file giving the timebase and framesize - sorry i don’t remember - it’s ten years i worked the last time with .oni

.oni is uncompressed stream.
if it had been a customized streamrecording, there might be compression of the raw data in intervals of a second (or jpeging of single frames). i would start looking for a magic number (List of file signatures - Wikipedia).