API reference - Ricoh Theta

camera.getLivePreview command response on successful completion

The response of camera.getLivePreview is Motion JPEG data with chunked encoding. The Content-Type of the response is multipart/x-mixed-replace, and each part contains an equirectangular JPEG image of each frame in binary.

An example of Response Status Lines and HTTP Headers is following:

HTTP/1.1 200 OK
Connection: Keep-Alive
User-Agent: Dalvik/2.1.0 (Linux; U; Android 10;  RICOH THETA X Build/QKQ1.210402.001)
X-Content-Type-Options: nosniff
Content-Type: multipart/x-mixed-replace; boundary="---osclivepreview---"
Transfer-Encoding: Chunked

Each part of the HTTP body begins with the line ---osclivepreview---, and headers of the part, an empty line and binary JPEG data are followed like this:

---osclivepreview---
Content-type: image/jpeg
Content-Length: 49249

binary JPEG data which length is 49249 bytes.

It should have been implemented in such a way as to start with -----osclivepreview---. Current implementation is not conformant with RFC1341 so that some ingenuity may be required when using HTTP client libraries.