Live Stream and Recording
curl --request POST \
--url https://api.videograph.ai/video/services/api/v1/livestreams \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"title": "Live stream",
"region": "us-east-1",
"record": false
}
'
const sdk = require('api')('@videograph/v1.0#5hvd3ilcrhxps0');
sdk.postVideoServicesApiV1Livestreams({title: 'Live stream', region: 'us-east-1', record: false})
.then(({ data }) => console.log(data))
.catch(err => console.error(err));
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.videograph.ai/video/services/api/v1/livestreams', [
'body' => '{"title":"Live stream","region":"us-east-1","record":false}',
'headers' => [
'accept' => 'application/json',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
import requests
url = "https://api.videograph.ai/video/services/api/v1/livestreams"
payload = {
"title": "Live stream",
"region": "us-east-1",
"record": False
}
headers = {
"accept": "application/json",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"title\":\"Live stream\",\"region\":\"us-east-1\",\"record\":false}");
Request request = new Request.Builder()
.url("https://api.videograph.ai/video/services/api/v1/livestreams")
.post(body)
.addHeader("accept", "application/json")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
RTMP Server URL | Description |
---|---|
rtmp://rc-ingest.in.videograph.ai/rec | RTMP URL to push live streaming with recording parameter 'true' . Live stream will be recorded and available for 12 hours from the start time of live stream. |
rtmp://ingest.in.videograph.ai/live | RTMP URL to push live streaming with recording parameter 'false' . Live streams will not be recorded. |
{
"code": 200,
"data": {
"createdOn": 1673595417480,
"metadata": [],
"playbackUrl": "PLAYBACKURL",
"rtmpUrl": "RTMP URL",
"status": "Idle",
"streamKey": "STREAMKEY",
"streamUUID": "271dc169-da00-4f4e-bdc8-01c13f827eb9",
"title": "live stream"
},
"message": "Livestream details with id: 271dc169-da00-4f4e-bdc8-01c13f827eb9",
"status": "Success"
}
Updated over 1 year ago