Skip to content

Latest commit

 

History

History
61 lines (52 loc) · 1.52 KB

README.md

File metadata and controls

61 lines (52 loc) · 1.52 KB

ImageToVideoAndroid

Platform API
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