fix(server): better embedded artwork extraction with ffmpeg (#3860)

- `-map 0:v` selects all video streams from the input
- `-map -0:V` excludes all "main" video streams (capital V)

This combination effectively selects only the attached pictures

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan Quintão 2025-03-20 19:26:40 -04:00 committed by Joe Stump
parent 2c64f5ef86
commit 9a9605d341
No known key found for this signature in database
GPG Key ID: 29151C3EC48A0EB9

View File

@ -29,7 +29,7 @@ func New() FFmpeg {
}
const (
extractImageCmd = "ffmpeg -i %s -an -vcodec copy -f image2pipe -"
extractImageCmd = "ffmpeg -i %s -map 0:v -map -0:V -vcodec copy -f image2pipe -"
probeCmd = "ffmpeg %s -f ffmetadata"
)