-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Q] How to support adaptive bitrate for audio? #149
Comments
If the input is < 6 channels, the 6-channel output will not be created. Similarly, if input video is < 4K, 4K output will not be created. We don't upscale video, and we don't up-mix audio channels, because those would be wasteful and not increase quality.
That is not how the configs are currently structured. I'm open to changes, but the simplistic way it works now is as described in the configs docs: I know these generated docs are not super friendly to read. A friendlier explanation is this: Each resolution and channel layout is encoded in just one bitrate. It doesn't (currently) have options for multiple bitrates at the same video resolution or at the same audio channel layout (stereo, mono, surround, etc), except in the case of different codecs. Different codecs don't need the same number of bits to achieve a target quality. So the default bitrate for 2-channel Opus is lower than for 2-channel AAC. So the config involves a mapping of codec to bitrate for each channel layout. Ex (taken from the defaults): mono:
max_channels: 1
bitrates:
aac: '64k'
opus: '32k'
stereo:
max_channels: 2
bitrates:
aac: '128k'
opus: '64k'
surround:
max_channels: 6
bitrates:
aac: '256k'
opus: '128k' That said, I think your idea is a good one. I think the default should still be one bitrate per layout, but I see no reason to deny someone the ability to ask for more. The custom bitrate config is the right place to do it. So I would support a PR to make this the format instead: audio_channel_layouts:
stereo:
max_channels: 2
bitrates:
aac:
- '96k'
- '128k'
- '192k'
- '256k' This would be a breaking change, so the PR title should begin with 'feat!: ...' to ensure a bump to a new major version. Anyone with an existing custom bitrate config would have to update it to the new format. @falk-stefan, are you interested in implementing this? |
I really wish I could help out here but I'm already completely under water with my current project (and full-time job). 😓 |
No worries. We'll just leave this open in case someone is interested in implementing the recommendations above. |
It's possible that I have misunderstood something, but I don't quite understand what is required in order to support an adaptive bitrate for, for example, audio.
The following seems to create different versions of the input audio:
However, I would have assumed that I'd need to provide multiple sample-rates for a codec. For example:
in order to provide different bitrates to DASH or HLS. Since this does not seem to be the case, I seek to ask if this needs to be done in a different way or do I not have to care about this at all?
pipeline.yaml
The text was updated successfully, but these errors were encountered: