Wayne a876d24cd9 Add readme | vor 6 Jahren | |
---|---|---|
src | vor 6 Jahren | |
.gitignore | vor 6 Jahren | |
README.md | vor 6 Jahren | |
build.gradle | vor 6 Jahren | |
proguard-rules.pro | vor 6 Jahren |
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()