HLS-34: Audio Bitrate Scaling

Issue Information

Issue Type: New Feature
Priority: Major
Status: Open

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: HLS Stream Creator (HLS)
Resolution: Unresolved
Target version: VNEXT,
Components: Transcoding , Adaptive Streams ,
Labels: Audio, HLS,

Created: 2019-07-26 09:18:40
Time Spent Working

It's always been a feature of the HLS spec, but isn't something I've really had a use for.

A user has asked in Github #33 for a switch to set/scale audio bitrates.

This could be implemented in one of 2 ways:

- You can specify an audio bitrate alongside a video bitrate. The audio track in segments with that video bitrate would have their audio at the specified rate (or native if not specified)
- A new flag (for sake of argument -a) is added and works a lot like -b. You pass in the audio bitrates you want (e.g. -a 96,128,384). Audio track is stripped from segments and broken out into separate audio streams and declared in the manifest

The former is much easier to implement, and gives the operator more control.

The second is harder to implement, but gives the player more choice.

Having separate audio tracks also lays the groundwork for possible future enhancements - like (for example) specifying alternate audio tracks (e.g. German audio instead of English etc).

It'd also mean we could (potentially) implement the ability to ignore video and only output audio streams (allowing the script to be used for things like adaptive radio streams).

Issue Links

Github #33
Toggle State Changes


Although responsibility will probably (initially) be pushed onto the encoding operator, the following should be noted (from https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices)

2.5. Supported multichannel audio formats are:

- Dolby Digital (AC-3)
- Dolby Digital Plus (E-AC-3)
- Dolby Digital Plus with Dolby Atmos

2.6. If Dolby Digital Plus is provided and your streams are delivered to devices that do not support Dolby Digital Plus then Dolby Digital MUST be provided also. See Audio Compatibility.

2.7. Stereo audio MAY be provided at multiple bit rates

2.8. Multichannel audio MUST be provided at a single bit rate. (For example, donĀ't provide Dolby Digital 5.1 at two bit rates, but you may provide Dolby Digital 5.1 and Dolby Digital Plus 5.1.)

2.17. A single media segment MUST NOT contain multiple audio streams.
If we do go the route (even initially) of specifying the audio bitrate within -b my one requirement for accepting pull requests is laid out on Github:
What I would say though, is it would be prudent to have a different delimiter to denote audio, as it reduces the need to worry about what order things have been specified in (reducing the scope for operator error).

So something like [VideoBW]-[width]x[height]:[audiobw] rather than splitting with a hyphen. It doesn't have to be a colon specifically.
btasker added 'VNEXT' to Fix Version
btasker removed '1.0' from Fix Version