- wx.openVideoEditor能否支持超过5分钟的剪辑?
https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.openVideoEditor.html 目前最大能剪辑出来5分钟的视频,能否支持剪辑更长的视频,比如30分钟?甚至更长一些。
04-15 - 微信开发者工具在可视化模式下,热重载关闭了,依然会热重载刷新页面。
微信开发者工具在可视化模式下,需要调试一个界面,查看界面的边距和尺寸,但是一开启可视化,界面会返回刷新,再也无法交互。点击按钮。
04-02 - 微信开发者工具不显示Network界面和网络请求,是最新版本。为什么呢?
[图片][图片] 但是macbook上最新的微信开发者工具却可以正常显示networks,但macbook上面不能开启防火墙连接手机调试,而windows上可以 [图片]
03-16 - 如何从视频文件提取音频并保存?
现有的api只能合并音视频,但是需要一个视频中的音频文件却找不到api
03-07 - 如何实现音频裁剪与时间轴对齐?
音频剪辑功能:使用WebAudio API进行前端预处理,实现基础音频裁剪与时间轴对齐。 当进行音频裁剪时,如何设置左右两个按钮对音频选取,并且对应到音频的时间轴进行裁剪?
03-04 - 音频剪辑API可以用AudioBuffer实现吗?
目前小程序提供了视频剪辑的API,我还需要单独的音频剪辑API,请问下有没有办法实现?
03-04 - 导出视频MediaContainer.export失败没有原因
https://developers.weixin.qq.com/miniprogram/dev/api/media/video-processing/MediaContainer.export.html 合成两个视频,导出视频报错 {"errMsg": "operateMediaContainer:fail errType: 1, errCode: 606, errMsg: export interrupt", "containerId": 19, "errDesc": "export interrupt", "eventType": 205, "errCode": 606} export function mergeVideos(videosourcefiles, outputFilePath) { return new Promise((resolve, reject) => { const mediaContainer = uni.createMediaContainer(); // 检查 videosourcefiles 是否为空 if (videosourcefiles.length === 0) { reject(new Error("videosourcefiles 数组为空,请添加视频文件")); return; } // 提取并添加轨道 Promise.all( videosourcefiles.map((sourcefile) => { return new Promise((resolveTrack, rejectTrack) => { console.log("mergeVideos - sourcefile:", sourcefile); // 检查 sourcefile 是否有效 if (typeof sourcefile !== "string" || !sourcefile.trim()) { rejectTrack(new Error(`无效的 sourcefile: ${sourcefile}`)); return; } let path = sourcefile; mediaContainer.extractDataSource({ source: path, success: (res) => { console.log("extractDatasourcefile success:", sourcefile); mediaContainer.addTrack(res.tracks[0]); resolveTrack(); }, fail: (err) => { console.log(typeof sourcefile) console.error("extractDatasourcefile fail:", sourcefile, err); rejectTrack(err); }, }); }); }) ) .then(() => { // 导出合成视频 mediaContainer.export({ success: (res) => { resolve(res.tempFilePath); }, fail: (err) => { reject(err); }, }); }) .catch((err) => { reject(err); }) .finally(() => { // 销毁容器 mediaContainer.destroy(); }); }); } 视频合成失败: {"errMsg": "operateMediaContainer:fail errType: 1, errCode: 606, errMsg: export interrupt", "containerId": 19, "errDesc": "export interrupt", "eventType": 205, "errCode": 606} [图片]
02-28 - MediaContainer.extractDataSource(Object objec)的Bug
https://developers.weixin.qq.com/miniprogram/dev/api/media/video-processing/MediaContainer.extractDataSource.html 添加多条将传入的视频源分离轨道。地址提示要求string类型,确实传入了string,但是仍然报错要求string MediaContainer.extractDataSource(Object object) fail: (err) => { console.log(typeof sourcefile) console.error("extractDatasourcefile fail:", sourcefile, err); rejectTrack(err); }, string {"errno": 1001, "errMsg": "createMediaContainer.extractDataSource:fail parameter error: parameter.source should be String instead of Undefined;"} Promise.all( videosourcefiles.map((sourcefile) => { return new Promise((resolveTrack, rejectTrack) => { console.log("mergeVideos - sourcefile:", sourcefile); // 检查 sourcefile 是否有效 if (typeof sourcefile !== "string" || !sourcefile.trim()) { rejectTrack(new Error(`无效的 sourcefile: ${sourcefile}`)); return; } let path = sourcefile; mediaContainer.extractDataSource({ src: path, success: (res) => { console.log("extractDatasourcefile success:", sourcefile); mediaContainer.addTrack(res.tracks[0]); resolveTrack(); }, fail: (err) => { console.log(typeof sourcefile) console.error("extractDatasourcefile fail:", sourcefile, err); rejectTrack(err); }, }); }); }) ) .then(() => { // 导出合成视频 mediaContainer.export({ success: (res) => { resolve(res.tempFilePath); }, fail: (err) => { reject(err); }, }); }) .catch((err) => { reject(err); }) .finally(() => { // 销毁容器 mediaContainer.destroy(); }); [图片] ["wxfile://tmp_8f716c33140d1d262e26ed730b1d2a1a.mp4", "wxfile://tmp_9dcebf99f224e32d92bb910b556b00fa.mp4"] mergeVideos - sourcefile: wxfile://tmp_8f716c33140d1d262e26ed730b1d2a1a.mp4 string extractDatasourcefile fail: wxfile://tmp_8f716c33140d1d262e26ed730b1d2a1a.mp4 {"errno": 1001, "errMsg": "createMediaContainer.extractDataSource:fail parameter error: parameter.source should be String instead of Undefined;"}
02-28 - wx.chooseMedia无法选取多个是视频只能成功选取一个
chooseVideoFiles: function chooseVideoFiles() { return new Promise(function (resolve, reject) { wx.chooseMedia({ count: 9, mediaType: ['image', 'video'], sourceType: ['album', 'camera'], maxDuration: 50, camera: 'back', success: function success(res) { console.log(res); var videoFiles = res.tempFiles.map(function (file) { return file.tempFilePath; }); console.log(videoFiles); resolve(videoFiles); }, fail: function fail(err) 选择多个视频,只能成功一个 {"tempFiles": [{"height": 1280, "thumbTempFilePath": "wxfile://tmp_9bjpg", "width": 592, "size": 2254124, "duration": 17, "tempFilePath": "wxfile://tmp_6cbxxx.mp4", "fileType": "video"}], "errMsg": "chooseMedia:ok", "type": "video", "failedCount": 1}
02-27