How can I display the output (a preview or video) as an inline video in a Jupyter Notebook? The 4K RGB MobileNetSSD sample works just fine with the external windows, but I want to access JupyterLab across the network. In order for this to work properly, I'll need the video to display in the notebook. Otherwise the notebook server will be showing a window I can't see or close.
I'm also wondering if there are other best practices for DepthAI in JupyterLab. For example, you should always explicitly clean up your code, or your script will hang and crash the kernel. See the last 3 lines:
import depthai as dai
pipeline = dai.Pipeline()
camRgb = pipeline.createColorCamera()
xoutRgb = pipeline.createXLinkOut()
with dai.Device(pipeline) as device:
qRgb = device.getOutputQueue(name="rgb", maxSize=4, blocking=False)
print('Press \'Q\' to Quit')
inRgb = qRgb.get()
if cv2.waitKey(1) == ord('q'):
Any tips are greatly appreciated!