...
Transcoding disabling does not affects stream mixer, transcoding will be enabled automatically when mixer is used.
Transcoding management with REST API
REST query should be HTTP/HTTPS POST request as:
- HTTP: http://test.flashphoner.com:8081/rest-api/transcoder/startup
- HTTPS: https://test.flashphoner.com:8444/rest-api/transcoder/startup
Where:
- test.flashphoner.com is WCS server address
- 8081 is a standard REST / HTTP port of WCS server
- 8444 is a standard HTTPS port
- rest-api is mandatory URL prefix
- /transcoder/startup is REST query
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 |
Параметры кодирования | ||
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
- WCS server;
- Two Way Streaming web application to publish a stream;
- Player web application to play an output stream;
- Chrome browser with REST client to send REST queries to server
2. Open Two Way Streaming application and publish stream named test
3. Open REST client and send REST query /transcoder/startup
4. Open Player application, set testT to Stream field and click Start
5. Open REST client adn send REST query /transcoder/terminate
6. Playback will be stopped due to transcoder stop