• Assistance Needed for Standalone Streaming Setup on Multiple OAK PoE Cameras

jakaskerl Thank you for getting back.

  1. here is the recorded video of camera behavior on stand alone mode.
video.mp4
8MB
  1. Here is the script which basically sets MJPEG server with both views (normal and stereo). I am not sure weather or not it will work, but currently it is taking random device from the network since have both OAK-1 and OAK-D-Pro it select OAK 1 from the network and trying to run the given script causing error like this one.

    Note: Even though if I disconnect all the device and just keep OAK-D-Pro PoE it still say failed to find the device even though its connected when i check the status.

    Script : GitHub (GPT generated)

    You did mention something like this. Apologies if still repeating the same mistake unconsciously

A single device cannot be used by both the deviceBootloader and the dai.Device(). After exiting the context of these two functions, the device will reboot which will cause the error you are experiencing.

  1. This simple example of depth preview is not working for me.
    https://github.com/luxonis/depthai-python/blob/main/examples/StereoDepth/depth_preview.py

Getting this error even after getting sure that its connected.

HI @nikul
I tested you script and it works great on Oak-D-Pro Poe. It does not flicker at all. Are you experiencing the flickering in host mode or just in standalone? Does it help removing the color_cam.initialControl.setManualFocus(100) # 0..255?

"0.0.0.0" IP won't work, you have to specify the IP of the device directly. Camera not detected error stems from the fact that OAK-1 poe only has 1 camera (on socket 0). Stereo needs cameras on socket 1 and 2.

Thanks,
Jaka

    jakaskerl
    I tested you script and it works great on Oak-D-Pro Poe. It does not flicker at all. Are you experiencing the flickering in host mode or just in standalone? Does it help removing the color_cam.initialControl.setManualFocus(100) # 0..255?

    It flickers only on Standalone. I have applied the same code to the all my four OAK PoE cameras however effect of this code color_cam.initialControl.setManualFocus(100) # 0..255is only appearing on OAK-D-Pro. and none other.

    "0.0.0.0" IP won't work, you have to specify the IP of the device directly. Camera not detected error stems from the fact that OAK-1 poe only has 1 camera (on socket 0). Stereo needs cameras on socket 1 and 2.

    0.0.0.0 is just for security purpose I am using device IP while running in into my system. I aware of the fact that I need OAK-D or OAK-D-Pro to stream depth view. i do have both of them connected to my network.

    Hi @nikul
    Which Oak-D-pro Poe is this? This is what /examples/ColorCamera/rgb_preview.py prints out for a camera I tested and which had no issues with flickering:

    Connected cameras: [{socket: CAM_A, sensorName: IMX378, width: 4056, height: 3040, orientation: AUTO, supportedTypes: [COLOR], hasAutofocus: 1, hasAutofocusIC: 1, name: color}, {socket: CAM_B, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, hasAutofocusIC: 0, name: left}, {socket: CAM_C, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, hasAutofocusIC: 0, name: right}]
    Usb speed: UNKNOWN
    Bootloader version: 0.0.26
    Device name: OAK-D-PRO-POE  Product name: OAK-D-PRO-POE-AF

    I flashed the application you have sent to the device and experienced no issues.

    Thanks,
    Jaka

    @jakaskerl
    Hi, Thank you for getting back.
    Can I set the focus manually. To the OAK 1.
    Here is description of my device.
    [{socket: CAM_A, sensorName: IMX378, width: 4056, height: 3040, orientation: AUTO, supportedTypes: [COLOR], hasAutofocus: 0, hasAutofocusIC: 1, name: color}]

    Thank you @jakaskerl
    1. I am unable to setManualFocus with this.
    # Start defining a pipeline

    pipeline = dai.Pipeline()

    # Define a source - color camera

    cam = pipeline.create(dai.node.ColorCamera)

    cam.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)

    cam.initialControl.setManualFocus(2)

    [{socket: CAM_A, sensorName: IMX378, width: 4056, height: 3040, orientation: AUTO, supportedTypes: [COLOR], hasAutofocus: 0, hasAutofocusIC: 1, name: color}, {socket: CAM_B, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, hasAutofocusIC: 0, name: left}, {socket: CAM_C, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, hasAutofocusIC: 0, name: right}]

    This camera does comes with Auto Focus features.
    https://docs.luxonis.com/projects/hardware/en/latest/pages/NG9097pro/

    1. I am getting error while installing depthAI viewer.
    Requirement already satisfied: pip in c:\users\nikunayi\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages\depthai_viewer\venv-0.1.6\lib\site-packages (23.2.1)
    
    Collecting pip
    
    Obtaining dependency information for pip from https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl.metadata
    
    Downloading pip-24.0-py3-none-any.whl.metadata (3.6 kB)
    
    Downloading pip-24.0-py3-none-any.whl (2.1 MB)
    
    ---------------------------------------- 2.1/2.1 MB 9.6 MB/s eta 0:00:00
    
    Installing collected packages: pip
    
    Attempting uninstall: pip
    
    Found existing installation: pip 23.2.1
    
    Uninstalling pip-23.2.1:
    
      Successfully uninstalled pip-23.2.1
    
    Successfully installed pip-24.0
    
    Looking in indexes: https://pypi.org/simple, https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
    
    Collecting depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475
    
    Using cached https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/depthai-sdk/depthai_sdk-1.13.1.dev0%2Bb0340e0c4ad869711d7d5fff48e41c46fe41f475-py3-none-any.whl (225 kB)
    
    Collecting opencv-contrib-python>4 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached opencv_contrib_python-4.9.0.80-cp37-abi3-win_amd64.whl.metadata (20 kB)
    
    Collecting blobconverter>=1.4.1 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached blobconverter-1.4.2-py3-none-any.whl.metadata (7.5 kB)
    
    Collecting pytube>=12.1.0 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached pytube-15.0.0-py3-none-any.whl (57 kB)
    
    Collecting depthai==2.22.0 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached depthai-2.22.0.0-cp311-cp311-win_amd64.whl.metadata (8.9 kB)
    
    Collecting PyTurboJPEG==1.6.4 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached PyTurboJPEG-1.6.4-py3-none-any.whl
    
    Collecting marshmallow==3.17.0 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached marshmallow-3.17.0-py3-none-any.whl (48 kB)
    
    Collecting xmltodict (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
    
    Collecting sentry-sdk==1.21.0 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached sentry_sdk-1.21.0-py2.py3-none-any.whl (199 kB)
    
    Collecting depthai-pipeline-graph==0.0.5 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached depthai_pipeline_graph-0.0.5-py3-none-any.whl.metadata (8.8 kB)
    
    Collecting ahrs==0.3.1 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached AHRS-0.3.1-py3-none-any.whl (197 kB)
    
    Collecting numpy>=1.21 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached numpy-1.26.3-cp311-cp311-win_amd64.whl.metadata (61 kB)
    
    Collecting Qt.py>=1.3.0 (from depthai-pipeline-graph==0.0.5->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached Qt.py-1.3.10-py2.py3-none-any.whl.metadata (25 kB)
    
    Collecting packaging>=17.0 (from marshmallow==3.17.0->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
    
    Collecting certifi (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
    
    Collecting urllib3>=1.26.11 (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached urllib3-2.2.0-py3-none-any.whl.metadata (6.4 kB)
    
    Collecting requests (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
    
    Collecting PyYAML (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached PyYAML-6.0.1-cp311-cp311-win_amd64.whl.metadata (2.1 kB)
    
    Collecting boto3 (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Downloading boto3-1.34.34-py3-none-any.whl.metadata (6.6 kB)
    
    Collecting types-PySide2 (from Qt.py>=1.3.0->depthai-pipeline-graph==0.0.5->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached types_pyside2-5.15.2.1.6-py2.py3-none-any.whl.metadata (8.1 kB)
    
    Collecting botocore<1.35.0,>=1.34.34 (from boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Downloading botocore-1.34.34-py3-none-any.whl.metadata (5.7 kB)
    
    Collecting jmespath<2.0.0,>=0.7.1 (from boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached jmespath-1.0.1-py3-none-any.whl (20 kB)
    
    Collecting s3transfer<0.11.0,>=0.10.0 (from boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached s3transfer-0.10.0-py3-none-any.whl.metadata (1.7 kB)
    
    Collecting charset-normalizer<4,>=2 (from requests->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl.metadata (34 kB)
    
    Collecting idna<4,>=2.5 (from requests->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB)
    
    Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.35.0,>=1.34.34->boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
    
    Collecting urllib3>=1.26.11 (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached urllib3-2.0.7-py3-none-any.whl.metadata (6.6 kB)
    
    Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore<1.35.0,>=1.34.34->boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
    
    Using cached depthai-2.22.0.0-cp311-cp311-win_amd64.whl (10.0 MB)
    
    Using cached depthai_pipeline_graph-0.0.5-py3-none-any.whl (123 kB)
    
    Using cached blobconverter-1.4.2-py3-none-any.whl (10 kB)
    
    Using cached numpy-1.26.3-cp311-cp311-win_amd64.whl (15.8 MB)
    
    Using cached opencv_contrib_python-4.9.0.80-cp37-abi3-win_amd64.whl (45.3 MB)
    
    Using cached packaging-23.2-py3-none-any.whl (53 kB)
    
    Using cached Qt.py-1.3.10-py2.py3-none-any.whl (34 kB)
    
    Downloading boto3-1.34.34-py3-none-any.whl (139 kB)
    
    ---------------------------------------- 139.3/139.3 kB 1.0 MB/s eta 0:00:00
    
    Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
    
    Using cached PyYAML-6.0.1-cp311-cp311-win_amd64.whl (144 kB)
    
    Using cached requests-2.31.0-py3-none-any.whl (62 kB)
    
    Downloading botocore-1.34.34-py3-none-any.whl (11.9 MB)
    
    ---------------------------------------- 11.9/11.9 MB 19.8 MB/s eta 0:00:00
    
    Using cached urllib3-2.0.7-py3-none-any.whl (124 kB)
    
    Using cached charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl (99 kB)
    
    Using cached idna-3.6-py3-none-any.whl (61 kB)
    
    Using cached s3transfer-0.10.0-py3-none-any.whl (82 kB)
    
    Using cached types_pyside2-5.15.2.1.6-py2.py3-none-any.whl (572 kB)
    
    Installing collected packages: types-PySide2, xmltodict, urllib3, six, Qt.py, PyYAML, pytube, packaging, numpy, jmespath, idna, depthai, charset-normalizer, certifi, sentry-sdk, requests, PyTurboJPEG, python-dateutil, opencv-contrib-python, marshmallow, depthai-pipeline-graph, ahrs, botocore, s3transfer, boto3, blobconverter, depthai-sdk
    
    Creating virtual environment...
    
    Error occurred during dependency installation: Command '['C:\\Users\\nikunayi\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\depthai_viewer\\venv-0.1.6\\Scripts\\python', '-m', 'pip', 'install', 'depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475', '--extra-index-url', 'https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/']' returned non-zero exit status 1.
    
    Traceback (most recent call last):
    
    File "C:\Users\nikunayi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\depthai_viewer\install_requirements.py", line 85, in create_venv_and_install_dependencies
    
    subprocess.run(
    
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 571, in run
    
    raise CalledProcessError(retcode, process.args,
    
    subprocess.CalledProcessError: Command '['C:\\Users\\nikunayi\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\depthai_viewer\\venv-0.1.6\\Scripts\\python', '-m', 'pip', 'install', 'depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475', '--extra-index-url', 'https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/']' returned non-zero exit status 1.
    
    Deleting partially created virtual environment: C:\Users\nikunayi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\depthai_viewer\venv-0.1.6
    
    Requirement already satisfied: pip in c:\users\nikunayi\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages\depthai_viewer\venv-0.1.6\lib\site-packages (23.2.1)
    
    Collecting pip
    
    Obtaining dependency information for pip from https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl.metadata
    
    Using cached pip-24.0-py3-none-any.whl.metadata (3.6 kB)
    
    Using cached pip-24.0-py3-none-any.whl (2.1 MB)
    
    Installing collected packages: pip
    
    Attempting uninstall: pip
    
    Found existing installation: pip 23.2.1
    
    Uninstalling pip-23.2.1:
    
      Successfully uninstalled pip-23.2.1
    
    Successfully installed pip-24.0
    
    Looking in indexes: https://pypi.org/simple, https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/
    
    Collecting depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475
    
    Using cached https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/depthai-sdk/depthai_sdk-1.13.1.dev0%2Bb0340e0c4ad869711d7d5fff48e41c46fe41f475-py3-none-any.whl (225 kB)
    
    Collecting opencv-contrib-python>4 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached opencv_contrib_python-4.9.0.80-cp37-abi3-win_amd64.whl.metadata (20 kB)
    
    Collecting blobconverter>=1.4.1 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached blobconverter-1.4.2-py3-none-any.whl.metadata (7.5 kB)
    
    Collecting pytube>=12.1.0 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached pytube-15.0.0-py3-none-any.whl (57 kB)
    
    Collecting depthai==2.22.0 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached depthai-2.22.0.0-cp311-cp311-win_amd64.whl.metadata (8.9 kB)
    
    Collecting PyTurboJPEG==1.6.4 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached PyTurboJPEG-1.6.4-py3-none-any.whl
    
    Collecting marshmallow==3.17.0 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached marshmallow-3.17.0-py3-none-any.whl (48 kB)
    
    Collecting xmltodict (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
    
    Collecting sentry-sdk==1.21.0 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached sentry_sdk-1.21.0-py2.py3-none-any.whl (199 kB)
    
    Collecting depthai-pipeline-graph==0.0.5 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached depthai_pipeline_graph-0.0.5-py3-none-any.whl.metadata (8.8 kB)
    
    Collecting ahrs==0.3.1 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached AHRS-0.3.1-py3-none-any.whl (197 kB)
    
    Collecting numpy>=1.21 (from depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached numpy-1.26.3-cp311-cp311-win_amd64.whl.metadata (61 kB)
    
    Collecting Qt.py>=1.3.0 (from depthai-pipeline-graph==0.0.5->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached Qt.py-1.3.10-py2.py3-none-any.whl.metadata (25 kB)
    
    Collecting packaging>=17.0 (from marshmallow==3.17.0->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
    
    Collecting certifi (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
    
    Collecting urllib3>=1.26.11 (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached urllib3-2.2.0-py3-none-any.whl.metadata (6.4 kB)
    
    Collecting requests (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
    
    Collecting PyYAML (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached PyYAML-6.0.1-cp311-cp311-win_amd64.whl.metadata (2.1 kB)
    
    Collecting boto3 (from blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached boto3-1.34.34-py3-none-any.whl.metadata (6.6 kB)
    
    Collecting types-PySide2 (from Qt.py>=1.3.0->depthai-pipeline-graph==0.0.5->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached types_pyside2-5.15.2.1.6-py2.py3-none-any.whl.metadata (8.1 kB)
    
    Collecting botocore<1.35.0,>=1.34.34 (from boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached botocore-1.34.34-py3-none-any.whl.metadata (5.7 kB)
    
    Collecting jmespath<2.0.0,>=0.7.1 (from boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached jmespath-1.0.1-py3-none-any.whl (20 kB)
    
    Collecting s3transfer<0.11.0,>=0.10.0 (from boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached s3transfer-0.10.0-py3-none-any.whl.metadata (1.7 kB)
    
    Collecting charset-normalizer<4,>=2 (from requests->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl.metadata (34 kB)
    
    Collecting idna<4,>=2.5 (from requests->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB)
    
    Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.35.0,>=1.34.34->boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
    
    Collecting urllib3>=1.26.11 (from sentry-sdk==1.21.0->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached urllib3-2.0.7-py3-none-any.whl.metadata (6.6 kB)
    
    Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore<1.35.0,>=1.34.34->boto3->blobconverter>=1.4.1->depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475)
    
    Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
    
    Using cached depthai-2.22.0.0-cp311-cp311-win_amd64.whl (10.0 MB)
    
    Using cached depthai_pipeline_graph-0.0.5-py3-none-any.whl (123 kB)
    
    Using cached blobconverter-1.4.2-py3-none-any.whl (10 kB)
    
    Using cached numpy-1.26.3-cp311-cp311-win_amd64.whl (15.8 MB)
    
    Using cached opencv_contrib_python-4.9.0.80-cp37-abi3-win_amd64.whl (45.3 MB)
    
    Using cached packaging-23.2-py3-none-any.whl (53 kB)
    
    Using cached Qt.py-1.3.10-py2.py3-none-any.whl (34 kB)
    
    Using cached boto3-1.34.34-py3-none-any.whl (139 kB)
    
    Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
    
    Using cached PyYAML-6.0.1-cp311-cp311-win_amd64.whl (144 kB)
    
    Using cached requests-2.31.0-py3-none-any.whl (62 kB)
    
    Using cached botocore-1.34.34-py3-none-any.whl (11.9 MB)
    
    Using cached urllib3-2.0.7-py3-none-any.whl (124 kB)
    
    Using cached charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl (99 kB)
    
    Using cached idna-3.6-py3-none-any.whl (61 kB)
    
    Using cached s3transfer-0.10.0-py3-none-any.whl (82 kB)
    
    Using cached types_pyside2-5.15.2.1.6-py2.py3-none-any.whl (572 kB)
    
    Installing collected packages: types-PySide2, xmltodict, urllib3, six, Qt.py, PyYAML, pytube, packaging, numpy, jmespath, idna, depthai, charset-normalizer, certifi, sentry-sdk, requests, PyTurboJPEG, python-dateutil, opencv-contrib-python, marshmallow, depthai-pipeline-graph, ahrs, botocore, s3transfer, boto3, blobconverter, depthai-sdk
    
    Creating virtual environment...
    
    Error occurred during dependency installation: Command '['C:\\Users\\nikunayi\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\depthai_viewer\\venv-0.1.6\\Scripts\\python', '-m', 'pip', 'install', 'depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475', '--extra-index-url', 'https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/']' returned non-zero exit status 1.
    
    Traceback (most recent call last):
    
    File "C:\Users\nikunayi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\depthai_viewer\install_requirements.py", line 85, in create_venv_and_install_dependencies
    
    subprocess.run(
    
    File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2032.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 571, in run
    
    raise CalledProcessError(retcode, process.args,
    
    subprocess.CalledProcessError: Command '['C:\\Users\\nikunayi\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\depthai_viewer\\venv-0.1.6\\Scripts\\python', '-m', 'pip', 'install', 'depthai-sdk==1.13.1.dev0+b0340e0c4ad869711d7d5fff48e41c46fe41f475', '--extra-index-url', 'https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local/']' returned non-zero exit status 1.
    
    Deleting partially created virtual environment: C:\Users\nikunayi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\depthai_viewer\venv-0.1.6
    
    
    Thank you.

    jakaskerl

    Hi @Jackmarks Thank you for getting back.

    Couple weeks back when I tried, I was able to set focus. I did not try all the parameters but set focus to 0 and it was all blur.

    Thank you

    Hi @nikul
    Are you sure it was the same camera?
    Try with https://docs.luxonis.com/projects/api/en/latest/samples/ColorCamera/rgb_camera_control/.

    Control:      key[dec/inc]  min..max
      exposure time:     I   O      1..33000 [us]
      sensitivity iso:   K   L    100..1600
      focus:             ,   .      0..255 [far..near]
      white balance:     N   M   1000..12000 (light color temperature K)

    Thanks,
    Jaka

    Turns out the setResolution() also something which not really working for me. whatever perameter I set in my video surveillance system it is showing 1080.

    Also I want to crop the streaming and want to get only center of the video, can you show my how can I apply this considering the code I have provided above.

    Thank you.

      nikul Turns out the setResolution() also something which not really working for me. whatever perameter I set in my video surveillance system it is showing 1080.

      Please add a MRE of this issue so we can pinpoint the culprit.

      nikul Also I want to crop the streaming and want to get only center of the video, can you show my how can I apply this considering the code I have provided above.

      • Create a ImgManip node
      • Link camRgb as input, and pipe the output to whatever you need (streaming/NN/etc)
      • use Imagemanip's manip.initialConfig.setCropRect() or manip.initialConfig.setCenterCrop()
        Keep in mind, values for the second one are normalized (0-1)

      Thanks,
      Jaka

        jakaskerl Thank You.

        import depthai as dai
        import time
        
        # Start defining a pipeline
        pipeline = dai.Pipeline()
        # Define a source - color camera
        cam = pipeline.create(dai.node.ColorCamera)
        cam.setFps(60)
        cam.setResolution(dai.ColorCameraProperties.SensorResolution.THE_720_P)
        cam.initialControl.setManualFocus(185) # 0..255
        
        manip = pipeline.create(dai.node.ImageManip)
        manip.initialConfig.setCropRect(0.3917, 0.3574, 0.6083, 0.7426)
        
        # VideoEncoder
        jpeg = pipeline.create(dai.node.VideoEncoder)
        jpeg.setDefaultProfilePreset(cam.getFps(), dai.VideoEncoderProperties.Profile.MJPEG)
        
        
        # Script node
        script = pipeline.create(dai.node.Script)
        
        script.setProcessor(dai.ProcessorType.LEON_CSS)
        script.setScript("""
            import time
            import socket
            import fcntl
            import struct
            from socketserver import ThreadingMixIn
            from http.server import BaseHTTPRequestHandler, HTTPServer
        
            PORT = 8080
        
            def get_ip_address(ifname):
                s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
                return socket.inet_ntoa(fcntl.ioctl(
                    s.fileno(),
                    -1071617759,  # SIOCGIFADDR
                    struct.pack('256s', ifname[:15].encode())
                )[20:24])
        
            class ThreadingSimpleServer(ThreadingMixIn, HTTPServer):
                pass
        
            class HTTPHandler(BaseHTTPRequestHandler):
                def do_GET(self):
                    if self.path == '/':
                        self.send_response(200)
                        self.end_headers()
                        self.wfile.write(b'<h1>[DepthAI] Hello, world!</h1><p>Click <a href="img">here</a> for an image</p>')
                    elif self.path == '/img':
                        try:
                            self.send_response(200)
                            self.send_header('Content-type', 'multipart/x-mixed-replace; boundary=--jpgboundary')
                            self.end_headers()
                            fpsCounter = 0
                            timeCounter = time.time()
                            while True:
                                jpegImage = node.io['jpeg'].get()
                                self.wfile.write("--jpgboundary".encode())
                                self.wfile.write(bytes([13, 10]))
                                self.send_header('Content-type', 'image/jpeg')
                                self.send_header('Content-length', str(len(jpegImage.getData())))
                                self.end_headers()
                                self.wfile.write(jpegImage.getData())
                                self.end_headers()
        
                                fpsCounter = fpsCounter + 1
                                if time.time() - timeCounter > 1:
                                    node.warn(f'FPS: {fpsCounter}')
                                    fpsCounter = 0
                                    timeCounter = time.time()
                        except Exception as ex:
                            node.warn(str(ex))
        
            with ThreadingSimpleServer(("", PORT), HTTPHandler) as httpd:
                node.warn(f"Serving at {get_ip_address('re0')}:{PORT}")
                httpd.serve_forever()
        """)
        
        # Connections
        # Linking
        cam.video.link(manip.inputImage)  # Link camera to ImageManip
        manip.out.link(jpeg.input)  # Link ImageManip to VideoEncoder
        jpeg.bitstream.link(script.inputs['jpeg'])

        I was able to crop the frame but resolution issue is still the same.

        Hi @nikul
        I think 720P is not supported on IMX378, that's why it's defaulting to 1080p. Other (higher) resolution should work as intended.
        And you should be getting a warning for unsupported resolution in the depthai during bootup.

        Thanks,
        Jaka

          jakaskerl Thank you.
          Is there anyway we can reduce the bitrate in MJPEG streaming.