1.0.11 • Published 1 month ago

write-aac-metadata v1.0.11

Weekly downloads
4
License
ISC
Repository
github
Last release
1 month ago

Write AAC Metadata

NodeJS module that will allow you to write aac (m4a, m4b) metadata using ffmpeg

Installation

npm install write-aac-metadata --save
yarn add write-aac-metadata

Usage

import metadataWriter from "write-aac-metadata"

const writeMetadata = async () => {
   await metadataWriter("someFile.m4a", {title: "Some Title", description: "Description"}, "someFile-copy.m4a")
}

writeMetadata()

If you want to modify a file in place don't pass anything to the 3rd parameter. Ffmpeg doesn't allow this directly so to simulate it a new file is created with the input file's name and a guid on the end. After the metadata has been added and the new file is finished the original file is deleted and the new file is renamed to be the same name as the original file. This package also copies the creation date of the original file to the new file

Metadata

Set whatever metadata you want updated. Any fields that are left as undefined will not be changed and the current value of the metadata will be copied to the output file

{
   title?: string,
   artist?: string,
   albumArtist?: string,
   album?: string,
   grouping?: string,
   composer?: string,
   year?: number,
   trackNumber?: number,
   comment?: string,
   genre?: string,
   copyright?: string,
   description?: string,
   synopsis?: string,
   /**
    * The path for the cover photo that should be added to the file, don't set this field if you want to keep the existing art
    */
   coverPicturePath?: string,
}

Options

These are the options you can pass as the 4th parameter

{
   /**
    * Write debugging output to the console?
    * @default false
    */
   debug?: boolean,
   /**
    * If stdio should be piped to the current console, useful for figuring out issues with ffmpeg
    * @default false
    */
   pipeStdio?: boolean,
}
1.0.9

1 month ago

1.0.11

1 month ago

1.0.10

1 month ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

2 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago