Embedded Audio Filters
Transform supports compressed audio that is embedded within an uncompressed (PCM) audio stream. Audio embedding allows a two channel PCM stream to carry up to 8 compressed audio channels.
Transform supports the following embedded audio formats:
Format | Description |
---|---|
ac-3 | Dolby Digital |
ec-3 | Dolby Digital Plus, Dolby Atmos |
dlbe | Dolby E |
Channel Coding
The coding
property indicates the format and channels containing embedded audio. For example the following QuickTime file contains a 24 bit PCM audio stream with embedded ac-3
on channels 3/4:
---
type: 'mov '
audio:
- format: 'in24'
sample_rate:
numerator: 48000
denominator: 1
bits_per_sample: 24
channels: 4
label:
- L
- R
-
-
coding:
-
-
- 'ac-3'
- 'ac-3'
{
"type": "mov ",
"audio": [
{
"format": "in24",
"sample_rate": {
"numerator": 48000,
"denominator": 1
},
"bits_per_sample": 24,
"channels": 4,
"label": [
"L",
"R",
null,
null
],
"coding": [
null,
null,
"ac-3",
"ac-3"
]
}
]
}
Program Selection
An embedded audio stream can contain multiple independent programs. For example both Dolby E and Dolby EAC-3 support up to 8 programs (or sub streams).
Embedded audio programs are numbered (starting at 1) across all the tracks in a container. For example in a container with two embedded Dolby E streams (each having a 5.1+2.0 configuration), the programs are numbered 1,2 and 3,4 respectively.
Use the select
operator to map a specific embedded audio program
to an input stream. For example the following composition locates the 5.1 program in the second Dolby E stream:
---
input:
container:
- name: input1
audio:
- name: a1
select:
program: 3
output:
container:
- name: output1
type: 'mp4 '
audio:
- name: a1
encode:
type: 'mcac'
properties:
BitRate: 128000
SMPTE 377
Compressed audio frames are typically embedded in a PCM stream according to the SMPTE 377 standard.
Extraction
The SMPTE 377 377c
filter extracts an compressed audio stream from a PCM stream. For example the following composition extracts ac-3
from input channels 3/4:
---
input:
container:
- name: input1
audio:
- name: a1
channels: 4
coding:
-
-
- 'ac-3'
- 'ac-3'
output:
container:
- name: output1
type: 'mp4 '
audio:
- route:
name: a1
channel:
- 3
- 4
filter:
- type: '337c'
{
"input": {
"container": [
{
"name": "input1",
"audio": [
{
"name": "a1",
"channels": 4,
"coding": [
null,
null,
"ac-3",
"ac-3"
]
}
]
}
]
},
"output": {
"container": [
{
"name": "output1",
"type": "mp4 ",
"audio": [
{
"route": {
"name": "a1",
"channel": [
3,
4
]
},
"filter": [
{
"type": "337c"
}
]
}
]
}
]
}
}
Insertion
The SMPTE 377 2aes
filter inserts a compressed audio stream into a PCM stream. For example the following composition inserts ec-3
into a 24 bit PCM stream:
---
input:
container:
- name: input1
audio:
- name: a1
format: 'ec-3'
output:
container:
- name: output1
type: 'mp4 '
audio:
- route:
name: a1
filter:
- type: '2aes'
properties:
OutputFormat: 'in24'
{
"input": {
"container": [
{
"name": "input1",
"audio": [
{
"name": "a1",
"format": "ec-3"
}
]
}
]
},
"output": {
"container": [
{
"name": "output1",
"type": "mp4 ",
"audio": [
{
"route": {
"name": "a1"
},
"filter": [
{
"type": "2aes",
"properties": {
"OutputFormat": "in24"
}
}
]
}
]
}
]
}
}
Dolby E
A single Dolby E stream can contain 4, 6 or 8 channels and up to 8 discrete program configurations. The most common configurations are as follows:
Configuration | Channels | Programs |
---|---|---|
0 | 8 | 5.1, 2.0 |
6 | 8 | 2.0, 2.0, 2.0, 2.0 |
11 | 6 | 5.1 |
22 | 8 | 7.1 |
23 | 8 | 7.1 Screen |
Decompressor
The Dolby E DLBE
filter extracts and decompresses a specific Dolby E program.
In the following example the input
container has four discrete audio tracks containing two separate Dolby E streams. The composition extracts the 5.1 program from the second embedded stream (a3 and a4):
---
input:
container:
- name: input1
audio:
- name: a1
channels: 1
coding:
- 'dlbe'
- name: a2
channels: 1
coding:
- 'dlbe'
- name: a3
channels: 1
coding:
- 'dlbe'
- name: a4
channels: 1
coding:
- 'dlbe'
output:
container:
- name: output1
type: 'mp4 '
audio:
- channels: 2
route:
channel:
- name: a3
channel: 1
- name: a4
channel: 1
filter:
- type: 'DLBE'
properties:
ProgramConfiguration: 11
Program: 1
encode:
type: 'mcac'
properties:
BitRate: 128000
{
"input": {
"container": [
{
"name": "input1",
"audio": [
{
"name": "a1",
"channels": 1,
"coding": [
"dlbe"
]
},
{
"name": "a2",
"channels": 1,
"coding": [
"dlbe"
]
},
{
"name": "a3",
"channels": 1,
"coding": [
"dlbe"
]
},
{
"name": "a4",
"channels": 1,
"coding": [
"dlbe"
]
}
]
}
]
},
"output": {
"container": [
{
"name": "output1",
"type": "mp4 ",
"audio": [
{
"channels": 2,
"route": {
"channel": [
{
"name": "a3",
"channel": 1
},
{
"name": "a4",
"channel": 1
}
]
},
"filter": [
{
"type": "DLBE",
"properties": {
"ProgramConfiguration": 11,
"Program": 1
}
}
],
"encode": {
"type": "mcac",
"properties": {
"BitRate": 128000
}
}
}
]
}
]
}
}
The DLBE
filter supports the following properties:
Property | Type | Description |
---|---|---|
ProgramConfiguration | integer | Specifies the program configuration and the corresponding speaker labels for each output channel. |
Program | integer | Specifies the output program number. By default (0) all programs are output. |
Compressor
The Dolby E dlbe
encoder compresses up to 8 audio channels comprising multiple programs. For example the following composition encode a Dolby E stream containing 5.1 and 2.0 programs:
---
input:
container:
- name: input1
audio:
- name: a1
channels: 8
label:
- 'L'
- 'R'
- 'C'
- 'LFE'
- 'Ls'
- 'Rs'
- 'L'
- 'R'
program:
- 1
- 1
- 1
- 1
- 1
- 1
- 2
- 2
output:
container:
- name: output1
type: 'mp4 '
audio:
- channels: 8
route:
name: a1
channel:
- 1
- 3
- 5
- 7
- 2
- 4
- 6
- 8
encode:
type: 'dlbe'
properties:
ProgramConfiguration: 0
FrameRate: 4
BitDepth: 20
Updated about 1 year ago