sanket143 / id3

A cross platform dart package to extract meta data from mp3 files.
https://pub.dev/packages/id3/
MIT License
13 stars 6 forks source link

Invalid Image Data #18

Closed AhmadFadilB closed 3 years ago

AhmadFadilB commented 3 years ago

I already posted about this in https://github.com/sanket143/id3/issues/6#issuecomment-907699157_ But I just wanted to make it a new "issue".

After the package got updated, the mp3 now properly outputs the tags. But the base64 (for some files) seems to be invalid and can't be converted to an image with image.memory() (I also tried using online tool to convert it). My guess is that it has to do with it being encoded by itunes because the output tags are a bit different from usual or the ID3 versions. Idk, I'm kinda new to the programming world.

mp3 sample : https://kajian.net/MP3/Ceramah/Abu%20Abdil%20Muhsin%20Firanda%20Andirja/Tafsir%20Juz%2012%20Surat%20Yusuf/08.%20Tafsir%20Surat%20Yusuf%208%20Ayat%2067-80.mp3

flutter: {Version: v2.2.0, COMM: {eng: {iTunPGAP: 0, iTunNORM:  000002E1 000002F2 00002C8D 00002B28 001A5500 001A5500 00008D71 00008D1F 003038E8 003038E8, iTunSMPB:  00000000 00000210 00000956 000000000927DB9A 00000000 0124F860 00000000 00000000 00000000 00000000 00000000 00000000}}, EncodedBy: iTunes 12.8.2.3, APIC: {mime: JPG\^C, textEncoding: 0, picType: , description: ÿØÿà, base64: EEpGSUYAAQEBAEgASAAA/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgC0AUAAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKB<…>
sanket143 commented 3 years ago

Being encoded by iTunes should not be an issue, I am able to retrieve it using ffmpeg so it's possible that there's a logical error.

moffatman commented 3 years ago

Turns out there is a slight difference in the picture data encoding from ID3 v2.2 and v2.3, I will have the fix published soon.

sanket143 commented 3 years ago

@moffatman you're awesome