ImageToVideoAndroid

Additional

Language
Kotlin
Version
v0.1.0 (Oct 21, 2018)
Created
Sep 12, 2018
Updated
Oct 21, 2018 (Retired)
Owner
Masayuki Suda (MasayukiSuda)
Contributor
Masayuki Suda (MasayukiSuda)
1
Activity
Badge
Generate
Download
Source code

ImageToVideoAndroid


Easy Image to Video Converter

Gradle

Step 1. Add the JitPack repository to your build file

allprojects {
 repositories {
  ...
  maven { url 'https://jitpack.io' }
 }
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.MasayukiSuda:ImageToVideoAndroid:v0.1.0'
}

Usage

  imageToVideo = ImageToVideoConverter(
      outputPath = outputVideoPath,
      inputImagePath = inputImagePath,
      size = Size(720, 720),
      duration = TimeUnit.SECONDS.toMicros(4),
      listener = object : EncodeListener {
        override fun onProgress(progress: Float) {
          Log.d("progress", "progress = $progress")
          runOnUiThread {
            progressBar.progress = (progress * 100).toInt()
          }
        }

        override fun onCompleted() {
          runOnUiThread {
            progressBar.progress = 100
          }
        }
 
        override fun onFailed(exception: Exception) {

        }
     }
    )
  imageToVideo?.start()

Sample Dependencies

License

MIT License