0

First of all, I'd better say that I'm a beginner in programming. Taglib-sharp seems too slow for getting metadata of an mp3 especially when it is used for a lot of mp3 files and also it takes a lot of memory and surprisingly it doesn't make it free after allocating. For commonly used metadata (tags) such as artist, album, year, etc I made a simple class to extract tags but my problem is for the "album cover". I do have not enough knowledge to understand and write the correct code to achieve it because it seems I have to work with hex and binary codes to distinguish the frame-blocks and determine the length of each section.

Is there anyone here who can help me to do it? Thanks in advance

Hamed
  • 1
  • 1
  • 1
    *Is there anyone here who can help me to do it?* not in the way I suspect you'll be looking for. We do that kind of help like "try it yourself, and when the code dies in a heap and you can't figure out why, come post it up toegether with good test data, a detailed look at what is happening and what you're expecting to happen. Most importantly, we don't really write much code at all in this entire interaction; our role is more like that of a university supervisor - to understand and advise, but not do – Caius Jard Dec 06 '21 at 19:02
  • I obviously do not expect anyone to provide me the solution, at least guys here can provide relevant links and exact key words about the answer, such as pdf , article , forum or link for: "how to read data from a hex file" , "what is the structure of an audio file" , "how to speed up the function of taglibsharp" ... & etc – Hamed Dec 07 '21 at 06:36
  • 1
    Alas that is also something we do not do; one of the close reasons for a question is "Seeking recommendations for books, tools, software libraries, and more This question is likely to lead to opinion-based answers.". You have mentioned a number of concerns there, pick one of them and ask a question about it. The "taglibsharp is slow" one is probably a reasonable one; post the code you have written that uses it and give timings for the lines that you deem to be slow, ask if there is anything that can be done. Either you're using it incorrectly or you're just not appreciating that writing a.. – Caius Jard Dec 07 '21 at 07:03
  • 1
    ..massive tag (id3v2 tags can be larger than the mp3) to the start of a file involves rewriting the entire file, which can be a slow operation indeed. The fastest way to do it if you have a mechanical hard disk is to buffer the entire file into memory and then write it all out again to reduce thrashing. If you're writing over a slow network, forget it; create a tagging service that runs on the machine where the files are – Caius Jard Dec 07 '21 at 07:06
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Dec 12 '21 at 09:50

0 Answers0