mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-03 00:06:46 +01:00
Merge pull request #3394 from mikiher/webp-embed
Convert webp images to jpeg during metadata embed
This commit is contained in:
commit
65d1e7be56
@ -299,6 +299,12 @@ async function addCoverAndMetadataToFile(audioFilePath, coverFilePath, metadataF
|
|||||||
'-metadata:s:v',
|
'-metadata:s:v',
|
||||||
'comment=Cover' // add comment metadata to cover image stream
|
'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 {
|
} else {
|
||||||
ffmpeg.outputOptions([
|
ffmpeg.outputOptions([
|
||||||
'-map 0:v?' // retain video stream from input file if exists
|
'-map 0:v?' // retain video stream from input file if exists
|
||||||
|
Loading…
Reference in New Issue
Block a user