ws-apifix: one bitrate unit: every encoder's bitrate option is bit/s (MP3 now too), values below 1000 are kbit/s (the old MP3 values keep working; Opus accepts them too); the MP3 Decoder's bitrate field is bit/s as the Decoder contract says (was kbit/s)
This commit is contained in:
1 parent
3c2a646365
commit
ac47545aa3
10 files changed
+35
-14
No files matched your search
@@ -68,7 +68,7 @@ function Stream.new(b: buffer, idx: any, tags: { [string]: string }, id3: any):
|
||||
channels = nch,
|
||||
frames = total,
|
||||
duration = total / hz,
|
||||
bitrate = if idx.n > 0 then floor(idx.bytes * 8 * hz / (idx.n * spf) / 1000 + 0.5) else 0,
|
||||
bitrate = if idx.n > 0 then floor(idx.bytes * 8 * hz / (idx.n * spf) + 0.5) else 0, -- bit/s
|
||||
tags = tags,
|
||||
id3 = id3,
|
||||
layer = idx.layer,
|
||||
|
||||
Reference in new issue
Block a user