getAudioEngChannel.lua
[INDEX]

ABSTRACT

Get the channel list of audio encoding engine


KILOVIEW encoder device has an 'audio encoding engine' module. This engine could support one or more channels. Each channel can capture audio from different audio input device, then encode to different formats. For video encoding stream, it can bind to specified channel to realize combined stream of audio and video.

ARGUMENTS

HTTP Arguments submit: GET; POST

Test this API over HTTP - (URL):

Channel
INTEGER

Optional. Specify the specified channel ID. If specified 'Channel', then it only returns the Config/Status of corresponding channel, otherwise it returns all.

Test value:

Config
INTEGER

Optional.

1

Need to get channel configuration parameters. (See "ChannelConfigs" in RETURNS)

0

([Default], if not specified) Not get channel configuration parameters.

Test value:

Status
INTEGER

Optional.

1

Need to get channel status.([Default], if not specified. See "ChannelStatus" in RETURNS)

0

Not return channel status.

Test value:

RETURNS

Return a JSON style result. The JSON format is:

{
/*OBJECT*/

"Result":
NUMBER

200 means OK, other error code meanings are similar to HTTP Response.

"Status":
"STRING"

Status message. Responsing result status of API executive, if there errors, it will describe reasons.

"Data": {
/*OBJECT*/

Result object

"ChannelConfigs": [
/*ARRAY*/

Array, each item means one audio encoding channel configuration, formats as below:

{
/*OBJECT*/

"ID":
NUMBER

Channel ID

"Enable":
INTEGER

0

This channel is disabled

1

Enabled

"Device":
"STRING"

Audio capture device name, format like: 'alsa:default'. Currently please neglect this value's function.

"Codec":
"STRING"

Audio CODEC, currently support AAC(Low-Cost) and G711.

AAC

AAC(Low-Coast)

G711

G.711

"Sampling":
INTEGER

Sampling rate. Valid for AAC, for G711 it always as 8KHz.

"Channels":
INTEGER

Sound channel, value is 1 or 2. Valid for AAC, for G711 it always as 1.

"Bitrate":
NUMBER

Encoding bitrate, unit is bps (e.g. 64000 means 64Kbps). Valid for AAC, for G.711 it always as 64000.

"AAC_Format":
"STRING"

AAC Format.

RAW

RAW AAC format

ADTS

With ADTS header

For Transport Streaming(TS) application, *MUST* specify AAC format with ADTS header.
"G711_Format":
"STRING"

G.711 Format.

ULAW

G.711 uLaw

ALAW

G.711 aLaw

}
"ChannelStatus": [
/*ARRAY*/

array, each item means one audio encoding channel status, formats as below:

{
/*OBJECT*/

"ID":
INTEGER

Channel ID

"Enable":
INTEGER

0

This channel is disabled

1

Enabled

"Codec":
"STRING"

Audio CODEC, currently support AAC(Low-Cost) and G711.

AAC

AAC(Low-Coast)

G711

G.711

"Sampling":
INTEGER

Sampling rate. Valid for AAC, for G711 it always as 8KHz.

"Channels":
INTEGER

Sound channel, value is 1 or 2. Valid for AAC, for G711 it always as 1.

"Bitrate":
NUMBER

Instant encoding bitrate.

"AAC_Format":
"STRING"

AAC Format.

RAW

RAW AAC Format

ADTS

With ADTS header

For Transport Streaming(TS) application, *MUST* specify AAC format with ADTS header.
"G711_Format":
"STRING"

G.711 Format.

ULAW

G.711 uLaw

ALAW

G.711 aLaw

}
]
]
}
}

OTHER NOTES

Device HTTP API, v1.0