16 stream = device.stream()
20 output_file = os.path.expanduser(
'~/Movie2ExampleVideo.cvrv')
25 pixel_format = cvb.movie2.RecorderPixelFormat.Color
26 if len(device.device_image.planes) == 1:
27 pixel_format = cvb.movie2.RecorderPixelFormat.Mono
29 with cvb.movie2.Recorder(output_file, device.device_image.size, pixel_format, raw_video_settings)
as recorder:
31 print(
"Start recording 100 frames:")
34 image, status = stream.wait()
35 if status == cvb.WaitStatus.Ok:
42 print(
"\nMovie file written to: " + output_file)
Union[cvb.GenICamDevice, cvb.VinDevice, cvb.EmuDevice, cvb.VideoDevice, cvb.NonStreamingDevice] open(str provider, int acquisition_stack=cvb.AcquisitionStack.PreferVin)
Opens a device with the given provider and acquisition stack.
Definition: __init__.py:1629
Settings for initializing a raw video engine recorder.
Definition: __init__.py:39
Recorder object writing video streams with the given pixel format and recording engine.
Definition: __init__.py:61
Common Vision Blox Movie recording module for Python.
Definition: __init__.py:1
str install_path()
Directory Common Vision Blox has been installed to.
Definition: __init__.py:8318