jsmediatags
jsmediatags copied to clipboard
Support for writing tags?
Have you thought about adding support for writing tags? Right now I'm using the mutagen tool for doing this but that won't work in the browser. I understand that this would be a pretty complicated change, but I thought I'd ask anyway.
Yes, I'm planning to do it actually. The original structure was designed with this in mind. If you check the unit tests you can see that I already have a way to create the ID3 and ID4 structure in memory.
@emschwartz However, I was just planning to add write support on Node. How would you write it in the browser?
@emschwartz For writing ID3 tag in browsers you can use https://github.com/egoroof/browser-id3-writer which I successfully use in chromium extension for a long time.
@aadsm If you can write to a Buffer or File the user of the library can figure out how to download or save it.
@egoroof Thanks for pointing that out. I'll see if that fits what I need it to do. From a quick glance it seems like the annoyance of using two libraries for reading and writing would be making sure that both support all the ID3 tag types and have a somewhat similar API. My use case is that I need to add a single tag to a file that already has metadata attached and I want to leave the other metadata untouched (browser-id3-writer says it overwrites existing tags). So, using these two libraries together would right now mean (first adding some more tag types to broser-id3-writer -- I'm using the WPAY one, which isn't supported) reading the tags with jsmediatags, translating the formats, and then writing with browser-id3-writer. At the moment I'm calling out to an external command line tool for writing tags (which also parses them so it's possible to add one without replacing the others).
It would be great if we have tag write also in this library, People are now started trying cordova to develop mobile Apps and if somebody wanna try develop cordova Music Player, then this library will help a lot.
@aadsm Is it even possible to append atoms into a mp4 file?
@SmartCodingGuy it is, I don't see why it shouldn't at least. The mp4 file is really just a linked list of data so it should be possible to just add a new element to the list.