mebtte / cicada

A multi-user music service for self-hosting.
GNU General Public License v3.0
1.05k stars 79 forks source link

安装ffmpeg上传歌曲报错 #32

Closed begitcn closed 1 year ago

begitcn commented 1 year ago

Error: /usr/local/bin/ffmpeg exited with non-zero code: 1 at ChildProcess.completionListener (/snapshot/cicada/node_modules/@expo/spawn-async/build/spawnAsync.js:41:23) at Object.onceWrapper (node:events:642:26) at ChildProcess.emit (node:events:527:28) at maybeClose (node:internal/child_process:1092:16) at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) ... at spawnAsync (/snapshot/cicada/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23) at /snapshot/cicada/server.js at tryCatch (/snapshot/cicada/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:44:17) at Generator. (/snapshot/cicada/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:125:22) at Generator.next (/snapshot/cicada/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:69:21) at asyncGeneratorStep (/snapshot/cicada/node_modules/@babel/runtime/helpers/asyncToGenerator.js) at _next (/snapshot/cicada/node_modules/@babel/runtime/helpers/asyncToGenerator.js) { pid: 1976263,

是ffmpeg有指定版本还是什么

mebtte commented 1 year ago

可能是这个音乐文件不支持 ffmpeg 这个参数转码 https://github.com/mebtte/cicada/blob/1d03724f8515f6feb063325bc41af47d2f32e258/apps/server/src/form_app/controllers/upload_asset.ts#L103-L110

能换个文件再试一下吗

begitcn commented 1 year ago

可能是这个音乐文件不支持 ffmpeg 这个参数转码

https://github.com/mebtte/cicada/blob/1d03724f8515f6feb063325bc41af47d2f32e258/apps/server/src/form_app/controllers/upload_asset.ts#L103

能换个文件再试一下吗

换了一个.mp3文件还是不行

mebtte commented 1 year ago

你要不试一下本地转码, 看看 ffmpeg 报错是什么?

ffmpeg -y -i input.mp3 -map_metadata -1 output.m4a
begitcn commented 1 year ago

你要不试一下本地转码, 看看 ffmpeg 报错是什么?

ffmpeg -y -i input.mp3 -map_metadata -1 output.m4a

[ipod @ 0x55f596452580] Frame rate very high for a muxer not efficiently supporting it. Please consider specifying a lower framerate, a different muxer or setting vsync/fps_mode to vfr [h264_v4l2m2m @ 0x55f596454180] Could not find a valid device [h264_v4l2m2m @ 0x55f596454180] can't configure encoder Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed!

begitcn commented 1 year ago

你要不试一下本地转码, 看看 ffmpeg 报错是什么?

ffmpeg -y -i input.mp3 -map_metadata -1 output.m4a

我搜搜这是啥

mebtte commented 1 year ago

可能是源文件码率太高了, 能把源文件发我一下吗, 我调试一下

begitcn commented 1 year ago

可能是源文件码率太高了, 能把源文件发我一下吗, 我调试一下

https://t.wss.ink/f/a5r5zgquzyb

mebtte commented 1 year ago

确实是 ffmpeg 没有办法转码这个文件导致, 我再研究研究一下 ffmpeg

mebtte commented 1 year ago

@begitcn 已经处理了 现在可以正确地转码了 https://github.com/mebtte/cicada/releases/tag/0.62.5

begitcn commented 1 year ago

@begitcn 已经处理了 现在可以正确地转码了 https://github.com/mebtte/cicada/releases/tag/0.62.5

好 我试试