...
REST queries and response states
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 |
Quick manual for testing
1. For test we use
...
By default, if the stream is published with one picture resolution and is requested to play with another resolution, WCS tries to preserve picture aspect ratio. For example, if stream is published on server with resolution 640x360, aspect ratio 16:9, and subscriber requests to play it with resolution 320x240 (4:3), the stream will be transcoded to resolution 320x180 (16:9). If subscriber requests picture width height only (320) without setting heigthwidth, aspect ratio will also be preserved.
...
In this case stream will be transcoded to picture width and height that are requested by subscriber. If subscriber does not set picture height, it wiil be set to 120. If subscriber does not set picture width, it wiil be set to 160.