| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
AVRecorder.SetVideoDevice
Sets the video device to use.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| AVRecorder | 6.1 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
MBS( "AVRecorder.SetVideoDevice"; AVSession; Device { ; DesiredWidth; DesiredHeight } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| AVSession | The ID for the AVRecorder session as returned by AVRecorder.Init. | $AVSession | |
| Device | The device name, ID or index. | 0 | |
| DesiredWidth | The pixel width you like to have. Only used on Windows to pick a specific resolution if available. Otherwise we usually pick highest available resolution. |
1920 | Optional |
| DesiredHeight | The pixel height you like to have. Only used on Windows to pick a specific resolution if available. Otherwise we usually pick highest available resolution. |
1080 | Optional |
Result
Returns OK or error.
Description
Sets the video device to use.See AVRecorder.VideoDeviceCount and AVRecorder.VideoDeviceInfo to learn what devices are available.
If you have trouble with the resolution on Windows, please check the settings for the camera:
- Go to Settings in Windows
- Bluetooth & Devices
- Cameras
- Pick the camera in the list
- Advanced camera options -> Edit
- Turn on basic camera
- Change Media Type to e.g. 2560x1440.
- Apply
Not all cameras may have such options. Our plugin usually picks the highest available resolution if available. Some cameras just use some default setting like 640x480. But you may be able to configure a higher resolution as default.
Examples
Sets to use first video device:
Set Variable [$r; Value:MBS("AVRecorder.SetVideoDevice"; AVRecorder::Session; 0)]
Use video device with name "FaceTime HD Camera":
Set Variable [$r; Value:MBS("AVRecorder.SetVideoDevice"; AVRecorder::Session; "FaceTime HD Camera")]
See also
- AVRecorder.CaptureStillPhoto
- AVRecorder.GetAudioDevice
- AVRecorder.GetVideoDevice
- AVRecorder.Init
- AVRecorder.SetAudioDevice
- AVRecorder.SetVideoMirrored
- AVRecorder.VideoDeviceCount
- AVRecorder.VideoDeviceInfo
Release notes
- Version 12.0
- Added new parameters for AVRecorder.SetVideoDevice function to pick desired width and height of resolution.
- Version 11.3
- Improved AVRecorder.AudioDeviceInfo, AVRecorder.SetAudioDevice, AVRecorder.SetVideoDevice and AVRecorder.VideoDeviceInfo to query device list automatically.
Example Databases
Blog Entries
- MBS FileMaker Advent calendar - Door 22 - Taking Photos
- Neues MBS FileMaker Plugin 12.0
- MBS FileMaker Plugin 12.0 - More than 6700 Functions In One Plugin
- MBS FileMaker Plugin, version 11.6pr2
- MBS FileMaker Plugin, version 11.3pr6
- AVRecorder on iOS
This function checks for a license.
Created 9th February 2016, last changed 26th August 2025