Skip to content

Releases: benrr101/node-taglib-sharp

v6.0.1

13 Dec 04:34
Compare
Choose a tag to compare

This is a patch release that fixes an issue with ID3v2 tag reading.

Fixes

  • Improve handling of corrupt ID3v2 tags
    • As brought up by @stuartambient, entire MP3 files can load incorrectly if ID3v2 tags are corrupted (as often happens with ID3v2.4 tags generated by iTunes)
    • Improves error handling such that corrupt ID3v2 tags are read up until the corrupt frame.
      • Valid frames are still readable
      • MPEG header reading will begin at the end of the ID3v2 tag regardless of corruption status
      • ID3v2 tags can be rewritten successfully even if the tag is corrupted

Special Thanks

📦 NPM Link: https://www.npmjs.com/package/node-taglib-sharp/v/6.0.1

v6.0.0 MP3 VBR Header Improvements, Msc Bug Fixes

25 Nov 18:33
Compare
Choose a tag to compare

In what appears to be a disappointing trend, I'm once again super slow at releasing this new version.. But here it is, and I can say it's a big improvement. There are some technically breaking changes in this release, hence the major version bump. Let's go through changes:

New Features / Fixes

  • MP3 Audio Header Improvements
    • This code has basically been rewritten to rework how MPEG audio headers are read, especially fixing how VBR headers are treated.
    • Xing VBR headers now properly consider Info headers that indicate a a file is CBR
    • Xing VBR headers now read into the optional LAME header extension to get encoder delays to give even more accurate duration calculations
    • Calculation of duration and bitrate is now calculated with fallbacks such that we really will give it a best shot to calculate these values before giving up and returning 0.
    • Headers with reserved bitrates or sample rates are ignored
  • MPEG4 Fix - There was a bug when writing MPEG4 tags that often resulted in corruption of the tags. This has been fixed!
  • APE Tag Fixes
    • Integration test for APE file reading was fixed (test file was being duplicated and read as MP3, which was silently passing prior to fixing MP3 headers)
    • When reading attached pictures, more bytes than expected could be read if the picture was not the last item in the tag. This has been fixed.
  • Combined tag ReplayGain, IsCompilation behavior
    • Combined tags are designed to check all tags within for a value to return. Falsy values and "default" values would be skipped.
    • For ReplayGain, NaN is the default value. However, NaN cannot be checked for equality with ===, so it was being treated by CombinedTag as a "truey" value. This has been fixed, so numeric values are the only ones returned.
    • For IsCompilation, undefined was being used as the default value. This has been changed to be false.
    • In the next release, I will be exploring returning undefined for all unset tag values. This should make it clearer which tags are set and which are not set.
  • Updated dependencies that had vulnerabilities (really only affects dev)

Breaking Changes

  • MpegAudioHeader
    • xingHeader and vbriHeader properties are removed and replaced with a single vbrHeader property of type VbrHeader.
    • If no VBR header was found, VbrHeader will be undefined
  • VbrHeader abstract class added with concrete instances VbriHeader and XingHeader.
    • bitrate and duration properties were added and return a truthy value if the values can be calculated with the header (basically only applies to Xing headers in which total frames and total bytes is optional)
    • Unknown static instances have been removed. If a header doesn't exist, the vbrHeader property will be undefined

Special Thanks:

  • Special thanks for @ion-dev for fixing the big bug in MPEG4 tag writing! I'd still be looking into it if you hadn't fixed it

📦 NPM Link: https://www.npmjs.com/package/node-taglib-sharp/v/6.0.0

v5.2.3 Id3v2 GEOB Frame Fix

04 Dec 03:15
Compare
Choose a tag to compare

Fixes

  • This release exclusively fixes a bug in GEOB frame parsing where reading GEOB frames encoded with Latin1 would throw an argument out of range error.

Note: with this change, non-picture attachment frames will be visible in file.tag.pictures. This was the expected behavior all along, but may be an unexpected change. Filtering base on IPicture.pictureType can be used as a workaround

v5.2.2 ID3v2 Non-Standard Frame Identifier Hotfix

19 Nov 03:10
Compare
Choose a tag to compare

This release adds a fix for a bug that prevented ID3v2 frames with non-standard identifiers from being loaded. It also caused affected files to fail to load.

Fixes

  • Fix the above bug by treating non-standard frame identifiers as UnknownFrames

Special Thanks

v5.2.1 MPEG4 Support Readme Fix

29 Oct 19:36
Compare
Choose a tag to compare

Tiny fix in README. See feature changes in v5.2.0

v5.2.0 MPEG4 Support

29 Oct 05:00
Compare
Choose a tag to compare

At extremely long last, MPEG4 audio and video support has been added! A massive massive thank you to @digimezzo for contributing this feature!! (and massive shame on me for not releasing it sooner)

New Features/Fixes

  • MPEG4 support - Read/write support for M4A, M4B, M4V, M4P, and MP4 files (again big thanks to @digimezzo!)
  • Fixed static settings classes that were missed from the index (thanks to @stuartambient for reporting)
    • MpegAudioFileSettings (MPEG1/2)
    • MpegVideoFileSettings (MPEG1/2)
    • AviFileSettings (RIFF)
    • WaveFileSettings (RIFF)
  • Fixed APE MusicBrainz Release Artist ID backing field

Not Really Breaking Changes

  • Ogg page header absolute granular positions have been changed to simply be ByteVectors
    • Absolute granular positions are used to calculate duration for Ogg files
    • According to the Ogg docs, this value means something different to each codec, the only requirement is that it is monotonically increasing. As such, we can just read it as raw bytes and let the codec classes interpret the meaning of the value.
    • This eliminates issues with the number being too big or having special cased values (ie, -1)

v5.1.0 Matroska/WebM Read-Only Support

10 Mar 05:18
Compare
Choose a tag to compare

At long last, some semblance of support for Matroska/WebM files. Unfortunately, this is release took forever to develop and even then it's only read-only support. The primary reason for the delay is that the original .NET implementation was very difficult to comprehend and required a lot of rewriting. What's worse is that the Matroska tagging format is very open ended, but in such a way as to make it very complicated to derive a "unified" tagging interface. Please provide feedback if you find the unified tagging interface is not satisfactory.

New Features/Fixes

  • Matroska/WebM read-only support
    • If you try to write a mkv/webm file, it'll throw an error

Not Really Breaking Changes, But Stuff You Should Be Aware Of

  • Official builds are now done using Node 14.21.x. I still plan to target 12.16.1 as the minimum version.

v5.0.1 Ogg 0xFFFFFFFFFFFFFFFF Granule Support

10 Nov 03:13
Compare
Choose a tag to compare

New Features/Fixes

  • Fixing a bug where the special 0xFFFFFFFFFFFFFFF granule position on Ogg pages would throw exceptions. Thanks to @digimezzo for reporting this and testing the fix!

v5.0.0 Ogg Support (and other sundry items)

09 Jul 19:49
Compare
Choose a tag to compare

Ogg support had been sitting around ready to go for a while, might as well release it since matroska/webm support is going to be a while longer...

New Features/Fixes

  • Support for Ogg files (Vorbis, Theora, Opus)
  • Large rewrite of ByteVector class to reduce needless copying of bytes. ByteVectors are now copy-on-write and use node's buffer views to implement subarray processing without a copying the entire contents. This greatly improves performance!
    • fromBase64String and toBase64String have been added
    • see breaking changes notes below for stuff that's been broken

Breaking Changes

  • The interface for working with ByteVectors has changed significantly
    • fromByteVector has been removed, use toByteVector on an existing object to make the copy-on-write copy
    • ByteVector construction methods no longer take isReadOnly as an argument, instead use makeReadOnly() on the new object to make it read only.
    • fromString no longer has a default type, default behavior was to use StringType.UTF8
    • fromU* and toU* methods were renamed to be consistently named - eg, fromUShort is now fromUshort
    • lastUtf16Encoding property has moved into the Encoding class which now handles all encoding and decoding
    • Direct access to the backing Uint8Array via data has been removed. The alternative is to use toByteArray(). Try to avoid using this as much as you can since it has the potential to break copy-on-write. It only exists for the the handful of instances where it is more performant to directly use the buffer for IO operations.
    • get hashCode has been removed, call get checksum instead
    • get isView is added (mostly as a diagnostic/debugging tool) to indicate if the ByteVector is backed by a buffer view over another buffer or if it is backed by the buffer.
    • Check for read-only now happens after checking the arguments for their proper type
    • containsAt no longer accepts a patternOffset or a patternLength. If a subset of the pattern needs to be checked, use sub on the pattern. It's super cheap now!
    • find no longer takes an offset. If find needs to start at an offset in the ByteVector, use the shortcut offsetFind
    • insertByte, insertByteArray, and insertByteVector have all been removed. (it behaves the same as splice for JS arrays)
    • mid is renamed to subarray (to better match JS array method names)
    • removeAtIndex and removeRange have been removed, use splice instead (it behaves the same as splice for JS arrays)
    • resize no longer returns the object, it is a pure function.
    • rFind no longer accepts an offset, use rFind on the result of subarray if offset is needed
    • toFloat now handles ByteVectors of size <4 gracefully instead of throwing an error
    • toStrings no longer accepts an offset parameter, use subarray to get an offset ByteVector, then call toStrings
  • Lots of static readonly members have been renamed to SCREAMING_SNAKE_CASE. If you're using one and it shows up as not defined, try using the SCREAMING_SNAKE_CASE version. (eg, AacAudioHeader.unknown => AacAudioHeader.UNKNOWN)

v4.0.2 - AIFF Hotfix

09 Jul 17:39
Compare
Choose a tag to compare

This has been released officially on npm for months now, but somehow I forgot to write the github release

New Features/Fixes

  • Fix a bug in AIFF implementation that doesn't correctly update the file size when writing the tag (#49)

Breaking Changes

None