[Deprecated]

Wayne a876d24cd9 Add readme 6 سال پیش
src 0f2fdb897c init 6 سال پیش
.gitignore 0f2fdb897c init 6 سال پیش
README.md a876d24cd9 Add readme 6 سال پیش
build.gradle 0f2fdb897c init 6 سال پیش
proguard-rules.pro 0f2fdb897c init 6 سال پیش

README.md

Example

val w = 320
val h = 240
val speed = 6
val imageCount = 120
val file = File(Environment.getExternalStorageDirectory(), "qq.mp4")

val encoder = FFMPEGEncode()
encoder.start(w, h, speed, imageCount, file)
val bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_4444)
val canvas = Canvas(bitmap)
val paint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
    strokeWidth = 10f
    color = Color.WHITE
}

for (i in 0..imageCount) {
    canvas.drawColor(Color.BLUE)
    canvas.drawText(i.toString(), 30f, 30f, paint)
    encoder.addImage(bitmap)
}

encoder.end()