I have added 2 clip data source into the transcoder. The total video length is 7s.
I have added clip source 1 for 0 to 1s and clip source 2 for 3 to 7s. The video should be of 5s.
But the final video has content of 5s but at the end last 2s video is kind of paused.
val dataSink = DefaultDataSink(videoFile.absolutePath)
val builder = Transcoder.into(dataSink)
.addDataSource(ClipDataSource(UriDataSource(applicationContext, Uri.parse(inputSource.absolutePath)), 0, 1000 * 1000))
.addDataSource(ClipDataSource(UriDataSource(applicationContext, Uri.parse(inputSource.absolutePath)), 3000 * 1000, 7000 * 1000))
builder.setListener(object : TranscoderListener {
override fun onTranscodeCompleted(successCode: Int) {
Logger.v(TAG, "cutout final video, completed")
}
override fun onTranscodeProgress(progress: Double) {
Logger.v(TAG, "cutout final video, progress - $progress")
}
override fun onTranscodeCanceled() {
Logger.v(TAG, "cutout final video, canceled")
}
override fun onTranscodeFailed(exception: Throwable) {
Logger.v(TAG, "cutout final video, failed")
exception.printStackTrace()
}
}).transcode()