Live View
Get single JPEG frame
Returns the latest live view frame as a JPEG image. Streaming must be
started first via liveView.start. Poll this endpoint at ~15 fps
(every ~66 ms) to render a live preview.
GET
/
api
/
cameras
/
{cameraId}
/
live-view
/
frame
Get single JPEG frame
curl --request GET \
--url http://{host}:{port}/api/cameras/{cameraId}/live-view/frameimport requests
url = "http://{host}:{port}/api/cameras/{cameraId}/live-view/frame"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://{host}:{port}/api/cameras/{cameraId}/live-view/frame', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/api/cameras/{cameraId}/live-view/frame",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/api/cameras/{cameraId}/live-view/frame"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/api/cameras/{cameraId}/live-view/frame")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/api/cameras/{cameraId}/live-view/frame")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"success": false,
"message": "Camera not connected",
"camera": {
"connected": false,
"model": "ILCE-7M4",
"id": "D06CE05E3323"
}
}Path Parameters
Camera identifier (e.g. D10F60149B0C)
Response
JPEG frame
The response is of type file.
⌘I
Get single JPEG frame
curl --request GET \
--url http://{host}:{port}/api/cameras/{cameraId}/live-view/frameimport requests
url = "http://{host}:{port}/api/cameras/{cameraId}/live-view/frame"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://{host}:{port}/api/cameras/{cameraId}/live-view/frame', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://{host}:{port}/api/cameras/{cameraId}/live-view/frame",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://{host}:{port}/api/cameras/{cameraId}/live-view/frame"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://{host}:{port}/api/cameras/{cameraId}/live-view/frame")
.asString();require 'uri'
require 'net/http'
url = URI("http://{host}:{port}/api/cameras/{cameraId}/live-view/frame")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>"{
"success": false,
"message": "Camera not connected",
"camera": {
"connected": false,
"model": "ILCE-7M4",
"id": "D06CE05E3323"
}
}
