...
REST query | Request example | Response example | Response states | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
/transcoder/startup |
| 409 - Conflict 500 - Internal error | Create transcoder with defined parameters for certain stream | |||||||||||||||
/transcoder/find |
|
| 200 – Transcoders found 404 – Transcoders not found | Find the transcoder by certain criteria | ||||||||||||||
/transcoder/find_all |
| 200 – Transcoders found 404 – Transcoders not found | Find all transcoders | |||||||||||||||
/transcoder/terminate |
| 200 - Transcoders is terminated 404 - Transcoder not found | Stop transcoder and its output stream |
Parameters
Name | Description | Example |
---|---|---|
uri | Transcoder URL | transcoder://tcode1 |
localStreamName | Transcoder output stream name | testT |
remoteStreamName | Stream name to transcode | test |
localMediaSessionId | Transcoder media session Id | 42a92132-bcd1-4436-a96f-3fec36b32b37 |
status | Transcoder state | PROCESSED_LOCAL |
hasAudio | Output stream has audio | true |
hasVideo | Output stream has video | true |
record | Output stream is recorded | false |
Encoder parameters | ||
width | Picture width | 640 |
height | Picture height | 480 |
keyFrameInterval | Key frame generation interval (GOP) | 30 |
fps | Frames per second | 30 |
bitrate | Bitrate, in kbps | 500 |
type | Codec | OPENH264 |
watermark | Watermark file | Test.png |
Quick manual for testing
1. For test we use
...
Code Block | ||||
---|---|---|---|---|
| ||||
curl -s 'http://localhost:8081/?action=stat&format=json&groups=buffer_stats' |
A certain stream watermarking
Since build 5.2.693 it is possible to add watermark to transcoded stream when creating transcoder using REST API, for example
Code Block | ||||
---|---|---|---|---|
| ||||
{
"uri": "transcoder://tcode1",
"remoteStreamName": "test",
"localStreamName": "testT",
"encoder": {
"width": 640,
"height": 480,
"keyFrameInterval": 30,
"fps": 30,
"watermark": "Test.png"
}
} |
By default, if file name only is passed, watermark picture file should be placed to /usr/local/FlashphonerWebCallServer/conf folder. The full path to the file can also be passed, for example
Code Block | ||||
---|---|---|---|---|
| ||||
{
"uri": "transcoder://tcode1",
"remoteStreamName": "test",
"localStreamName": "testT",
"encoder": {
"width": 640,
"height": 480,
"keyFrameInterval": 30,
"fps": 30,
"watermark": "/opt/media/Test.png"
}
} |