demlo: Set ogg max bitrate to 192k

master
Pierre Neidhardt 2017-05-23 17:15:50 +02:00
parent 18062e3ce9
commit dfeb676474
2 changed files with 4 additions and 6 deletions

View File

@ -1,12 +1,12 @@
-- Keep result of 'encoding.lua' except flac.
local bitrate = bps or 9999999
local OGGMAX = 500000
local bitrate_max = 192000
if output.format == 'flac' then
if bitrate > input.bitrate then
bitrate = input.bitrate
end
output.format = 'ogg'
output.parameters = {'-c:a', 'libvorbis', '-b:a', tostring(math.min(bitrate, OGGMAX))}
output.parameters = {'-c:a', 'libvorbis', '-b:a', tostring(math.min(bitrate, bitrate_max))}
end

View File

@ -1,14 +1,12 @@
-- Force output to OGG.
local OGGMAX = 500000
local bitrate = bps or 9999999
local OGGMAX = 500000
local bitrate_max = 192000
if bitrate > input.bitrate then
bitrate = input.bitrate
end
output.parameters = {'-c:a', 'libvorbis', '-b:a', tostring(math.min(bitrate, OGGMAX))}
output.parameters = {'-c:a', 'libvorbis', '-b:a', tostring(math.min(bitrate, bitrate_max))}
output.format = 'ogg'