I require the ability to check in on the device remotely how could I access the video stream via something like fastAPI using the depth SDK, currently im attempting something like this
color = oak.camera('color', resolution='1080P', fps=10,encode="H265")
left = oak.camera('left', resolution='800p', fps=10, encode="H265")
right = oak.camera('right', resolution='800p', fps=10, encode="H265")
def cb(packet: FramePacket):
print(packet.frame.shape)
print(type(packet.frame))
frame_queue.put(packet.frame)
oak.callback(color.out.encoded, callback=cb)
then on the api side
# Function to generate frames for streaming
def generate_frames():
while True:
frame = frame_queue.get()
yield frame
@app.get('/video')
def video():
return StreamingResponse(generate_frames(), media_type="video/H265")
tried opening the endpoint in vlc but nothing