Skip to content

Get video stream media

GET
/api/v1/videostreams/{id}/media/{type}/{subtype}

Roles required: Admin

Gets the image or video snippet from this video stream at the given time.

Parameters

Path Parameters

id*

Video Stream ID

Typeinteger
Required
Example1234567890
type*

Type

Typestring
Required
Exampleimage
subtype*

Subtype

Typestring
Required
Examplejpeg

Query Parameters

time*

Time

Typestring
Required
Example00:00:01.000-00:00:05.500

Responses

OK

Samples

cURL
curl -X GET \
'https://openfish.appspot.com/api/v1/videostreams/1234567890/media/image/jpeg?time=00%3A00%3A01.000-00%3A00%3A05.500' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://openfish.appspot.com/api/v1/videostreams/1234567890/media/image/jpeg?time=00%3A00%3A01.000-00%3A00%3A05.500', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://openfish.appspot.com/api/v1/videostreams/1234567890/media/image/jpeg';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'time' => '00:00:01.000-00:00:05.500',
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://openfish.appspot.com/api/v1/videostreams/1234567890/media/image/jpeg'
params = {
    'time': '00:00:01.000-00:00:05.500'
}
headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, params=params, headers=headers)
print(response.json())