User Tools

Site Tools


doc:appunti:hardware:sjcam-8pro-ambarella-wifi-api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:appunti:hardware:sjcam-8pro-ambarella-wifi-api [2022/06/17 13:54] – [Using Python to call the API] niccolodoc:appunti:hardware:sjcam-8pro-ambarella-wifi-api [2023/06/14 14:21] – [Ambarella msg_id Codes] niccolo
Line 128: Line 128:
 == AMBA_GET_SINGLE_SETTING_OPTIONS == == AMBA_GET_SINGLE_SETTING_OPTIONS ==
  
-Enumerate all the possible values for one setting:+Enumerate all the possible values for LCD Off Time setting:
  
 <code> <code>
Line 134: Line 134:
 RECV: {"rval":0,"msg_id":9,"permission":"settable","param":"LCD Off Time", RECV: {"rval":0,"msg_id":9,"permission":"settable","param":"LCD Off Time",
        "options":["Off","30 Seconds","1 Minute","3 Minutes","5 Minutes"]}        "options":["Off","30 Seconds","1 Minute","3 Minutes","5 Minutes"]}
 +</code>
 +
 +Enumerate all the possible values for Resolution setting:
 +
 +<code>
 +SEND: {"msg_id":9, "param": "Resolution", "token":1}
 +RECV: {"rval":0,"msg_id":9,"permission":"settable","param":"Resolution","options":[
 +       "4K (3840x2160) 24FPS","4K (3840x2160) 25FPS","4K (3840x2160) 30FPS",
 +       "4K (3840x2160) 50FPS","4K (3840x2160) 60FPS",
 +       "4K UItra (3840X21 60) 24FPS","4K UItra (3840X2160) 30FPS",
 +       "2.7K (2720x1520) 24FPS","2.7K (2720x1520) 25FPS","2.7K (2720x1520) 30FPS",
 +       "2.7K (2720x1520) 50FPS","2.7K (2720x1520) 60FPS",
 +       "1440 (2560x1440) 24FPS","1440 (2560x1440) 25FPS","1440 (2560x1440) 30FPS",
 +       "1440 (2560x1440) 50FPS","1440 (2560x1440) 60FPS",
 +       "1080(1920x1080) 24FPS","1080(1920x1080) 25FPS","1080(1920x1080) 30FPS",
 +       "1080(1920x1080) 50FPS","1080(1920x1080) 60FPS","1080(1920x1080) 120FPS",
 +       "1080 Ultra(1920X1080) 30FPS","1080 Ultra(1920X1080) 60FPS",
 +       "720(1280x720) 240FPS"]}
 </code> </code>
  
Line 150: Line 168:
 SEND: {"msg_id":2,"type":"camera_clock","param":"2022-05-06 17:02:43","token":2} SEND: {"msg_id":2,"type":"camera_clock","param":"2022-05-06 17:02:43","token":2}
 RECV: {"rval":0,"msg_id":2,"type":"camera_clock"} RECV: {"rval":0,"msg_id":2,"type":"camera_clock"}
 +</code>
 +
 +Set the video mode:
 +
 +<code>
 +SEND: {"msg_id": 2, "type": "Resolution", "param": "1080(1920x1080) 30FPS", "token":1}
 +RECV: {"rval":0,"msg_id":2,"type":"camera_mode"}
 +</code>
 +
 +Set the camera mode to normal record:
 +
 +<code>
 +SEND: {"msg_id": 2, "type": "camera_mode", "param": "normal_record", "token":1}
 +RECV: {"rval":0,"msg_id":2,"type":"camera_mode"}{"msg_id":7,"type":"normal_record"}
 </code> </code>
  
Line 259: Line 291:
  
 On Android I installed also the **Termux:Widget** app which allows to add shortcut icons over the desktop which will launch the scripts. I have scripts to start and stop recording, to change white balance, to turn ON and OFF the front display and to power OFF the camera. Each launcher was customized with its own **icon** (se the screenshot to the left). When a script is launched, the output is printed into the text console; to have a more visible feedback I used the **figlet** program to print large ASCII-art messages (se the screenshot to the right). On Android I installed also the **Termux:Widget** app which allows to add shortcut icons over the desktop which will launch the scripts. I have scripts to start and stop recording, to change white balance, to turn ON and OFF the front display and to power OFF the camera. Each launcher was customized with its own **icon** (se the screenshot to the left). When a script is launched, the output is printed into the text console; to have a more visible feedback I used the **figlet** program to print large ASCII-art messages (se the screenshot to the right).
 +
 +In this **[[https://github.com/RigacciOrg/ambarella-api-pytools|GitHub repository]]** you can find a Python module which contains basic functions to send and receive the JSON messages, plus some handy scripts to do basic operations, like **REC Start**, **REC Stop**, set **White Balance**, etc.
  
  
doc/appunti/hardware/sjcam-8pro-ambarella-wifi-api.txt · Last modified: 2023/06/16 10:18 by niccolo