Add tiff video profile (#185)
This commit is contained in:
19
orx-video-profiles/src/demo/kotlin/DemoTIFF01.kt
Normal file
19
orx-video-profiles/src/demo/kotlin/DemoTIFF01.kt
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
16
orx-video-profiles/src/main/kotlin/TIFFProfile.kt
Normal file
16
orx-video-profiles/src/main/kotlin/TIFFProfile.kt
Normal 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")
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user