Fix cover art embedded as a plain video stream - #219
Conversation
4d83aad to
82239f3
Compare
82239f3 to
3882304
Compare
|
This fixes more than the title suggests: besides m4a, it also gets flac working (the image was silently dropped there) and stops mp3 from storing a re-encoded png. Two things you may want to fold in:
Heads-up on overlap: the cover only becomes an ffmpeg input inside the track.CoverPath == "" branch, and loadCustomTracks fills CoverPath from the playlist cache — so for playlists imported through the web UI there is no picture stream for attached_pic to flag in the first place. I opened #230 for that, which ends up covering this ground too. Either order works for me: I can rebase on top of this one, or drop the overlapping part if this gets merged first. |
ffmpeg was re-encoding cover art as a normal video stream, so players did not recognize it as album art. Copy the image and mark it as attached_pic.
Mark the picture as a front cover via stream metadata, and re-encode as mjpeg so a WebP cached under a .jpg name does not break the muxer.
3882304 to
c9a1c5a
Compare
|
good catches, thanks! folded both of those recommendations into this branch. Regarding the overlap with #230, either order works for me. Happy to rebase or drop the overlapping part if that one lands first. |
This fixes embedded cover art for non-MP3 output such as M4A. ffmpeg currently re-encodes the image as a normal video stream. Copying it and setting
attached_picmakes players and library scanners recognize it as album art.Verified with ffprobe on M4A output: