Sony Ilce-7 相机遥控器 API 无法更改为 "Contents Transfer" 模式

Camera Remote API for Sony Ilce-7 Cannot change to "Contents Transfer" mode

我已经能够使用 api 让我的 a-7 相机拍照。但是我一直在尝试传输这些图像。按照我调用 setCameraFunction 的文档,使用下面的 json 将其更改为内容传输模式:

{"method":"setCameraFunction","params":["Contents Transfer"],"id":1,"version":"1.0"}

然而相机总是returns与:

{"id":1,"error":[1,"Not Available Now"]}

下面是我用来拍摄图像的序列的输出(每次调用之间暂停 5 秒):

Request: {"method":"startRecMode","params":[],"id":1,"version":"1.0"}
Response: {"result":[0],"id":1}

Request: {"method":"getAvailableShootMode","params":[],"id":1,"version":"1.0"}
Response: {"result":["still",["still"]],"id":1}

Request: {"method":"actTakePicture","params":[],"id":1,"version":"1.0"}
Response: {"result":[["http:\/\/192.168.122.1:8080\/postview\/pict20170707_003048_0.JPG"]],"id":1}

Request: {"method":"stopRecMode","params":[],"id":1,"version":"1.0"}
Response: {"result":[0],"id":1}

Request: {"method":"getStorageInformation","params":[],"id":1,"version":"1.0"}
Response: {"id":1,"error":[1,"Not Available Now"]}

Request: {"method":"setCameraFunction","params":["Contents Transfer"],"id":1,"version":"1.0"}
Response: {"id":1,"error":[1,"Not Available Now"]}

有时 getStorageInformation returns 具有:

{
  "result": [
    [
      {
        "storageDescription": "Storage Media",
        "numberOfRecordableImages": 3275,
        "storageID": "Memory Card 1",
        "recordTarget": true,
        "recordableTime": -1
      }
    ]
  ],
  "id": 1
}

然而,尝试更改为内容模式总是会产生 "Not Available Now"。

我已经能够使用由 actTakePicture 函数生成的 url 访问预览图像,但是这是一张低分辨率图像,不适用于我们的应用程序。

我也尝试过在尝试进入 "Contents Transfer" 模式之前不调用 "stopRecMode" 函数,但没有任何区别。

尝试进入内容传输模式之前 "getEvent" 函数的输出:

{
  "result": [
    {
      "type": "availableApiList",
      "names": [
        "getVersions",
        "getMethodTypes",
        "getApplicationInfo",
        "getAvailableApiList",
        "getEvent",
        "startRecMode",
        "stopRecMode"
      ]
    },
    {
      "cameraStatus": "NotReady",
      "type": "cameraStatus"
    },
    null,
    {
      "type": "liveviewStatus",
      "liveviewStatus": false
    },
    null,
    [],
    [],
    null,
    null,
    null,
    [],
    null,
    {
      "cameraFunctionCandidates": [
        "Contents Transfer",
        "Remote Shooting"
      ],
      "type": "cameraFunction",
      "currentCameraFunction": "Remote Shooting"
    },
    null,
    null,
    null,
    null,
    null,
    null,
    {
      "postviewImageSizeCandidates": [
        "2M"
      ],
      "type": "postviewImageSize",
      "currentPostviewImageSize": "2M"
    },
    null,
    {
      "shootModeCandidates": [
        "still"
      ],
      "type": "shootMode",
      "currentShootMode": "still"
    },
    null,
    null,
    null,
    null,
    null,
    {
      "fNumberCandidates": [],
      "type": "fNumber",
      "currentFNumber": "--"
    },
    null,
    null,
    null,
    null,
    {
      "type": "shutterSpeed",
      "shutterSpeedCandidates": [],
      "currentShutterSpeed": "1/60"
    },
    {
      "type": "whiteBalance",
      "currentColorTemperature": -1,
      "checkAvailability": true,
      "currentWhiteBalanceMode": "Auto WB"
    },
    null
  ],
  "id": 1
}

其他信息:

已将相机升级至最新固件(3.20版),安装最新智能遥控APP(4.30版)

我完全被困在这里,任何建议都很棒。

谢谢

我能够解决这个问题,我想我会 post 在这里,以防它帮助其他人。

我没有使用 "Contents Transfer" 模式,而是使用 "setPostviewImageSize" 并将预览图像设置为原始图像。更改后,"actTakePicture" 返回的 url 将是刚刚拍摄的图像,图像的大小将是全分辨率,在本例中为 6000x4000。

这里是 setPostviewImageSize 请求的json:

    {
  "method": "setPostviewImageSize",
  "params": [
    "Original"
  ],
  "id": 1,
  "version": "1.0"
}