diff --git a/orx-video-profiles/src/demo/kotlin/DemoTIFF01.kt b/orx-video-profiles/src/demo/kotlin/DemoTIFF01.kt new file mode 100644 index 00000000..920133f8 --- /dev/null +++ b/orx-video-profiles/src/demo/kotlin/DemoTIFF01.kt @@ -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) + } + } +} \ No newline at end of file diff --git a/orx-video-profiles/src/main/kotlin/TIFFProfile.kt b/orx-video-profiles/src/main/kotlin/TIFFProfile.kt new file mode 100644 index 00000000..50cb377e --- /dev/null +++ b/orx-video-profiles/src/main/kotlin/TIFFProfile.kt @@ -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 { + return arrayOf("-vf", "vflip") + } +}