diff options
Diffstat (limited to '')
| -rw-r--r-- | src/main/kotlin/org/openrndr/Preload.kt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/kotlin/org/openrndr/Preload.kt b/src/main/kotlin/org/openrndr/Preload.kt index 9664416..e6a9688 100644 --- a/src/main/kotlin/org/openrndr/Preload.kt +++ b/src/main/kotlin/org/openrndr/Preload.kt @@ -1,17 +1,23 @@ package org.openrndr import org.openrndr.draw.* -import org.openrndr.extensions.Screenshots import org.openrndr.extra.olive.* -import phenax.extensions.HeadlessRecorder +import org.openrndr.ffmpeg.ScreenRecorder import phenax.extensions.HeadlessScreenshot import phenax.utils.* class Preload : ApplicationPreload() { override fun onProgramSetup(program: Program) { - println("BACKEND(${program.name}): ${program.application::class.qualifiedName}") + println("Program: ${program.name}") if (recordingEnabled) { - program.extend(HeadlessRecorder()) + program.extend(ScreenRecorder()) { + outputToVideo = true + outputFile = "video/${program.name}.mp4" + frameRate = 60 + maximumDuration = recordDuration() + quitAfterMaximum = true + multisample = BufferMultisample.SampleCount(16) + } } else if (screenshotEnabled) { program.extend(HeadlessScreenshot()) } |
