setting album art of a mp3 with php

ian picture ian · Jul 11, 2009 · Viewed 14.3k times · Source

I am looking for the best or any way to set the Album Art of mp3s using PHP.

Suggestions?

Answer

Sergey 'm17' Kolosov picture Sergey 'm17' Kolosov · Jul 12, 2009

Album art is a data frame identified as “Attached picture” due ID3v2 specification, and getID3() now is only one way to write all possible data frames in ID3v2 with pure PHP.

Look at this source: http://getid3.sourceforge.net/source/write.id3v2.phps

Search for this text in the source:

// 4.14  APIC Attached picture

there's a piece of code responsible for writing album art.

Another way, that seems to be not as slow as pure PHP, is to use some external application, that will be launched by PHP script. If your service designed to work under a high load, binary compiled tool will be a better solution.