Skip to content
jordondPublic

About

Kotlin Multiplatform library for encoding, editing and previewing video on Android, iOS, macOS, the JVM and the browser

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

387 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

filmstrip

Maven Central CI Docs Licence OpenSSF Scorecard

Kotlin Compose Multiplatform Media3

Android iOS macOS JVM Browser

A Kotlin Multiplatform library for encoding, editing and previewing video. It targets Android, iOS, macOS, the JVM and the browser, and uses whatever encoder the platform already has: Media3 Transformer on Android, AVFoundation and VideoToolbox on Apple, WebCodecs in the browser. The published artifacts carry no native binaries. The JVM backend shells out to ffmpeg 8.0 or later, either one you installed yourself or the one the opt-in filmstrip-transform-ffmpeg-bundled artifact brings.

filmstrip is pre-1.0.0, so the API might break between releases until then.

Install

kotlin {
  sourceSets {
    commonMain.dependencies {
      implementation("dev.jordond.filmstrip:filmstrip:<version>")
    }
  }
}

filmstrip brings core, the effects, the player and the right backend for each target. Installation lists the other artifacts and what each platform needs.

Usage

val filmstrip = Filmstrip()

val composition = compositionOf {
  clip(MediaSource.of(path))
}

val plan = when (val verdict = filmstrip.plan(composition, ExportSpec.Upload)) {
  is Verdict.Capable -> verdict.plan
  is Verdict.Degraded -> verdict.plan
  is Verdict.Incapable -> error("Can't export on this device: ${verdict.reasons}")
}

filmstrip.export(plan, MediaSink.temporary()).collect { status ->
  if (status is ExportStatus.Success) println("Wrote ${status.output}")
}

Docs

Contributing

CONTRIBUTING.md covers building, the test suites, the sample app and releasing.

Licence

MIT, see LICENSE.

About

Kotlin Multiplatform library for encoding, editing and previewing video on Android, iOS, macOS, the JVM and the browser

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages