jsmediatags icon indicating copy to clipboard operation
jsmediatags copied to clipboard

Support for writing tags?

Open emschwartz opened this issue 9 years ago • 7 comments

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.

emschwartz avatar May 02 '16 21:05 emschwartz

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.

aadsm avatar May 03 '16 16:05 aadsm

@emschwartz However, I was just planning to add write support on Node. How would you write it in the browser?

aadsm avatar May 07 '16 13:05 aadsm

@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.

egoroof avatar May 08 '16 05:05 egoroof

@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).

emschwartz avatar May 09 '16 20:05 emschwartz

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.

devshafeeque avatar Jun 20 '16 06:06 devshafeeque

@aadsm Is it even possible to append atoms into a mp4 file?

dunstorm avatar Jan 13 '19 09:01 dunstorm

@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.

aadsm avatar Jan 13 '19 22:01 aadsm