• DepthAI-v2
  • AttributeError: 'depthai.node.XLinkIn' object has no attribute 'getBoardSocket'

Hi getting the above error all of a sudden when trying to reply
using this to record

from depthai_sdk import OakCamera, RecordType
import time

duration = 10
with OakCamera(rotation=180) as oak:
    color = oak.create_camera('color', resolution='1080P', fps=15, encode='H265')
    left = oak.create_camera('left', resolution='800p', fps=15, encode='H265')
    right = oak.create_camera('right', resolution='800p', fps=15, encode='H265')
    # Sync & save all (encoded) streams
    oak.record([color.out.encoded, left.out.encoded,right.out.encoded ], './')
    oak.start()
    start_time = time.monotonic()
    while oak.running():
        if time.monotonic() - start_time > duration:
            break
        oak.poll()

using this to reply

import cv2
from depthai_sdk import OakCamera, RecordType
from depthai_sdk.classes import FramePacket

with OakCamera(replay='./2-184430108196870E00') as oak:
    color = oak.create_camera('color', resolution='1080P', fps=15, encode='H265')
    left = oak.create_camera('left', resolution='800p', fps=15, encode='H265')
    right = oak.create_camera('right', resolution='800p', fps=15, encode='H265')

    def cb(packet: FramePacket):
        cv2.imshow(packet.name, packet.frame)

    # Show color stream
    vis = oak.visualize([color.out.camera,left.out.camera,right.out.camera], scale=2/3, fps=True , callback=cb)
    oak.start(blocking=True)

depthai 2.22.0.0
depthai-pipeline-graph 0.0.5
depthai-sdk 1.12.1

    OzayrMoorad create_camera() is deprecated, use camera() instead. I ran your scripts with camera() and it worked fine. I am using depthai-sdk 1.9.5.

      vital

      using camera on sdk 1.12.1 gives same error

      downgrading to 1.9.5 solves the issue but then had to use create_camera

      also any idea why playback is so slow and laggy ?

      22 days later

      We are facing the same issue using camera() and the latest packaged version. Only solution working solution for us is to use 1.9.5 as suggested above. Any idea how to get this working with the latest version?

      Hi @OzayrMoorad @michael_exwzd
      You should just use color or color.out.main instead of color.out.camera, as you are using replay, not live stream (camera). It's expected to be a bit slower, as you are streaming high-res frames to the device, do processing there, and send results back (round-trip, instead of one-way trip from camera to computer).