Dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
542 B

from ..profile import *
@profile
@description("Encode Opus Audio")
@output(ext="mka", container="matroska")
@defines(ogg="Use Ogg/Opus output container",
bitrate="Target bitrate (Default 96k)")
@features(argshax=None)
@singleaudio
def opus(task, stream, defines, args):
os = (task.map_stream(stream)
.set(codec="libopus",
vbr="on")
# Defines
.apply(defines, bitrate="b"))
# Output format
if "ogg" in defines:
task.change_format("ogg", "opus" if args.genout else None)
return True