diff --git a/server/utils/ffmpegHelpers.js b/server/utils/ffmpegHelpers.js index e0f5c7da..3fa9f63c 100644 --- a/server/utils/ffmpegHelpers.js +++ b/server/utils/ffmpegHelpers.js @@ -299,6 +299,12 @@ async function addCoverAndMetadataToFile(audioFilePath, coverFilePath, metadataF '-metadata:s:v', 'comment=Cover' // add comment metadata to cover image stream ]) + const ext = Path.extname(coverFilePath).toLowerCase() + if (ext === '.webp') { + ffmpeg.outputOptions([ + '-c:v mjpeg' // convert webp images to jpeg + ]) + } } else { ffmpeg.outputOptions([ '-map 0:v?' // retain video stream from input file if exists