Hi!
First of all, thank you for Oak-D, i love it!
As i´m just getting started i have a question about encoding and saving video. In the examples about encoding it says you have to run it from a git context. I have tried running it from the power shell terminal in Visual Studio 2022 without getting it to work.
Could someone please explain how this is to be don? (if you can and have the time, please make it bullet proof as i´m new to this) 😀
Antother question about encoding. As i did not really make it with the depthai api i went to the depth Sdk and tried there.
I cant seem to find any guides on encoding in SDK besides the demo.py-file which is kind of clogged up with other stuff. When i try to make it myself i get an error: "createEncoders() missing 1 required positional argument: 'pm'"
I think i have tried them all without any success,
this is my code so far:
from depthai_sdk import Previews
from depthai_sdk.managers import PipelineManager, PreviewManager, EncodingManager
import depthai
import cv2
from pathlib import Path
PipeManager = PipelineManager()
PipeManager.createColorCam(xout=True)
EncManager = EncodingManager.createEncoders(PipelineManager)
with depthai.Device(PipeManager.pipeline) as device:
PrevManager = PreviewManager(display=[Previews.color.name])
PrevManager.createQueues(device)
EncManager.createDefaultQueues()
EncManager.close()
while True:
PrevManager.prepareFrames()
PrevManager.showFrames()
EncManager = EncodingManager(encodeConfig=PrevManager.showFrames)
EncManager.encodeOutput('D:\Visual_Studio\Oak\data_set_1')
if cv2.waitKey(1) == ord('q'):
break
The preview works like a charm but i´m having problems making friends with the encoding part.
Could someone please tell me what i´m doing wrong?
I´m trying to record video to use as a training data set for a model so i would like to be able to see what i´m recording/about to record.
Thank you!
Martin