Hey! So I have went with your approach and am attempting to merge the encoder example and the tiny yolo example (code below). My current error is detectionNetwork.out.link(videnc2.input). Could really use some help!
RuntimeError: Cannot link 'DetectionNetwork.out' to 'VideoEncoder.in'
i basically tried creating a new stream:
FPS =30
videnc2 = pipeline.create(dai.node.VideoEncoder)
videnc2.setDefaultProfilePreset(FPS, dai.VideoEncoderProperties.Profile.H265_MAIN)
detectionNetwork.out.link(videnc2.input) #this is also done above
videnc2.bitstream.link(nnOut.input)
nnout = pipeline.create(dai.node.XLinkOut)
nnout.setStreamName("encoded2")
videnc2.bitstream.link(nnout.input)
Then I create a second queue and attempt to send it as a second paramater using .send_data:
with dai.Device(pipeline, device_info) as device:
encoded = device.getOutputQueue("encoded", maxSize=30, blocking=True)
encoded2 = device.getOutputQueue("encoded2", maxSize=30, blocking=True) #TEST
print("Setup finished, RTSP stream available under \"rtsp://localhost:8554/preview\"")
while True:
data = encoded.get().getData()
data2 = encoded2.get().getData() #TEST
server.send_data(data, data2)