Skip to content

Commit

Permalink
Update encoder_preview.py example
Browse files Browse the repository at this point in the history
  • Loading branch information
daniilpastukhov committed Jul 23, 2023
1 parent b8fed32 commit f0dddbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions depthai_sdk/examples/recording/encoder_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from depthai_sdk import OakCamera
from depthai_sdk.recorders.video_writers.av_writer import AvWriter

rec = AvWriter(Path('./'), 'color', 'mjpeg', fps=30)
rec = AvWriter(Path('./'), 'color', 'mjpeg', fps=30, frame_shape=(1920, 1080))


def save_raw_mjpeg(packet):
rec.write(packet.msg)


with OakCamera() as oak:
color = oak.create_camera('color', encode='MJPEG', fps=30)
color = oak.create_camera('color', resolution='1080p', encode='MJPEG', fps=30)

oak.visualize(color, scale=2 / 3, fps=True)
oak.callback(color, callback=save_raw_mjpeg)
Expand Down

0 comments on commit f0dddbd

Please sign in to comment.