05-13-2023, 09:05 PM
<The following is irrelevant for the majority of folks who have at most one picture embedded in each track file.>
The ID3V2.3/2.4 metadata tag allows for multiple pictures to be embedded in a track file. Each picture is contained in its own APIC frame; each APIC frame has a type code such as 3 = Cover (Front) or 4 = Cover (Back). This metadata scheme is commonly used in MP3-formatted files.
FLAC-formatted files use a different metadata tagging scheme but it allows also the embedding of multiple pictures in a track file. Each picture is contained in its own METADATA_BLOCK_PICTURE which is typed using the same type codes used in a ID3v2.3/2.4 APIC frame.
I had conjectured in a recent thread about cover images not loading for all albums that perhaps the fact that the picture embedded in a file offered by the OP for inspection was typed 0 = Other rather than 3 was the problem. @Nutul surfed the code and pointed out that
That turned out to be true and the OP's problem lay elsewhere.
I have now found through testing that this is true not just for the ID3v2 handler in the Zend library but also for the FLAC metadata handler.
If an MP3 or FLAC track contains multiple pictures (for example, I like to include both front and back covers for tracks that originated on LPs of significance to me) only the first picture will be extracted from the file for use as a thumbnail and as the artwork shown in playback (assuming the moOde cover search priority is set to embedded). This is true no matter how the individual pictures are typed.
So, if you want to embed more than one picture, make sure the first one in the file is the front cover, or you might get a surprise.
Regards,
Kent
The ID3V2.3/2.4 metadata tag allows for multiple pictures to be embedded in a track file. Each picture is contained in its own APIC frame; each APIC frame has a type code such as 3 = Cover (Front) or 4 = Cover (Back). This metadata scheme is commonly used in MP3-formatted files.
FLAC-formatted files use a different metadata tagging scheme but it allows also the embedding of multiple pictures in a track file. Each picture is contained in its own METADATA_BLOCK_PICTURE which is typed using the same type codes used in a ID3v2.3/2.4 APIC frame.
I had conjectured in a recent thread about cover images not loading for all albums that perhaps the fact that the picture embedded in a file offered by the OP for inspection was typed 0 = Other rather than 3 was the problem. @Nutul surfed the code and pointed out that
Quote:- the Zend library looks at the APIC frame, doesn't seem to check for specific ImageType (although the image type IS read and stored in the APIC frame), so probably the first found image is used.
That turned out to be true and the OP's problem lay elsewhere.
I have now found through testing that this is true not just for the ID3v2 handler in the Zend library but also for the FLAC metadata handler.
If an MP3 or FLAC track contains multiple pictures (for example, I like to include both front and back covers for tracks that originated on LPs of significance to me) only the first picture will be extracted from the file for use as a thumbnail and as the artwork shown in playback (assuming the moOde cover search priority is set to embedded). This is true no matter how the individual pictures are typed.
So, if you want to embed more than one picture, make sure the first one in the file is the front cover, or you might get a surprise.
Regards,
Kent