...
A stream created this way can be displayed to one user (personal VOD). Second viewer cannot subscribe to personal VOD stream, such stream cannot be transcoded, added to mixer or played by HLS.
If a full-featured online-broadcast is required, provide the link to a file as follows:
...
Multiple user can connect to such a stream simultaneously. VOD live stream can be transcoded, added to mixer or played by HLS.
Supported formats and codecs
...
Code Block | ||
---|---|---|
| ||
vod_live_loop=true |
VOD capturing from AWS S3 or from other S3 compatible storage
VOD stream can be captured from file placed to AWS S3 storage. Comparing with VOD capture from local disk, file from external storage is downloaded and captured sequentally.
...
- bucket is S3 bucket name
- sample.mp4 is file name
Operation flowchart
1. Browser requests VOD capture from AWS file
2. WCS server sends request to AWS
3. File is downloaded to WCS server
4. WebRTC stream from file is sending to browser for playback
Set up
AWS S3 credentials configuration
To download files from AWS S3 bucket, S3 credentials must be set in flashphoner.properties fileSince build 5.2.939 it is possible to set the full file URL in S3 storage, this allows to capture VOD from other S3 storages (Digital Ocean, Selectel etc)
Digital Ocean Spaces URL example
Code Block | ||
---|---|---|
| ||
aws_s3_credentials=zone;login;hash |
Where
- zone - AWS region where bucket is placed
- login - Access Key ID
- hash - Secret Accesss Key
...
vod://s3/https://ams3.digitaloceanspaces.com/myspace/folder/file.mp4 |
Selectel URL example
Code Block | ||
---|---|---|
| ||
vod://s3/https://s3.selcdn.ru/mystorage/file.mp4 |
Operation flowchart
1. Browser requests VOD capture from AWS file
2. WCS server sends request to AWS
3. File is downloaded to WCS server
4. WebRTC stream from file is sending to browser for playback
Set up
S3 credentials configuration
AWS
To download files from AWS S3 bucket, S3 credentials must be set in flashphoner.properties file
Code Block | ||
---|---|---|
| ||
aws_s3_credentials=zone;login;hash |
Where
- zone - AWS region where bucket is placed
- login - Access Key ID
- hash - Secret Accesss Key
S3 credentials setting example:
Code Block | ||
---|---|---|
| ||
aws_s3_credentials=eu-central-1;AA22BB33CC44DE;DhlAkpZ4adclHhbLwhTNL4hvWTo80Njo |
Digital Ocean Spaces
To download files from DO Spaces set the credentials as
Code Block | ||
---|---|---|
| ||
aws_s3_credentials=ams3;access_key;secret |
Where
- ams3 - digitaloceanspaces.com subdomain
- access_key - storage access key
- secret - storage access secret code
Selectel
To download files from Selectel S3 set the credentials as
Code Block | ||
---|---|---|
| ||
aws_s3_credentials=euru-central-11a;AA22BB33CC44DE;DhlAkpZ4adclHhbLwhTNL4hvWTo80Njologin;password |
Where
- ru-1a - storage region
- login - user name
- password - password
Capturing VOD stream from file while it is downloading
...
REST query | REST query example | REST response example | Response states | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
/vod/startup |
| 409 - Conflict 500 - Internal error | Capture VOD stream from file | |||||||||||||||||||
/vod/find |
|
| 200 – OK 404 – not found | Find VOD streams by criteria | ||||||||||||||||||
/vod/find_all |
| 200 – OK 404 – not found | Find all VOD streams | /vod/terminate |
| 200 - Stream is stopped 404 - Stream not found | Stop VOD stream |
Parameters
Name | Description | Example | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
uri | File name to capture | vod://sample.mp4 | |||||||||
localStreamName | Stream name | test | |||||||||
status | Stream status | PROCESSED_LOCAL | |||||||||
localMediaSessionId | Mediasession Id | 29ec3236-1093-42bb-88d6-d4ac37af3ac0 | |||||||||
hasAudio | Stream has audio | true | |||||||||
hasVideo | Stream has video | true | |||||||||
record | Stream is recording | falseall VOD streams | |||||||||
/vod/terminate |
| 200 - Stream is stopped 404 - Stream not found | Stop VOD stream |
Parameters
Name | Description | Example |
---|---|---|
uri | File name to capture | vod://sample.mp4 |
localStreamName | Stream name | test |
status | Stream status | PROCESSED_LOCAL |
localMediaSessionId | Mediasession Id | 29ec3236-1093-42bb-88d6-d4ac37af3ac0 |
hasAudio | Stream has audio | true |
hasVideo | Stream has video | true |
record | Stream is recording | false |
loop | VOD is looped | false |
VOD looping on demand
Since build 5.2.1528 it is possible to enable VOD looping while creating VOD live translation via REST API
Code Block | ||||
---|---|---|---|---|
| ||||
{
"uri":"vod-live://sample.mp4",
"localStreamName": "test",
"loop": true
} |
By default, if loop
parameter is not set, vod_live_loop
is applied. If the parameter is set, its value is applied as follows
true
- file will be loopedfalse
- file will be played once, then VOD live translation will stop
The loop
parameter has a precedence over vod_live_loop
value.
Known limits
/rest-api/vod/startup
query can be used for VOD live translations creation only. However, find,
find `find_all and `and terminate
queries can be applied both to VOD and VOD live translations.
...