Bloodevil / sony_camera_api

sony camera remote api
http://developer.sony.com/develop/cameras/
MIT License
245 stars 60 forks source link

HDR-AS15: Supported Movie Quality [ERROR] camera doesn't work #9

Closed mungewell closed 8 years ago

mungewell commented 9 years ago

Looks like the HDR-AS15 does not like this request, but the QX10 does....

HDR-AS15

$ python sony_camera_liveview.py
 * Running on http://127.0.0.1:5000/
Found Camera:
Application Info {'id': 1, 'result': ['Smart Remote Control', '2.0.0']}
Versions {'id': 1, 'result': [['1.0']]}
Supported Shoot Modes {'id': 1, 'result': [['movie', 'intervalstill']]}
Supported Movie Quality [ERROR] camera doesn't workHTTP Error 403: Forbidden
Supported Movie File Format {'id': 1, 'error': [12, 'getSupportedMovieFileFormat']}
Supported Movie Steady Mode [ERROR] camera doesn't workHTTP Error 403: Forbidden

QX10

$ python sony_camera_liveview.py
 * Running on http://127.0.0.1:5000/
Found Camera:
Application Info {'id': 1, 'result': ['Smart Remote Control', '2.1.1']}
Versions {'id': 1, 'result': [['1.0', '1.1']]}
Supported Shoot Modes {'id': 1, 'result': [['still', 'movie']]}
Supported Movie Quality {'id': 1, 'error': [12, 'getSupportedMovieQuality']}
Supported Movie File Format {'id': 1, 'error': [12, 'getSupportedMovieFileFormat']}
Supported Movie Steady Mode {'id': 1, 'error': [12, 'getSupportedSteadyMode']}
mungewell commented 9 years ago

HDR-AS15 claims to support both 'getSupportedMovieQuality' and 'getSupportedSteadyMode'

Available Api List: {'id': 1, 'result': [['getMethodTypes', 'getAvailableApiList', 'setShootMode', 'getShootMode', 'getSupportedShootMode', 'getAvailableShootMode', 'setSteadyMode', 'getSteadyMode', 'getSupportedSteadyMode', 'getAvailableSteadyMode', 'setViewAngle', 'getViewAngle', 'getSupportedViewAngle', 'getAvailableViewAngle', 'setMovieQuality', 'getMovieQuality', 'getSupportedMovieQuality', 'getAvailableMovieQuality', 'startLiveview', 'stopLiveview', 'startMovieRec', 'stopMovieRec', 'startIntervalStillRec', 'stopIntervalStillRec', 'setCameraFunction', 'getCameraFunction', 'getSupportedCameraFunction', 'getAvailableCameraFunction', 'getStorageInformation', 'getApplicationInfo', 'getVersions', 'getEvent']]}

QX10 doesn't

Available Api List: {'id': 1, 'result': [['getMethodTypes', 'getAvailableApiList', 'setShootMode', 'getShootMode', 'getSupportedShootMode', 'getAvailableShootMode', 'setSelfTimer', 'getSelfTimer', 'getSupportedSelfTimer', 'getAvailableSelfTimer', 'setPostviewImageSize', 'getPostviewImageSize', 'getSupportedPostviewImageSize', 'getAvailablePostviewImageSize', 'startLiveview', 'stopLiveview', 'actTakePicture', 'startMovieRec', 'stopMovieRec', 'awaitTakePicture', 'actZoom', 'setExposureMode', 'getExposureMode', 'getSupportedExposureMode', 'getAvailableExposureMode', 'setBeepMode', 'getBeepMode', 'getSupportedBeepMode', 'getAvailableBeepMode', 'setCameraFunction', 'getCameraFunction', 'getSupportedCameraFunction', 'getAvailableCameraFunction', 'setStillSize', 'getStillSize', 'getSupportedStillSize', 'getAvailableStillSize', 'actFormatStorage', 'getStorageInformation', 'setTouchAFPosition', 'cancelTouchAFPosition', 'getTouchAFPosition', 'getSupportedExposureCompensation', 'getSupportedWhiteBalance', 'getSupportedIsoSpeedRate', 'actHalfPressShutter', 'cancelHalfPressShutter', 'getApplicationInfo', 'getVersions', 'getEvent']]}
mungewell commented 9 years ago

Hmmm... this page says the AS15 doesn't support those calls: https://developer.sony.com/develop/cameras/

But PlayMemoriesMobile (Android) does allow you to change the Video mode, via the wrench Icon (to PS, HQ, STD, SLOW, SSLOW and VGA).

Bloodevil commented 9 years ago

I have only QX10 so I get API list from QX10 api list. So I didn't check other APIs.

I think write code like below:

  1. Connect Camera.
  2. after then get api list from camera api list. (Camera have different api set)
  3. support that api.

At first I tested only QX10 and use only QX10. I should get another camera lol. Thanks.

mungewell commented 9 years ago

It seems that these commands are supported by the AZ1, so if we can find someone with one of those to test with it would be helpful to find out whether the commands actually work with that.

Looking through the list, it seems that the AS15 doesn't support enough commands for doing the PlayMemoriesMobile functionality. So maybe the camera supports another method of control (that PMM uses) and the 'Remote API' is the new way of doing things - and is only partially supported.

Bloodevil commented 9 years ago

I know there are different set of API by each cameras. but all camera that support Remote API have "get_api_list". That api have support list of connected camera. So I think that after make dynamic class depends on get_api_list when camera connected. don't care about support or not (can managed by get_api_list)

mungewell commented 9 years ago

The point was that the AS15 claims to support those calls (see above for 'setMovieQuality', 'getMovieQuality', 'getSupportedMovieQuality', 'getAvailableMovieQuality' and 'setSteadyMode', 'getSteadyMode', 'getSupportedSteadyMode', 'getAvailableSteadyMode') in the 'Supported API' response.... but then refuses to let you use them with a 403 error :-(

If you trust the list given by the camera, then it should respond correctly to all those calls. Obviously not your fault, but a problem all the same.

Bloodevil commented 9 years ago

oh.. I should test using AS15. but if then, how about send email to Sony. I want to see packet from AS15 but I don't have ....

mungewell commented 9 years ago

This post is very interesting: https://stackoverflow.com/questions/21683370/some-functions-of-sony-camera-remote-api-seemed-to-be-unavailable

Some undocumented API becomes avaliable after auth. You can see how it is done on QX100 here from line 144 to 151: https://github.com/Tsar/sony_qx_controller/blob/master/sony_qx_controller.py#L144

It seems that there is a 'super secret handshake' which gives you super powers (ie. lets you access protected calls). ;-)

mungewell commented 9 years ago

I wrote a little script with follows the authentication process, but don't have my AS15 with me to test (until the weekend).

Are you aware of any commands with the QX10 (which I have with me) which give the '403' or some other authentication error?

mungewell commented 9 years ago

Confirmation that the authentication process succeeds... at least on the HDR-AS15

simon@LinuxBuild:~/sony_camera_api-mungewell-git/src/example$ python authenticate.py 
API List: {'id': 1, 'result': [['getMethodTypes', 'getAvailableApiList', 'setShootMode', 'getShootMode', 'getSupportedShootMode', 'getAvailableShootMode', 'setSteadyMode', 'getSteadyMode', 'getSupportedSteadyMode', 'getAvailableSteadyMode', 'setViewAngle', 'getViewAngle', 'getSupportedViewAngle', 'getAvailableViewAngle', 'setMovieQuality', 'getMovieQuality', 'getSupportedMovieQuality', 'getAvailableMovieQuality', 'startLiveview', 'stopLiveview', 'startMovieRec', 'stopMovieRec', 'startIntervalStillRec', 'stopIntervalStillRec', 'setCameraFunction', 'getCameraFunction', 'getSupportedCameraFunction', 'getAvailableCameraFunction', 'getStorageInformation', 'getApplicationInfo', 'getVersions', 'getEvent']]}
Get Movie Quality: [ERROR] camera doesn't workHTTP Error 403: Forbidden
Authenicated: {'id': 1, 'result': [{'dg': ''}]}
Get Movie Quality: {'id': 1, 'result': ['STD']}
Bloodevil commented 9 years ago

I should try. thanks for your report!