wlanjie / trinity

android video record editor muxer sdk
Apache License 2.0
888 stars 273 forks source link

Export Video Failed #146

Open iamkhan001 opened 1 year ago

iamkhan001 commented 1 year ago

Hi there,

When I'm trying to export the video, I'm getting an error,

Export parse: /storage/emulated/0/Android/data/com.faimsoft.videoeditor/cache/video.mp4 error: * Line 1, Column 1
      Syntax error: value, object or array expected.

below is my code to export the video

   val draftPath = externalCacheDir?.absolutePath + "/video.mp4"

    val exportVideoInfo = VideoExportInfo(draftPath)
    exportVideoInfo.mediaCodecDecode = true
    exportVideoInfo.mediaCodecEncode = true
    exportVideoInfo.width = 544
    exportVideoInfo.height = 960
    exportVideoInfo.frameRate = 25
    exportVideoInfo.videoBitRate = 2000
    exportVideoInfo.sampleRate = 44100
    exportVideoInfo.channelCount = 1
    exportVideoInfo.audioBitRate = 128

    mVideoExport = TrinityCore.createExport(draftPath)
    mVideoExport.export(exportVideoInfo, this)

I'm using trinity version 0.3.2.

Please help on this