Streams are representations of video to be worked on by miners on the VideoCoin Network and output consumable video based on the transcoding profile given at creation.
Streams currently support video input over RTMP, WebRTC and FILE.
Property | Description |
id | ID that VideoCoin uses to uniquely identify each stream |
name | Name of the stream |
output_url | Unique output URL of transcoded video |
stream_contract_id | Stream ID in VideoCoin stream chain |
stream_contract_address | Stream hex address in VideoCoin chain. Empty until stream is in prepared state |
status | Status of the stream's operational state ​ Read "List of stream statuses" for more information |
input_type | Type of input to create stream with ​ Read "List of input types" for more information |
output_type | Type of output stream to produce ​ Read "List of output types" for more information |
input_status | Status of the stream's video ingest ​ Read "List of ingest statuses" for more information |
created_at | Date and time of when stream was initially created |
updated_at | Date and time of when stream's state was last changed |
ready_at | Date and time of when stream's ingest has received and completed processing input video data. This field will be null until stream is in ready state |
completed_at | Date and time of when stream was called to stop. This field will be null until stream is in completed state |
rtmp_url | Unique ingest RTMP URL for stream to receive video data from encoder. This URL is used for your encoder to send data to |
The status of a stream is affected by API calls made on a stream object. Below are the states that describe the lifecycle of a stream:
Status | Description |
STREAM_STATUS_NEW | Initially created and no actions have been taken |
STREAM_STATUS_PREPARING | Running and preparing input and output destinations |
STREAM_STATUS_PREPARED | Preparation is finished and is ready to consume input data |
STREAM_STATUS_PENDING | Receiving data and pending on miner to be assigned to stream |
STREAM_STATUS_PROCESSING | Miner has started work on stream, but output is not ready for use |
STREAM_STATUS_READY | Output destination is ready to be consumed |
STREAM_STATUS_COMPLETED | Stream has successfully transcoded video and stream was explicitly stopped or encoder has stopped |
STREAM_STATUS_CANCELLED | Stream has not yet received any input data and has been cancelled |
STREAM_STATUS_FAILED | Stream has attempted to transcode video received, but problems with the transcoder or account caused it to fail |
The type of input to be provided to ingest stream.
Input Type | Description |
INPUT_TYPE_RTMP | The stream will be ingested over RTMP protocol |
INPUT_TYPE_WEBRTC | The stream will be ingested over WEBRTC protocol |
INPUT_TYPE_FILE | The stream will be ingested by file upload or file link |
The type of output to be produces by stream.
Input Type | Description |
OUTPUT_TYPE_HLS | HLS playlist LIVE or VOD depends on stream input type |
The status of a stream's ingest is affected by the state of the encoder that's sending video data to the stream. Below are the states the ingest can be in:
Ingest Status | Description |
INPUT_STATUS_NONE | The stream has been created or has ended and is not receiving any input |
INPUT_STATUS_PENDING | Ingest is awaiting for incoming data |
INPUT_STATUS_ACTIVE | Ingest is receiving data |
INPUT_STATUS_ERROR | Ingest has been failed to process incoming data |
{"items": [{"id": "005fec0a-6637-479e-46b8-2820b6daf1fa","name": "Live Office","output_url": "https://streams.videocoin.network/005fec0a-6637-479e-46b8-2820b6daf1fa/index.m3u8","stream_contract_id": "3716579677242232723","stream_contract_address": "0x928e3CDdcf6a962266439A5BF4036573D452BabF","status": "STREAM_STATUS_NEW","input_status": "INPUT_STATUS_NONE","created_at": "2019-10-31T08:09:21Z","updated_at": "2019-10-31T08:09:21Z","ready_at": null,"completed_at": null,"rtmp_url": "rtmp://rtmp.studio.videocoin.network:1935/live/005fec0a-6637-479e-46b8-2820b6daf1fa","input_type": "INPUT_TYPE_RTMP","output_type": "OUTPUT_TYPE_HLS"},{"id": "2bd9193e-260d-4cee-6d67-08e79260c1ad","name": "Live Streetst","output_url": "https://streams.videocoin.network/2bd9193e-260d-4cee-6d67-08e79260c1ad/index.m3u8","stream_contract_id": "5649666304257966074","stream_contract_address": "0xc6d37D66E830b68ba1F07f1f4E98aA592dc60F67","status": "STREAM_STATUS_COMPLETED","input_status": "INPUT_STATUS_NONE","created_at": "2019-10-28T21:18:37Z","updated_at": "2019-10-28T21:20:56Z","ready_at": "2019-10-28T21:19:32Z","completed_at": "2019-10-28T21:20:56Z","rtmp_url": "rtmp://rtmp.studio.videocoin.network:1935/live/2bd9193e-260d-4cee-6d67-08e79260c1ad","input_type": "INPUT_TYPE_RTMP","output_type": "OUTPUT_TYPE_HLS"}]}
​
{"id": "4a1c3973-8cf6-49af-4a56-7a1d49c2bac6","name": "Live","output_url": "https://streams.videocoin.network/4a1c3973-8cf6-49af-4a56-7a1d49c2bac6/index.m3u8","stream_contract_id": "2758350251200610030","stream_contract_address": "0x543f217337975955457a6E2E8c82a7ED1a7fF51d","status": "STREAM_STATUS_NONE","input_status": "INPUT_STATUS_NONE","created_at": "2019-11-06T19:31:03Z","updated_at": "2019-11-06T19:31:10Z","ready_at": null,"completed_at": null,"rtmp_url": "rtmp://rtmp.studio.videocoin.network:1935/live/4a1c3973-8cf6-49af-4a56-7a1d49c2bac6","input_type": "INPUT_TYPE_RTMP","output_type": "OUTPUT_TYPE_HLS"}
{"message": "Not found","fields": null}
{"id": "4a1c3973-8cf6-49af-4a56-7a1d49c2bac6","name": "Live","output_url": "https://streams.videocoin.network/4a1c3973-8cf6-49af-4a56-7a1d49c2bac6/index.m3u8","stream_contract_id": "2758350251200610030","stream_contract_address": "","status": "STREAM_STATUS_NEW","input_status": "INPUT_STATUS_NONE","created_at": "2019-11-06T19:31:03.059408235Z","updated_at": "2019-11-06T19:31:03.059460430Z","ready_at": null,"completed_at": null,"rtmp_url": "rtmp://rtmp.studio.videocoin.network:1935/live/4a1c3973-8cf6-49af-4a56-7a1d49c2bac6","input_type": "INPUT_TYPE_RTMP","output_type": "OUTPUT_TYPE_HLS"}
{"message": "invalid argument","fields": {"name": "Name is a required field"}}
​
{"message": "Not found","fields": null}
​
{"message": "Not found","fields": null}
​
​
{"message": "Not found","fields": null}