camera.getLivePreview doesn"t work with Theta SC2?

Hello, I use web Ricoh API v2.1, it work’s well on Theta V and Z1 but when I use “camera.getLivePreview” on Theta SC2 I should get a content stream but I got null

I use C# to make call API

 // Some code
 public override async Task<Stream> StartPreviewAsync()
 {
       string json = "{\"name\":\"camera.getLivePreview\"," +
                                 "\"parameters\":{}}";
       try
       {
            HttpResponseMessage response = await MakeRequest("commands/execute", json, HttpCompletionOption.ResponseHeadersRead);
            return await response.Content.ReadAsStreamAsync();
       }
       catch (Exception e)
       {
           //  Error = Failed to connect to /192.168.1.1:80       
           return null;
       }
}

    public async static Task<HttpResponseMessage> MakeRequest(string endpoint, string body, HttpCompletionOption httpCompletionOption = HttpCompletionOption.ResponseContentRead)
    {
           client = new HttpClient();
           HttpResponseMessage responseMessage = new HttpResponseMessage();
           string requestUrl = "http://192.168.1.1/osc/" + endpoint;
           StringContent HttpContent = new StringContent(body, Encoding.UTF8, "application/json");
           HttpRequestMessage httpRequestMessage;

           if (endpoint.Equals("info"))
                httpRequestMessage = new HttpRequestMessage(new HttpMethod("GET"), requestUrl);
           else
           {
                httpRequestMessage = new HttpRequestMessage(new HttpMethod("POST"), requestUrl)
                {
                     Content = HttpContent
                };
           }

           try
           {
              responseMessage = await Shooting.client.SendAsync(httpRequestMessage, httpCompletionOption);
           }
           catch (Exception e)
           {
                   Console.WriteLine("Error" + e.Message);
           }

           return responseMessage;
}

I noticed that I got an error : “Failed to connect to /192.168.1.1:80”
Can someone have the same problem with THETA SC2

To be honest, I am having API call connection problems with the SC2.

You may have noticed that the API documentation for camera.getLivePreview does not mention anything about SC2 support.

If you’re working on a commercial project for company that has a business relationship with the RICOH sales team, you may be able to contact them and find out when the API documentation is going to be updated for SC2. That might help us.

I did some quick testing on Friday and I ran into some problems where my test programs ran on the THETA V and Z1, but not on the SC2.

I think we will be able to figure things out in time as the RICOH official mobile app seems to work fine with the SC2.

If I figure something out, I will definitely post here, but I have the same problem as you at the moment.

I have the same issue on an app I develop that use this API since the Theta V.
And the live streaming doesn’t work very well with the SC2, we have to send the same command several times in order to work.

And some commands makes the SC2 freeze completly, like this one :

{"name":"camera.setOptions","parameters":{"captureMode":"image"}}

I have the latest v1.20 firmware.

If you are building a large-scale commercial app, please contact us and we may be able to get more information from RICOH.

This document may help:

See this:

Note this:

SC2

{
  "name": "camera.getOpions",
  "state": "done",
  "results": {
    "options": {
      "offDelay": 65535,
      "sleepDelay": 65535,
      "remainingSpace": 2168410112,
      "_colorTemperature": 2500,
      "previewFormat": {
        "width": 0,
        "height": 0
      },
      "framerate": 0
    }
  }
}

Test of SC2 LivePreview


There is more information available at the link below (requires free registration):

Are you trying to tell me that the livePreview isn’t supposed to work with the SC2 ?
The empty returned values for previewFormat suggest that ?
Note that for me previewFormatSupport return a 1-length array : 1440 x 720 @ 30fps.
And again, it’s working for me, but the API is very unstable, making the camera crashes…

I’m developping a large-scale, commercial app as you said, we have also contacted Ricoh.

The live preview works. I have it working with the SC2. It also works with the RICOH THETA official app.

The return value (JSON format response) is incorrect and is different from the V/Z1.

It’s possible that your app is sending another API command at the same time as the live preview and thus crashing the app. This doesn’t occur with the V/Z1, but does occur with the SC2. I’ll send you a note by email. I’m going to send it to the email you used to register on this forum.

Also, this may help.

I know it works, as I said, it’s “just” very instable.
All you’re saying suggests that Ricoh needs to fix the API on the SC2 and publish a new firmware, because it’s inconsistent and buggy.
Maybe you can tell them to do so ?
In the meantime I’ve found a crappy workaround, which happens to be similar that the one suggested on your last link, but it’s not safe.
Thanks