{"id":3475,"date":"2021-09-03T11:16:51","date_gmt":"2021-09-03T09:16:51","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=3475"},"modified":"2024-03-11T13:12:17","modified_gmt":"2024-03-11T12:12:17","slug":"reading-mp3-metadata-with-my-audio-tools-library","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/","title":{"rendered":"Reading MP3 Metadata with my Audio Tools Library"},"content":{"rendered":"<p>I have extended my <a href=\"\">arduino-audio-tools<\/a> project to provide access to <strong>MP3 Meta Data<\/strong>.<br \/>\n<a href=\"https:\/\/en.wikipedia.org\/wiki\/ID3\">ID3 is the metadata container<\/a> which is most often used in conjunction with the <strong>MP3<\/strong> audio file format. It allows information such as the title, artist, album, track number, and other information about the file to be stored in the file itself.<\/p>\n<p>Both versions of ID3 (<strong>ID3v1<\/strong> and <strong>ID3v2<\/strong>) are supported. I currently however only provide the information that is available in both which is:<\/p>\n<ul>\n<li>Artist<\/li>\n<li>Album<\/li>\n<li>Title<\/li>\n<li>Genre<\/li>\n<\/ul>\n<p>The <a href=\"https:\/\/pschatzmann.github.io\/arduino-audio-tools\/html\/classaudio__tools_1_1_meta_data_i_d3.html\">MetaDataID3<\/a> class is used as stream output destination and you register your callback method with <code>setCallback()<\/code>:<\/p>\n<pre><code>#include \"AudioTools.h\"\n#include \"sample-12s.h\"\n\n\n\nMemoryStream mp3(sample_12s_mp3, sample_12s_mp3_len);\nMetaDataOutput out;\nStreamCopy copier(out, mp3); \/\/ copy in to out\n\n\/\/ callback for meta data\nvoid printMetaData(MetaDataType type, const char* str, int len){\n  Serial.print(\"==&gt; \");\n  Serial.print(toStr(type));\n  Serial.print(\": \");\n  Serial.println(str);\n}\n\nvoid setup(){\n  Serial.begin(115200);\n  AudioLogger::instance().begin(Serial, AudioLogger::Info);  \n\n  mp3.begin();\n\n  out.setCallback(printMetaData);\n  out.begin();\n}\n\nvoid loop(){\n    copier.copy();\n}\n<\/code><\/pre>\n<p>The <a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/tree\/main\/examples\/examples-stream\/streams-memory_mp3-metadata\">complete example<\/a> is available on Github<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have extended my arduino-audio-tools project to provide access to MP3 Meta Data. ID3 is the metadata container which is most often used in conjunction with the MP3 audio file format. It allows information such as the title, artist, album, track number, and other information about the file to be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3488,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[20,22],"tags":[],"class_list":["post-3475","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-machine-sound"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Reading MP3 Metadata with my Audio Tools Library - Phil Schatzmann<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reading MP3 Metadata with my Audio Tools Library - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"I have extended my arduino-audio-tools project to provide access to MP3 Meta Data. ID3 is the metadata container which is most often used in conjunction with the MP3 audio file format. It allows information such as the title, artist, album, track number, and other information about the file to be [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-03T09:16:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-11T12:12:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/09\/metadata.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"299\" \/>\n\t<meta property=\"og:image:height\" content=\"168\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"pschatzmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pschatzmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"Reading MP3 Metadata with my Audio Tools Library\",\"datePublished\":\"2021-09-03T09:16:51+00:00\",\"dateModified\":\"2024-03-11T12:12:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/\"},\"wordCount\":115,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/metadata.jpeg\",\"articleSection\":[\"Arduino\",\"Machine Sound\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/\",\"name\":\"Reading MP3 Metadata with my Audio Tools Library - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/metadata.jpeg\",\"datePublished\":\"2021-09-03T09:16:51+00:00\",\"dateModified\":\"2024-03-11T12:12:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/metadata.jpeg\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/metadata.jpeg\",\"width\":299,\"height\":168},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2021\\\/09\\\/03\\\/reading-mp3-metadata-with-my-audio-tools-library\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reading MP3 Metadata with my Audio Tools Library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\",\"name\":\"Phil Schatzmann Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\",\"name\":\"pschatzmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"width\":305,\"height\":305,\"caption\":\"pschatzmann\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reading MP3 Metadata with my Audio Tools Library - Phil Schatzmann","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/","og_locale":"en_US","og_type":"article","og_title":"Reading MP3 Metadata with my Audio Tools Library - Phil Schatzmann","og_description":"I have extended my arduino-audio-tools project to provide access to MP3 Meta Data. ID3 is the metadata container which is most often used in conjunction with the MP3 audio file format. It allows information such as the title, artist, album, track number, and other information about the file to be [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/","og_site_name":"Phil Schatzmann","article_published_time":"2021-09-03T09:16:51+00:00","article_modified_time":"2024-03-11T12:12:17+00:00","og_image":[{"width":299,"height":168,"url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/09\/metadata.jpeg","type":"image\/jpeg"}],"author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"Reading MP3 Metadata with my Audio Tools Library","datePublished":"2021-09-03T09:16:51+00:00","dateModified":"2024-03-11T12:12:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/"},"wordCount":115,"commentCount":0,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/09\/metadata.jpeg","articleSection":["Arduino","Machine Sound"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/","url":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/","name":"Reading MP3 Metadata with my Audio Tools Library - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/#primaryimage"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/09\/metadata.jpeg","datePublished":"2021-09-03T09:16:51+00:00","dateModified":"2024-03-11T12:12:17+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/#primaryimage","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/09\/metadata.jpeg","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2021\/09\/metadata.jpeg","width":299,"height":168},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2021\/09\/03\/reading-mp3-metadata-with-my-audio-tools-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"Reading MP3 Metadata with my Audio Tools Library"}]},{"@type":"WebSite","@id":"https:\/\/www.pschatzmann.ch\/home\/#website","url":"https:\/\/www.pschatzmann.ch\/home\/","name":"Phil Schatzmann Consulting","description":"","publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pschatzmann.ch\/home\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1","name":"pschatzmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","width":305,"height":305,"caption":"pschatzmann"},"logo":{"@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png"}}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/3475","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/comments?post=3475"}],"version-history":[{"count":14,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/3475\/revisions"}],"predecessor-version":[{"id":6145,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/3475\/revisions\/6145"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media\/3488"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=3475"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=3475"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=3475"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}