mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +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', | ||||
|         '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