MSDK v5 Livestreaming Lib error

已完成

评论

3 条评论

  • Dennis Tietz

    Took me couple of hours to figure it out: The native lib is not packed within my application. 

    For newer android application I had to change the build gradle to include the lib.

    packagingOptions {
    jniLibs {
    useLegacyPackaging = true
    }
    resources {
    excludes += '/META-INF/{AL2.0,LGPL2.1}'
    }
    doNotStrip "*/*/libconstants.so"
    doNotStrip "*/*/libdji_innertools.so"
    doNotStrip "*/*/libdjibase.so"
    doNotStrip "*/*/libDJICSDKCommon.so"
    doNotStrip "*/*/libDJIFlySafeCore-CSDK.so"
    doNotStrip "*/*/libdjifs_jni-CSDK.so"
    doNotStrip "*/*/libDJIRegister.so"
    doNotStrip "*/*/libdjisdk_jni.so"
    doNotStrip "*/*/libDJIUpgradeCore.so"
    doNotStrip "*/*/libDJIUpgradeJNI.so"
    doNotStrip "*/*/libDJIWaypointV2Core-CSDK.so"
    doNotStrip "*/*/libdjiwpv2-CSDK.so"
    doNotStrip "*/*/libffmpeg.so"
    doNotStrip "*/*/libFlightRecordEngine.so"
    doNotStrip "*/*/libvideo-framing.so"
    doNotStrip "*/*/libwaes.so"
    doNotStrip "*/*/libagora-rtsa-sdk.so"
    doNotStrip "*/*/libc++.so"
    doNotStrip "*/*/libc++_shared.so"
    doNotStrip "*/*/libmrtc_28181.so"
    doNotStrip "*/*/libmrtc_agora.so"
    doNotStrip "*/*/libmrtc_core.so"
    doNotStrip "*/*/libmrtc_core_jni.so"
    doNotStrip "*/*/libmrtc_data.so"
    doNotStrip "*/*/libmrtc_log.so"
    doNotStrip "*/*/libmrtc_onvif.so"
    doNotStrip "*/*/libmrtc_rtmp.so"
    doNotStrip "*/*/libmrtc_rtsp.so"
    }
    }

    I'm getting another error now when try to connect to RTMP. I used youtube live for demo purpose. See my logcat:

    16:38:55.474  I  [MRTC-I               checkAndConvertUrl:  412]: []RTMP: no @, means no auth in URL
    16:38:55.475  I  [MRTC-I               checkAndConvertUrl:  448]: []RTMP: Converted url is rtmp://a.rtmp.youtube.com/live2/{{censored_token}}
    16:38:55.475  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: RTMP_Init
    16:38:55.475  E  [MRTC-F           mt_librtmp_logcallback:   92]: RTMP: Wrong level(1) log, RTMP_Init, should not happen!
    16:38:55.475  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: RTMP_TLS_Init
    16:38:55.475  E  [MRTC-F           mt_librtmp_logcallback:   92]: RTMP: Wrong level(1) log, RTMP_TLS_Init, should not happen!
    16:38:55.477  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: Parsing...
    16:38:55.477  E  [MRTC-F           mt_librtmp_logcallback:   92]: RTMP: Wrong level(4) log, Parsing..., should not happen!
    16:38:55.477  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: Parsed protocol: 0
    16:38:55.477  E  [MRTC-F           mt_librtmp_logcallback:   92]: RTMP: Wrong level(4) log, Parsed protocol: 0, should not happen!
    16:38:55.477  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: Parsed host    : a.rtmp.youtube.com
    16:38:55.477  E  [MRTC-F           mt_librtmp_logcallback:   92]: RTMP: Wrong level(4) log, Parsed host    : a.rtmp.youtube.com, should not happen!
    16:38:55.477  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: Parsed app     : live2
    16:38:55.477  E  [MRTC-F           mt_librtmp_logcallback:   92]: RTMP: Wrong level(4) log, Parsed app     : live2, should not happen!
    16:38:55.477  I  [MRTC-I                     mt_rtmp_open:  147]: RTMP: rtmp open rtmp://a.rtmp.youtube.com/live2/{{censored_token}} done
    16:38:55.477  I  [MRTC-I              resetStartTimestamp: 1020]: []RTMP: Reset mStartTimestampMs to 0
    16:38:55.477  I  [MRTC-I                           doInit:  104]: []RTMP: add channel(url:rtmp://a.rtmp.youtube.com/live2/{{censored_token}}) done, return stream id 14!
    16:38:55.477  I  [MRTC-I        doCheckNeedMuteDummyAudio:  297]: []RTMP: Target rtmp://a.rtmp.youtube.com/live2/{{censored_token}} must need audio!!!
    16:38:55.477  I  [MRTC-I        doCheckNeedMuteDummyAudio:  297]: []RTMP: Target rtmp://a.rtmp.youtube.com/live2/{{censored_token}} must need audio!!!
    16:38:55.477  I  [MRTC-I                   doReconnection:  225]: []RTMP: reconnecting ...
    16:38:55.477  I  [MRTC-I                             init:   95]: []ChannelBase: enable dummy audio send, audio.enabled 0, needMuteDummy 1
    16:38:55.477  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: RTMP_Init
    16:38:55.477  D  current video channel stream id 14
    16:38:55.477  D  current audio channel stream id 15
    16:38:55.477  E  [MRTC-F           mt_librtmp_logcallback:   92]: RTMP: Wrong level(1) log, RTMP_Init, should not happen!
    16:38:55.477  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: Parsing...
    16:38:55.477  E  [MRTC-F           mt_librtmp_logcallback:   92]: RTMP: Wrong level(4) log, Parsing..., should not happen!
    16:38:55.477  D  addChannelConfig end
    16:38:55.478  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: Parsed protocol: 0
    16:38:55.478  E  [MRTC-F           mt_librtmp_logcallback:   92]: RTMP: Wrong level(4) log, Parsed protocol: 0, should not happen!
    16:38:55.478  E  [MRTC-E           mt_librtmp_logcallback:   90]: RTMP: Parsed host    : a.rtmp.youtube.com

    0
    评论操作 固定链接
  • DJI Developer Support
    I hope this message finds you well. I would like to bring to your attention that there appears to be an issue with the RTMP push address you have provided. Would it be possible for you to kindly attempt to utilize our sample code in order to successfully push video stream to this address?
    0
    评论操作 固定链接
  • 魏立

    我也发生了该错误,感谢您提供的代码,我加上就可以了

    jniLibs {
    useLegacyPackaging = true
    }
    0
    评论操作 固定链接

请先登录再写评论。