收藏
回答

MediaContainer.export()导出失败?

  1. errCode601
  2. errDesc"audio export failed"
  3. errMsg"operateMediaContainer:fail errType: 1, errCode: 601, errMsg: audio export failed"

  4. dd
  5. 代码如下:

                    var mc = wx.createMediaContainer();

                    mc.extractDataSource({

                        source: tempFilePath,

                        success: (obj) => {

                            console.log(obj)

                            const audioTrack = obj.tracks[0];

                            mc.addTrack(audioTrack); // 将视频轨道加入到待合成

                            // 导出合成容器中的音频

                            mc.export({

                                success: (x) => {

                                    // 拿到导出之后的音频

                                    console.log("导出音频:", x.tempFilePath);

                                    mc.destroy();

                                },

                                fail: (x) => {

                                    console.log(x)

                                    console.log("导出失败");

                                    mc.destroy();

                                }

                            });

                        },

                    });



回答关注问题邀请回答
收藏

1 个回答

  • 太阳霸福
    太阳霸福
    2023-08-05

    请问这个错误原因是什么

    2023-08-05
    有用
    回复
登录 后发表内容