ambevar-dotfiles/.config/demlo/scripts/52-encoding-ogg.lua

13 lines
261 B
Lua
Raw Normal View History

2017-01-29 16:25:14 +01:00
-- Force output to OGG.
local bitrate = bps or 9999999
2017-05-23 17:15:50 +02:00
local bitrate_max = 192000
2017-01-29 16:25:14 +01:00
if bitrate > input.bitrate then
bitrate = input.bitrate
end
2017-05-23 17:15:50 +02:00
output.parameters = {'-c:a', 'libvorbis', '-b:a', tostring(math.min(bitrate, bitrate_max))}
2017-01-29 16:25:14 +01:00
output.format = 'ogg'