Companion

Functions

Link copied to clipboard

Returns machine-specific default device

Link copied to clipboard

Returns machine-specific default screen device

Link copied to clipboard
fun fromDevice(audioDevice: AudioDevice?, deviceName: String = defaultDevice(), deviceMode: VideoDeviceMode, mode: PlayMode = PlayMode.VIDEO, configuration: VideoPlayerConfiguration = VideoPlayerConfiguration.live()): VideoPlayerFFMPEG

Opens a webcam or video device in deviceMode, a mode from listDeviceModes. The device delivers images of the size and in the pixel format or codec of the mode, at the highest frame rate of the mode.

fun fromDevice(audioDevice: AudioDevice?, deviceName: String = defaultDevice(), mode: PlayMode = PlayMode.VIDEO, frameRate: Double? = null, imageWidth: Int? = null, imageHeight: Int? = null, configuration: VideoPlayerConfiguration = VideoPlayerConfiguration.live(), pixelFormat: String? = null, codec: String? = null): VideoPlayerFFMPEG

Opens a webcam or video device

Link copied to clipboard
fun fromScreen(audioDevice: AudioDevice?, screenName: String = defaultScreenDevice(), mode: PlayMode = PlayMode.VIDEO, frameRate: Double? = null, imageWidth: Int? = null, imageHeight: Int? = null, windowId: String? = null, configuration: VideoPlayerConfiguration = screenRecordingConfiguration): VideoPlayerFFMPEG

Opens the screen for grabbing frames See https://trac.ffmpeg.org/wiki/Capture/Desktop

Link copied to clipboard
fun listDeviceModes(deviceName: String = defaultDevice()): List<VideoDeviceMode>

Lists the modes that the video device deviceName supports, a name from listDeviceNames. A mode can be passed to fromDevice and loadVideoDevice. On Linux the modes have no frame rates.

Link copied to clipboard

Lists the names of the available video devices, the names can be passed to fromDevice

Link copied to clipboard

Lists the names of the screens that can be captured, the names can be passed to fromScreen. On macOS these are Capture screen <N>, on Linux X11 displays like :0, on Windows the desktop.