set-audio
Use this interface to set audio encoding parameters.
Obtain ranges of audio encoding parameters using get-info.
{
"codec-cap": {
"audio-streams": [], // range of audio streams
"audio-channels": [], // range of audio channels
"audio-chmap": [], // range of audio channel mapping
"audio-kbps": [], // range of audio bit rate
}
}
HTTP Request
GET http://ip/usapi?method=set-audio&stream=1&kbps=48...
| Parameter | Description |
|---|---|
| method | set-audio |
| opus-stream | Whether to set the Opus audio stream. 0: Set a standard audio stream; the stream parameter is valid. 1: Set an Opus audio stream; the stream parameter is ignored. |
| stream | Audio stream type. Ignored when setting an Opus audio stream. 0: Audio stream 1 1: Audio stream 2 2: Audio stream 3 3: Audio stream 4 |
| channels | Number of audio encoding channels. Configurable only for audio stream 1 and the Opus audio stream. Other audio streams are fixed at 2 channels. |
| kbps | Indicates audio bit rate. |
| ch0 | Source channel number which is mapped by audio encoding channel 1. |
| ch1 | Source channel number which is mapped by audio encoding channel 2. |
| ch2 | Source channel number which is mapped by audio encoding channel 3. |
| ch3 | Source channel number which is mapped by audio encoding channel 4. |
| ch4 | Source channel number which is mapped by audio encoding channel 5. |
| ch5 | Source channel number which is mapped by audio encoding channel 6. |
| ch6 | Source channel number which is mapped by audio encoding channel 7. |
| ch7 | Source channel number which is mapped by audio encoding channel 8. |
| use-lfe | Whether to enable LFE, the number of audio encoding channels greater than 2 is valid. 0: disabled 1: enabled |
Response Body
{
"result": 0
}
| Item | Description |
|---|---|
| result | 0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values. |