mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
Convert webp images to jpeg during metadata embed
This commit is contained in:
parent
0344a63b48
commit
422bb8c31c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user