These demos show how you can play H264/H265 OAK-encoded streams on the host computer.
It plays encoded stream by piping the output stream of the device to the input of the ffplay process.
python3 main.py
This demo decodes encoded stream to OpenCV frames using the PyAv library. Note that this might freeze on Linux computers, which is due to PyAv library; see workaround here. For us, it worked as expected on Windows.
python3 pyav.py
This demo decodes encoded MJPEG stream using OpenCV's cv2.imdecode() function. Note that MJPEG compression isn't as great compared to H.264/H.265, more information here.
python3 mjpeg.py
Install requirements:
sudo apt install ffmpeg
python3 -m pip install -r requirements.txt