-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get Metadata from MP3 or WAV files #149
Comments
With dr_wav, you can use Line 407 in fc559fe
For dr_mp3 there is no API for extracting metadata, unfortunately. |
Thank you for the reply :) I'll to tinker with the Thanks again in advance, |
Allright, so I've made some progress. I am now able to get the chunk content in a buffer, but I have to do some manual parsing to extract what I need. Is there a reference document or something I can use to build this correctly? I'm currently reading chunks on 4KB per callback, not sure if it's the best way. Thank you in advance for any help, is really appreciated! //EDIT: Found something http://www.robotplanet.dk/audio/wav_meta_data/ |
Yes, manual passing will be required. Reading in 4KB chunks shouldn't be necessary unless you have some unusual performance requirements. Need to be careful not to read beyond the chunk, the size of which can be extracted from the chunk header passed into the This is another reference I've used in the past: https://sites.google.com/site/musicgapi/technical-documents/wav-file-format For MP3, dr_mp3 actually wraps around minimp3. It would require some manual processing outside of minimp3 to handle the various ID3 tags. The author of minimp3 is maintaining a sort of extended high level version of it called minimp3_ex which detects these tags, but I'm not sure if they're reported back to the application for handling. From what I saw it's just for skipping over them elegantly. I may add support for it at some point, but I not right now. |
Indeed I figured this out this afternoon but I forgot to actually mention it here, but still thanks for the heads up. I also figured out the way to parse chunks so I'll add my implementation now, should be easy to detect all tags :)
Thanks, again for the heads up!
Indeed I notice that most of the code is literally skipping tags and there's no point in the lib actually passing them. Too bad :( Not urgent though. At the moment I'm happy I am able to get them from FLAC, WAV and Ogg files ( using another library ). MP3 can wait and they're not really urgent :) Still thanks, feel free to ping me on this issue ASAP you get something implemented. Cheers! |
Personally, I think it would be interesting to have the possibility to retrieve the ID3 chunk of data from the MP3 file, to allow processing it on user side. Just for reference, here some ID3 tag info: https://en.wikipedia.org/wiki/ID3 EDIT: Investigated a bit about ID3v2.3 (it seems the standard tag) and it's not trivial to process all the possible contained data, ID3v1 placed at the end of the file is way simpler. In any case, it would be nice to get the chunk... |
Hi,
I've been tinkering with your libraries, and so far I was able to get the metadata ( Vorbis comments ) out of FLAC files using the
onMeta
callbacks pared withdrflac_init_vorbis_comment_iterator/drflac_next_vorbis_comment
functions.I was looking for something similar on the
dr_mp3.h
anddr_wav.h
decode libraries, but I was not able to find a pattern nor anything that goes near to the terms "tag", "comment" or "metadata".Would you be able to let me know if the libraries to support at all this functionality?
Thank you in advance,
Julian
The text was updated successfully, but these errors were encountered: