From dfd99cdb9069d2845ffefc5d3ec57d54438f019c Mon Sep 17 00:00:00 2001 From: Edwin Jakobs Date: Sat, 27 Feb 2021 08:31:42 +0100 Subject: [PATCH] [orx-video-profiles] Add Webp profile --- orx-video-profiles/README.md | 21 +++++++++++++++++++ .../src/main/kotlin/WebpProfile.kt | 10 +++++++++ 2 files changed, 31 insertions(+) create mode 100644 orx-video-profiles/src/main/kotlin/WebpProfile.kt diff --git a/orx-video-profiles/README.md b/orx-video-profiles/README.md index c40db764f..6143ed3f0 100644 --- a/orx-video-profiles/README.md +++ b/orx-video-profiles/README.md @@ -57,6 +57,27 @@ fun main() = application { } ``` +### Animated Webp + +``` +import org.openrndr.application +import org.openrndr.color.ColorRGBa +import org.openrndr.extra.videoprofiles.* +import org.openrndr.ffmpeg.ScreenRecorder + +fun main() = application { + program { + extend(ScreenRecorder()) { + profile = WebpProfile() + } + extend { + drawer.clear(ColorRGBa.GREEN) + } + } +} +``` + + ### Prores (large file, high quality video) ``` diff --git a/orx-video-profiles/src/main/kotlin/WebpProfile.kt b/orx-video-profiles/src/main/kotlin/WebpProfile.kt new file mode 100644 index 000000000..d3d941c21 --- /dev/null +++ b/orx-video-profiles/src/main/kotlin/WebpProfile.kt @@ -0,0 +1,10 @@ +package org.openrndr.extra.videoprofiles +import org.openrndr.ffmpeg.VideoWriterProfile + +class WebpProfile : VideoWriterProfile() { + override val fileExtension = "webp" + + override fun arguments(): Array { + return arrayOf("-vf", "vflip") + } +}