请登录后探索更多精彩内容!
环境配置 确保pclose popen shell_exec exec 等函数没被禁用
安装 ffmpeg
例如我在linux系列服务 /www/wwworoot 执行命令
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz xz -d ffmpeg-release-amd64-static.tar.xz tar -xvf ffmpeg-release-amd64-static.tar
安装后 你的ffmpeg相对地址就是
客户打开发帖界面 F12输入JS
let input = document.createElement('input'); input.type = 'file'; input.multiple = true; input.onchange = async function () { let p = new FormData(); p.set('video',this.files [0]); return fetch('https://ai.acgi.moe/attach-create.htm',{ method:'POST', headers:{ 'content-action': 'attach/video', 'content-mime': this.files [0].type, 'content-width':999, 'ajax-fetch':1, }, body:p }).then(async response=>{ const reader = response.body.getReader(); while(true){ const {done,value} = await reader.read(); if(done)break; console.log(new TextDecoder().decode(value)); } }); }; input.click(); input.remove();
题外话 如何把所有文件转化为 MP4
暂无评论
请先登录后发表评论!
暂无评论