Camera

Brings the live picture of a camera into the graph.

Outputs

NameTypeDescription
OutputTextureThe newest frame from the camera, or nothing while no camera is streaming.

Parameters

NameTypeDescription
DeviceEnumThe camera to read from. Default is the first camera the computer lists, and the other choices are the cameras by name.
ActiveBoolWhether the camera is in use. Off releases it for other applications.
SizeoutputVector 2 IntThe width and height of the frames in pixels, 0 by 0 until a frame arrives.
ConnectedoutputBoolWhether frames are arriving from the camera.

The Camera operator brings the live picture of a camera into the graph. Anything the computer shows as a camera works: a built-in or USB webcam, a capture card that presents itself as one, or a virtual camera from another application. The camera picks its own frame size and rate.

A graph set to Default works on any machine with a camera, so use it for a graph you share. A camera picked by name is found again after a restart, whatever else is plugged in. While the chosen camera is unplugged the output carries nothing, and it is picked up again as soon as it returns. A camera that another application holds is tried again when Active or Device changes.

On macOS the system asks for permission the first time a camera is used. When it is refused, give access in System Settings under Privacy & Security, Camera. The picture is not mirrored the way a video call shows it, so use Flip for that.

See also Flip, Window.

Keywords: webcam, capture, video, live, capture card, usb, device, input device