Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix frame recording #1008

Merged
merged 1 commit into from
Apr 26, 2023
Merged

Fix frame recording #1008

merged 1 commit into from
Apr 26, 2023

Conversation

Erol444
Copy link
Member

@Erol444 Erol444 commented Apr 25, 2023

Inside XoutFrames, when called __del__, self._video_recorder was always None, so it didn't properly close the .mp4 video file and it was invalid (video players failed). I guess GC did its thing beforehand.

    def __del__(self):
        if self._video_recorder:

TODO: Fix recording both right + stereo, currently right isn't recorded:

with OakCamera() as oak:
    left = oak.create_camera('left', resolution='800p')
    right = oak.create_camera('right', resolution='800p')
    stereo = oak.create_stereo(left=left, right=right)
    oak.visualize(stereo.out.disparity, record_path='stereo.mp4')
    oak.visualize(right, record_path='right.mp4')
    oak.start(blocking=True)

@daniilpastukhov daniilpastukhov merged commit 535da32 into develop Apr 26, 2023
@daniilpastukhov daniilpastukhov deleted the fix_recording branch April 26, 2023 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants