Start video recording

Completed

Comments

10 comments

  • DJI Developer Support
    I hope this message finds you well. I have reviewed the code and it appears to be in proper order. I would like to inquire about the frequency at which this issue arises. Additionally, have you considered reformatting the memory card as a potential solution?
    0
    Comment actions Permalink
  • MHM

    Hello,

    Thanks for your reply. Unfortunately, this error always appears. I do format microSD several times and check video recording works well from remote control button, but not using this SDK function.

    Thanks for your help.

    I will keep trying :)

    0
    Comment actions Permalink
  • DJI Developer Support
    Is your MSDK version up to date?
    0
    Comment actions Permalink
  • MHM

    Hello,

    I'm using MSDK 5.5.0.

    Regarding API documentation, this function should be supported since MSDK 5.0.0.

    Thanks in advance!

    0
    Comment actions Permalink
  • DJI Developer Support
    I am writing to inquire about the possibility of encountering an error while recording with the DJI pilot. I am uncertain about the steps to reproduce this problem. Could you kindly provide me with more information regarding the issue you are facing?
    0
    Comment actions Permalink
  • MHM

    Yes, of course.

    I just add a button to the UXSDK (https://github.com/dji-sdk/Mobile-SDK-Android-V5) and add a click listener that performs the code shown above to start a video recording:

    KeyManager.getInstance().performAction(
    DJIKey.create(CameraKey.KeyStartRecord),
    object : CommonCallbacks.CompletionCallbackWithParam<EmptyMsg> {
    override fun onSuccess(t: EmptyMsg?) {
    Log.i(javaClass.simpleName, t.toString())
    }

    override fun onFailure(error: IDJIError) {
    Log.i(javaClass.simpleName, error.toString())
    }

    }
    )

    But I always get the same error shown above:

    ErrorImp{errorType='CORE', errorCode='SYSTEM_ERROR', innerCode='', description='null', hint='error code = -7'}

    Thanks in advance for the support!

    0
    Comment actions Permalink
  • DJI Developer Support
    Will there be an error when recording on DJI pilot?
    0
    Comment actions Permalink
  • MHM

    From the UXSDK record button and DJI Pilot works fine. That's why guess I'm doing something wrong but I have no clue where I'm failing :(

    Thank you!

    0
    Comment actions Permalink
  • DJI Developer Support
    I hope this message finds you well. I would like to inform you that the issue you are experiencing might be a result of not properly configuring the camera mode to VIDEO_NORMAL. To resolve this, I kindly request you to switch to the recording mode before initiating the recording process.
    0
    Comment actions Permalink
  • MHM

    That was my problem!

    Now it works like a charm :)

    CameraKey.KeyCameraMode.create().set(
    CameraMode.VIDEO_NORMAL,
    onSuccess = {
    KeyManager.getInstance().performAction(
    DJIKey.create(CameraKey.KeyStartRecord),
    object : CommonCallbacks.CompletionCallbackWithParam<EmptyMsg> {
    override fun onSuccess(t: EmptyMsg?) {
    Log.i(javaClass.simpleName, t.toString())
    }

    override fun onFailure(error: IDJIError) {
    Log.i(javaClass.simpleName, error.toString())
    }

    }
    )
    },
    onFailure = { Log.i(javaClass.simpleName, "fail start video record) }
    )

    Thank you very much!!

    0
    Comment actions Permalink

Please sign in to leave a comment.