Insta360Develop / Insta360_OSC

36 stars 4 forks source link

OSC for capturing timelapse video not working for Insta360 One X2 #26

Closed dragonheat123 closed 1 year ago

dragonheat123 commented 1 year ago

Using the following CURL commands:

curl http://192.168.42.1/osc/info

returns:

{"manufacturer":"Arashi Vision",
"model":"Insta360 ONE X2",
"serialNumber":"IXSE28CN8SS4QS",
"firmwareVersion":"v1.0.62",
"supportUrl":"https://www.insta360.com/product/insta360-onex2/",
"endpoints":{"httpPort":80,"httpUpdatesPort":10080},
"gps":true,"gyro":true,"uptime":56,
"api":["/osc/info","/osc/state","/osc/checkForUpdates","/osc/commands/execute","/osc/commands/status"],
"apiLevel":[2],"_sensorModuleType":"Dual_Fisheye","_vendorVersion":"v1.1_build1"}%
curl -X POST 'http://192.168.42.1/osc/state' \
    -H "Content-Type:application/json;charset=utf-8" \
    -H "Accept:application/json" \
    -H "X-XSRF-Protected:1" \
    -d ""

returns:

{"fingerprint":"FPR_145057",
"state":{"_cardState":"pass","batteryLevel":0.230000,
"storageUri":"http://192.168.42.1:80/DCIM/Camera01/"}}% 
curl -X POST 'http://192.168.42.1/osc/commands/execute' \
    -H "Content-Type:application/json;charset=utf-8" \
    -H "Accept:application/json" \
    -H "X-XSRF-Protected:1" \
    -d '{"name": "camera.setOptions", "parameters": {"options": {"captureMode": "video", "_videoType": "timelapse", "_timelapseInterval": 1000}}}'

returns:

{"name":"camera.setOptions","state":"done"}% 

and the camera was put into timelapse mode, however after

curl -X POST 'http://192.168.42.1/osc/commands/execute' \
    -H "Content-Type:application/json;charset=utf-8" \
    -H "Accept:application/json" \
    -H "X-XSRF-Protected:1" \
    -d '{"name": "camera.startCapture"}'

return:

{"name":"camera.startCapture","state":"done"}%   

expected the camera to start recording and return filenames, but subsequent calls to camera.startCapture returns:

{"name":"camera.startCapture","state":"error","error":{"code":"disabledCommand","message":"Currently camera is not in video mode"}}%    

camera.startCapture is working in video mode without the timelapse commands

curl -X POST 'http://192.168.42.1/osc/commands/execute' \
    -H "Content-Type:application/json;charset=utf-8" \
    -H "Accept:application/json" \
    -H "X-XSRF-Protected:1" \
    -d '{"name": "camera.setOptions", "parameters": {"options": {"captureMode": "video"}}}'

and 

curl -X POST 'http://192.168.42.1/osc/commands/execute' \
    -H "Content-Type:application/json;charset=utf-8" \
    -H "Accept:application/json" \
    -H "X-XSRF-Protected:1" \
    -d '{"name": "camera.startCapture"}'

camera starts recording
ngquyduc commented 1 year ago

Hi dragonheat123, I also encouter the same problem. Have you found the solution for this?

Tianweihaihaihai commented 1 year ago

no official firmware to support this now. pls contact with support team to get demo fw

dragonheat123 commented 1 year ago

demo fw onex2_v9.0.63.1_build2 works, thanks