Skip to content

Commit 1599e19

Browse files
authored
Merge pull request #976 from luxonis/update_videoEnc_docs
Update videoEnc docs, specifically about setQuality and setBitrate
2 parents d234632 + 8aa0826 commit 1599e19

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed
1.66 KB
Loading

docs/source/components/device.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ subnet, you can specify the device (either with MxID, IP, or USB port name) you
5656
# ...
5757
5858
Host clock syncing
59-
==================
59+
##################
6060

6161
When depthai library connects to a device, it automatically syncs device's timestamp to host's timestamp. Timestamp syncing happens continuously at around 5 second intervals,
6262
and can be configured via API (example script below).

docs/source/components/nodes/video_encoder.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ Usage
5353
# Set H265 encoding for the ColorCamera video output
5454
videoEncoder = pipeline.create(dai.node.VideoEncoder)
5555
videoEncoder.setDefaultProfilePreset(cam.getFps(), dai.VideoEncoderProperties.Profile.H265_MAIN)
56+
videoEncoder.setBitrateKbps(500) # 0.5 Mbps
5657

5758
# Create MJPEG encoding for still images
5859
stillEncoder = pipeline.create(dai.node.VideoEncoder)
5960
stillEncoder.setDefaultProfilePreset(1, dai.VideoEncoderProperties.Profile.MJPEG)
61+
# stillEncoder.setLossless(True) # Lossless only for MJPEG
62+
stillEncoder.setQuality(90) # 0-100, 100 being the best quality (not lossless though)
6063

6164
cam.still.link(stillEncoder.input)
6265
cam.video.link(videoEncoder.input)
@@ -69,10 +72,13 @@ Usage
6972
// Set H265 encoding for the ColorCamera video output
7073
auto videoEncoder = pipeline.create<dai::node::VideoEncoder>();
7174
videoEncoder->setDefaultProfilePreset(cam->getFps(), dai::VideoEncoderProperties::Profile::H265_MAIN);
75+
videoEncoder->setBitrateKbps(500); // 0.5 Mbps
7276

7377
// Create MJPEG encoding for still images
7478
stillEncoder = pipeline.create(dai.node.VideoEncoder);
7579
stillEncoder->setDefaultProfilePreset(1, dai::VideoEncoderProperties::Profile::MJPEG);
80+
// stillEncoder->setLossless(true); // Lossless only for MJPEG
81+
stillEncoder->setQuality(90); // 0-100, 100 being the best quality (not lossless though)
7682

7783
cam->still.link(stillEncoder->input);
7884
cam->video.link(videoEncoder->input);

0 commit comments

Comments
 (0)