Description
The Webcam Asset - available on all Player platforms but Samsung Tizen - enables Intuiface experiences to display the live video feed from a single webcam. In addition, exclusively on Windows PCs, snapshots of that live feed can be taken for post-processing and sharing.
If more than one webcam is connected to a device, Intuiface will use whichever camera is considered to be the "primary" camera.
NOTE:
- On Windows, Intuiface only supports DirectShow-compatible cameras: the camera must be recognized by Windows as a Webcam, which means it is a DirectShow source, thus visible in other software such as Skype, VLC, etc. If these tools don't recognize the camera as a video source, Intuiface will not either.
Adding the Webcam asset into your experience.
To add the Webcam asset into an experience you are editing with Composer, either
- Right-click an empty part of the scene and select the right-click menu option Insert->Asset ->Webcam, OR
- Select the Webcam asset button in the Asset panel on the left-hand side of Composer.
The Webcam asset will display a live feed as long as it is selected. Selecting any other item in the scene will stop the live feed.
Displaying a live video input (Windows PCs only)
On Windows PCs, the Webcam Asset can display any feed considered to be coming from a webcam - i.e. a video stream using the DirectShow format. As a result, you can use software like OBS Studio or hardware like Blackmagic Design ATEM Mini to convert an SDI or HDMI input into a virtual webcam usable within Intuiface.
On the left, a Webcam Asset uses the OBS Virtual Camera as an input. On the right, OBS Studio is taking an SDI input and converting it into a virtual webcam feed.
Taking and Preserving a Snapshot (Windows only)
Taking and preserving a snapshot of a live webcam feed is a three-step process.
-
Selecting a sharing queue
Add the interface asset corresponding to how you (optionally) intend to share one or more snapshots. These interface assets possess a "sharing queue," and it is in this queue that all snapshots will be placed. See the corresponding article for more information about the sharing queue.
- Share via Filesystem
- Share via USB
- Either of the Share via Email interface assets.
-
Taking the snapshot
One of the actions available for the Webcam asset is "Take snapshot". Call this action whenever you want to capture a still image from the live webcam feed.
-
Adding each snapshot into the sharing queue
At the space level, use the Snapshot is taken trigger to call the Add item to sharing queue action for the sharing interface asset you selected in Step One above.
The value of the URI parameter for the Add item to sharing queue action is located in the URI parameter of the Snapshot is taken trigger. Use binding to store the trigger's URI parameter value in the corresponding action parameter.
The interface asset you selected in Step One will store an unlimited number of snapshots, assigning each a unique URI that can be referenced, through binding, in the Image property of the Image asset.
You can download the "Self-service Photobooth" experience using the Examples tab of Composer's Experiences panel to see this use case in action!
Switching front/back webcam feeds through bindings on Android/iOS
You can directly access the front and back webcam feeds through bindings using the following values:
- user: will allow you to display the front webcam feed of your device
- environment: will allow you to display the back webcam feed of your device
NOTE: these value are lower case sensitive
Example:
Add a Text Input to your Scene then set it default text property of that Text Input to "user"
Bind the Camera property of the Webcam Asset to the Text Input "text" property
On a Button Asset add a set text action targeting the Text Input
Set the new text to environment
On another Button Asset, add a set text action targeting the same Text Input
Set the new text to user
Now you can dynamically switch from the front to the back webcam feeds and vice versa.
Alternatively, you can also use a Toggle Button with the "is checked/unchecked" trigger if you want to only use one button or even Image Buttons if you want to use some front/back webcam icons.
Properties, Triggers & Actions
Properties
See our list of common properties for details about properties shared by all asset types.
Webcam
-
Camera: Specifies the camera to be used by the experience. The dropdown menu lists the following choices:
- Default: The camera considered 'default' by the device.
- A list of all installed webcams, displayed with their name
- An additional list:
- Front: On Windows PCs, this is the camera facing the keyboard.
- Android - Webcam User: Front-facing camera for Android devices. For example, can be used for selfies.
- Android - Webcam Environment: Back-facing camera for Android devices.
- You can also specify the name of a Webcam directly.
- Mirror image: If selected, the live feed will appear as a mirror image of the displayed item.
- Delay: The time - in tenths of a second - between live action and when that action is displayed in the Webcam asset. Increasing the delay will improve image quality.
-
Video resolution: Indicates the resolution of the video feed. You have multiple options:
- 320 x 240
-
640 x 480
- Recommended because many cameras mistakenly permit higher resolutions than they can handle. The excessive resolution could 1) cause poor image quality because the image sensor can't scale or 2) cause slow performance because the camera can't transmit the video feed at a high enough bit rate. 640x480 is universally supported across all webcams.
- 1280x720 (HD)
- 1600x1200 (UXGA)
- 1920x1080 (Full HD)
-
Set by camera
- Maximum resolution available with the selected camera. Be careful about using this option. See the point above about 640x480. In addition, we've found that sometimes, this default setting is undefined, making the resulting resolution unpredictable.
Triggers
See Triggers Overview and Actions Overview to get details of common triggers and actions shared by all assets
- Starts capture: Raised when video begins to stream from the webcam.
- Stops capture: Raised when video stops streaming from the webcam.
Actions
- Start capture: Display video stream from the webcam.
- Stop capture: Stop displaying video stream from the webcam.
Comments
0 comments
Article is closed for comments.