14 Star 19 Fork 15

OpenHarmony-TPC / mp4parser

 / 详情

HarmonyOS NEXT DP2 (2.0.0.72) 无法使用,看不到报错,返回code:1

待办的
缺陷
创建于  
2024-04-24 17:39

【模块名_概率】简要描述:

【环境信息】:
在API11上调用都返回失败。
HarmonyOS NEXT DP2 (2.0.0.72)

【预置条件】:

【测试步骤】:

  let getLocalDirPath = this.context.tempDir+"/";
  let filePathOne = getLocalDirPath + "VID_2024-04-24 11-19-25.mp4";
  let filePathTwo = getLocalDirPath + "VID_2024-04-24 11-21-26.mp4";
  let outMP4 = getLocalDirPath + "mergeout.mp4";
  let callBack: ICallBack = {
    callBackResult(code: number) {
      // code 1
      if (code == 0) {
        AlertDialog.show({ message: '执行成功' })
      }
      else {
        AlertDialog.show({ message: '执行失败' })
      }
    }
  }
  MP4Parser.videoMerge(filePathOne, filePathTwo, outMP4, callBack);

直接执行指令也失败:

  const localDirPath = this.context.cacheDir + "/";
  const sourceMP4 = path;
  const destPath: string = localDirPath + "out.mp4";
  const cmd = `ffmpeg -y -i "${sourceMP4}" -c copy "${destPath}"`;
  Log.d(TAG, 'cmd: ' + cmd)
  MP4Parser.ffmpegCmd(cmd, {
    callBackResult(code: number) {
      Log.d(TAG, 'callBackResult: ' + code)
      // code 1
    }
  });

【预期结果】:
成功
【实际结果】:
code 是 1
【恢复手段】:

【出现概率】:问题出现次数/实际测试次数

100%

【定位信息】:

看不到报错,是否可以输出详细的报错?

评论 (1)

wolfx 创建了缺陷
wolfx 修改了描述
展开全部操作日志

找到问题了:

const cmd = `ffmpeg -y -i "${sourceMP4}" -c copy "${destPath}"`;

sourceMP4,destPath需要去掉引号,且路径中不能有空格。

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(1)
127954 wolfx 1578918794
1
https://gitee.com/openharmony-tpc/mp4parser.git
git@gitee.com:openharmony-tpc/mp4parser.git
openharmony-tpc
mp4parser
mp4parser

搜索帮助