id3 icon indicating copy to clipboard operation
id3 copied to clipboard

Write support

Open benkaiser opened this issue 11 years ago • 8 comments

Thanks for the great project. Are there any plans for write support?

benkaiser avatar Jan 23 '14 11:01 benkaiser

Apologies for the late reply, I have been rather ill.

It would be possible to add write support but I personally will not have the time for quite a while yet. I can try look into it and at least plan it out but I can't promise anything on it being done, sorry about that.

43081j avatar Feb 02 '14 21:02 43081j

Okay fair enough.

Thanks for the response @43081j. I have created a repo for benchmarking id3 libs and your was one of the three I found that worked really well. I have written a blog post about the performance results in case you are interested.

If you do end up adding write support I will add it to my blog post.

benkaiser avatar Feb 03 '14 06:02 benkaiser

I would also be interested in write support. I could probably help implement it, with some guidance.

dkniffin avatar Aug 08 '14 01:08 dkniffin

@43081j I'd love to add write support. Would you mind updating this thread with a high-level overview of how you'd go about it?

transitive-bullshit avatar Dec 07 '14 09:12 transitive-bullshit

I'm sorry I haven't been involved in this repo for quite a long time, I haven't had the time for various reasons.

There's a few problems with the repo in addition to the need for write support, such as:

  • Make use of grunt or gulp for minification and concatenation
  • Tests are lacking (had some locally, no more though)

As for write support, you'd want to implement it as per the 2.3 spec most likely here: http://id3.org/d3v2.3.0

So off the top of my head:

  • Take some file as input (maybe a blob or something)
  • Create an ID3 header, where size is yet to be calculated
  • Iterate over each frame type to be added and append the correct headers/data to your ID3 tag (the spec above explains the structure of each frame type well)
  • Set the ID3 header's size value to the sum of the frames (excluding the header its self)
  • Write the complete ID3 tag to the start of the file you're altering

43081j avatar Dec 07 '14 20:12 43081j

@43081j thanks for the in-depth reply!

I've already added support for automated concatenation+tests in my fork. Gulp is a lil overkill for this type of thing whereas browserify is purrrfect. I'll be sending a PR for write support shortly.

transitive-bullshit avatar Dec 08 '14 00:12 transitive-bullshit

@oddityoverseer13 did you have a crack at implementing write support based on the info from @43081j ?

budda avatar Jul 18 '15 16:07 budda

I have not. I've been pretty busy since I asked about that, but I should be coming into some free time soon. I'll keep this in mind.

dkniffin avatar Jul 19 '15 11:07 dkniffin