Skip to content

edgeengineer/edge-media

Repository files navigation

Edge Media

Edge Media is a Swift package that provides support for capturing video and audio data, and converting them to a variety of formats.

OS Support Edge-Media currently only supports Linux using the video4linux APIs.

Usage

import EdgeMedia

let devices = try await VideoDevice.listDevices()

guard let device = devices.first else {
    throw Error("No video devices found")
}

// Capture an image, specifying the format type
let jpeg = try await device.capture(
    width: 640,
    height: 480,
    format: JPEGImage.self
)

let jpegBytes = try jpeg.encoded(compression: 0.8).bytes

About

Audio and Video support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published