Add tiff video profile (#185)

This commit is contained in:
Abe Pazos
2021-04-16 17:59:06 +03:00
committed by GitHub
parent f625844f88
commit 0d529ba0bd
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.videoprofiles.TIFFProfile
import org.openrndr.ffmpeg.ScreenRecorder
fun main() = application {
program {
extend(ScreenRecorder()) {
profile = TIFFProfile()
outputFile = "frame-%05d.tif"
maximumFrames = 20
}
extend {
drawer.clear(ColorRGBa.GREEN)
drawer.fill = ColorRGBa.WHITE
drawer.rectangle(frameCount / 20.0 * width, 0.0, 100.0, 100.0)
}
}
}

View File

@@ -0,0 +1,16 @@
package org.openrndr.extra.videoprofiles
import org.openrndr.ffmpeg.VideoWriterProfile
/**
* This profile requires specifying a file name like this
* outputFile = "frame-%05d.tif"
* where `%05d` means "zero-padded five-digit frame number".
* The frame number format is not optional.
*/
class TIFFProfile : VideoWriterProfile() {
override val fileExtension = "tif"
override fun arguments(): Array<String> {
return arrayOf("-vf", "vflip")
}
}