Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

tone is a cross platform audio tagger and metadata editor to dump and modify metadata for a wide variety of formats, including mp3, m4b, flac and more. It has no dependencies and can be downloaded as single binary for Windows, macOS, Linux and other common platforms.

License

NotificationsYou must be signed in to change notification settings

sandreas/tone

Repository files navigation

tone is a cross-platform audio tagger and metadata editor to dump and modify metadata for a wide variety of formats, includingmp3,m4b,flac and more. It has no dependencies and can be downloaded as single binary for Windows, macOS, Linux and other common platforms.

The code is written in pureC# and utilizes the awesomeatldotnet library to provide full support for a wide variety of audio and metadata formats.

Features

The main purpose oftone is to tagm4b audio books for myself. It is planned as a successor to [m4b-tool].

  • dump metadata of audio files
    • different metadata formats (e.g.chptfmtnative,ffmetadata, etc.)
    • file information (bitrate, channels, duration, etc.)
    • support for filterablejson output (similar tojq)
    • extensive list of supported tags (default fields likealbum or *artist as well ascustom fields,covers,chapters, etc.)
  • tag audio files with different kinds of metadata
    • different file formats (e.g.mp3,m4b, andflac)
    • extensive list of supported tags (default fields likealbum or *artist as well ascustom fields,covers,chapters, etc.)
    • filename to tags via--path-pattern (see below)
    • custom javascript taggers via--script and--script-tagger-parameter

Support me via GitHub sponsors

If you are using any of my projects and find them helpful, please considerdonating to support me. I plan to use the money to support other open source projects or charitable purposes. Thank you!

sponsor me and donate

TL;DR

dump tags

# show helptone dump --help# show all tags for single file (input.mp3)tone dump input.mp3# show title and artiest tag recursively for all files in directory with extension m4b in FFMETADATA formattone dump audio-directory/ --include-extension m4b --format ffmetadata --include-property title --include-property artist# show album only via json format and JSONPath querytone dump"input.mp3" --format json --query"$.meta.album"# show audio stream information via JSONPath querytone dump"input.mp3" --format json --query"$.audio"

modify tags

IMPORTANT: Because metadata is modified in place without copying thefile, changes are only safe on local block storage (like your hard disk, sd card, etc.). Modifying files onremote storages (like network shares) may break your files. Please make sure you have a backup.

# show helptone tag --help# change title tagtone tag input.mp3 --meta-title"a title"# change a custom field, auto-import covers nearby and show debug info on error (--dry-run simulation)tone tag --debug --auto-import=covers --meta-additional-field"©st3=testing" input.m4b --dry-run# recursively set tags genre, artist, series, part and title by path pattern (--dry-run simulation)tone tag --auto-import=covers --auto-import=chapters --path-pattern="audiobooks/%g/%a/%s/%p - %n.m4b" --path-pattern="audiobooks/%g/%a/%z/%n.m4b" audiobooks/ --dry-run# write your own custom JavaScript tagger and call this function with parameters to modify metadata on your owntone tag"harry-potter-1.m4b" --taggers="musicbrainz" --script="musicbrainz.js" --script-tagger-parameter="e2310769-2e68-462f-b54f-25ac8e3f1a21"

Setup

tone is a terminal application and deployed as monolithic binary with no dependencies.This means, that downloading a single file from thereleases page.

Linux / macOS

# linux-armwget https://github.com/sandreas/tone/releases/download/v0.2.5/tone-0.2.5-linux-arm.tar.gz# linux-arm64wget https://github.com/sandreas/tone/releases/download/v0.2.5/tone-0.2.5-linux-arm64.tar.gz# linux-x64wget https://github.com/sandreas/tone/releases/download/v0.2.5/tone-0.2.5-linux-x64.tar.gz# macos (m1) - not working atm, see issue #6wget https://github.com/sandreas/tone/releases/download/v0.2.5/tone-0.2.5-osx-arm64.tar.gz# macos (intel)wget https://github.com/sandreas/tone/releases/download/v0.2.5/tone-0.2.5-osx-x64.tar.gz# untartar xzf tone-*.tar.gz# install to your $PATHsudo mv tone*/tone /usr/local/bin/# test if tone is usabletone --help

Windows

# download for windows (powershell)iwr -outf tone-0.2.5-win-x64.zip https://github.com/sandreas/tone/releases/download/v0.2.5/tone-0.2.5-win-x64.zip# extract toneExpand-Archive -LiteralPath tone-0.2.5-win-x64.zip -DestinationPath.# test if tone is usable.\tone --help# open directory in windows explorer to manually put tone in your %PATH%, e.g. C:\Windowsstart.

Docker

Sincetone is a monolith, it is probably not necessary to run it viadocker, but since it is convenient to have a possibility to copytone in your own image, I published an official variant on dockerhub. Since it is amultiarch image, you can use it onarm6,arm7,aarch64, andx64 images.

docker pull sandreas/tone:v0.2.5

Or to usetone in your customDockerfile:

# DockerfileFROM sandreas/tone:v0.2.5 as tone# ...COPY --from=tone /usr/local/bin/tone /usr/local/bin/

Reserved fields and supported formats

tone already supports some common input and output formats for metadata, as well as atone specific one (ToneJson). Moreovertone also uses somereserved metadata fields to overcome issues when storing specific information.

Reserved metadata fields

The namespace----:com.pilabor.tone as well as the following fields are reserved fortone inmp4 /m4a /m4b based file formats:

  • ----:com.pilabor.tone:AUDIBLE_ASIN: Since there is no official field for storing the audible ASIN,tone MAY use this custom field to store this piece information
  • ----:com.pilabor.tone:PART: Since the movement index is often used for a part of a series but only supports integers (e.g.1) it cannot store some series part names (e.g.2.1 or roman numbers likeIV)
    • tone supports--meta-part parameter being a fallback for storing non integer values while coincidentally storing--meta-movement only if it is an integer value
    • Therefore it is always recommended to use the--meta-part parameter instead of--meta-movement to set the part number of a series

ToneJson format

TheToneJson format is specific fortone, can contain all supported metadata (including binary images) and looks similar to this example...

Example

{"audio": {"bitrate":320,"format":"MPEG Audio (Layer III)","formatShort":"MPEG","sampleRate":44100.0,"duration":255920.0,"channels": {"count":2,"description":"Joint Stereo"    },"frames": {"offset":20749,"length":10236864    },"metaFormat": ["id3V24"    ]  },"meta": {"album":"Back in Black","albumArtist":"AC/DC","artist":"AC/DC","discNumber":1,"discTotal":1,"encodedBy":"LAME 3.99.5","genre":"Hard Rock","itunesCompilation":"no","publisher":"Atlantic","recordingDate":"1986-01-01T00:00:00","sortArtist":"AC/DC","title":"Back in Black","trackNumber":6,"trackTotal":10,"embeddedPictures": [      {"type":2,"code":3,"mimetype":"image/jpeg","data":"/9j/4AAQSkZJRgA...9k="      }    ],"additionalFields": {"grP1":"5","tmed":"CD","tlan":"eng","tipl":"arranger","tdor":"1980-07-25","script":"Latn","artist Credit":"AC/DC","albumartistsort":"AC/DC","catalognumber":"16018-2","album Artist Credit":"AC/DC","musicBrainz Album Type":"album","replaygaiN_ALBUM_GAIN":"-8.43 dB","replaygaiN_ALBUM_PEAK":"1.064363","replaygaiN_TRACK_GAIN":"-8.38 dB","replaygaiN_TRACK_PEAK":"1.051585","musicBrainz Album Status":"Official","musicBrainz Album Release Country":"DE","acoustid Id":"8b379144-9a9d-4fc1-897a-a7c0771f8ebb","musicBrainz Album Id":"fdabb997-b984-4097-bd3b-89fafd5e2e75","ufid":"http://musicbrainz.org\u0000ef71afb6-5e51-41df-999b-9e7c7306063a","musicBrainz Artist Id":"66c662b6-6e2f-4930-8610-912e24c63ed1","musicBrainz Album Artist Id":"66c662b6-6e2f-4930-8610-912e24c63ed1","musicBrainz Release Group Id":"d3bc1a64-7561-3787-b680-0003aa50f8f1","musicBrainz Release Track Id":"cf05ab29-27c7-47ed-9450-9f4de676cded","acoustid Fingerprint":"AQADtE...oIIYgRUChBhABIEeWAA0AQR4hSDg","iTunNORM":" 00001AE7 00001AE7 00004340 00004340 00000000 00000000 0000869A 0000869A 00000000 00000000"    }  },"file": {"size":10257613,"created":"2019-06-12T18:50:37.5527895+02:00","modified":"2019-06-12T18:50:37.5527895+02:00","accessed":"2023-02-14T09:21:29.2261032+01:00","path":"music/album/AC_DC/Back in Black","name":"06 - Back in Black.mp3"  }}

ChptFmtNative format (also CHPT_FMT_NATIVE)

TheChptFmtNative format was initially used inmp4v2, but never fully specified. However, there is a loosespec here.

Example

## artist: Cœur de pirate## album: Blonde#### total-duration: 00:38:37.034##00:00:00.000 Lève les voiles00:01:12.709 Adieu00:03:40.346 Danse et danse00:06:50.775 Golden Baby00:09:57.772 Ava00:13:14.657 Loin d'ici00:15:58.494 Les amours dévouées00:18:26.443 Place de la république00:22:37.664 Cap diamant00:25:20.925 Verseau00:29:14.722 Saint-Laurent00:32:29.519 La petite mort00:36:19.140 Hôtel amour

ffmetadata format

Theffmetadata format was designed forffmpeg, a versatile media encoder and it isspecified here.

Example

;FFMETADATA1title=Back in Blackartist=AC/DCtrack=6/10album=Back in Blackdisc=1/1date=1986genre=Hard RockTBPM=0compilation=0TMED=CDlanguage=engalbum_artist=AC/DCartist-sort=AC/DCpublisher=AtlanticTIPL=arrangerTDOR=1980-07-25encoded_by=LAME 3.99.5Script=LatnArtist Credit=AC/DCALBUMARTISTSORT=AC/DCCATALOGNUMBER=16018-2

Commands

The features oftone are divided by commands. You candump information ortag a file and so on. To do so, run

tone<command><parameters>

Example:

tone dump "my-audio-file.mp3"

global options

There are some global options, that can be used to change the behaviour of the file iterator. These options apply for all commands:

  • --order-by: Sort files by attribute (defaults topath, available options arepath,size,filename,extension,created,modified,accessed, combine via,, descending via!), examples:
    • --order-by="!created" - sort by create date descending
    • --order-by="extension,created" - sort by extension, then by created
    • --order-by="size,!extension,modified" - sort by size, then extension descending, then by modification date
  • --limit: Limit results
    • one value (e.g.--limit=10) - top10 results
    • two values with comma (e.g.--limit=10,20) - offset10 fetch20 results
  • --include-extensions: Filter for these extensions
  • --debug: Enable debug mode (for development or issue reporting)
  • --force: Try to force action (e.g. overwrite existing files, etc.)

dump - show audio metadata

Thedump command can be used to show metadata for a wide variety of audio files. You can either specify a single file or a directory,which will be traversed recursively. Several output--format options are supported. By default a terminal user interface library is used,but it is also possible to usejson orffmetadata.

Options reference

tone dump --help           USAGE:    tone dump [input] [OPTIONS]EXAMPLES:    tone dump --help    tone dump input.mp3    tone dump audio-directory/ --include-extension m4b --format ffmetadata --include-property title --include-property artistARGUMENTS:    [input]    Input files or foldersOPTIONS:    -h, --help                 Printshelp information        --debug                                               --force                                               --include-extension                                   --order-by                                            --limit                                               --include-property                                    --format                                              --query

tag - modify audio metadata

Thetag command can be used to modify audio metadata. Besides using predefined parameters like--meta-album it is also possible toadd or modify custom fields via--meta-additional-field, e.g.--meta-additional-field "©st3=testing" as well as pictures or chapters.

IMPORTANT:tone is meant to be used on local block storage and may cause unwanted side effects when trying to modify tags on network orother remote storage. Please ensure you have a backup or copy files locally to change metadata. See #52 for details.

The--taggers option

The--taggers option allows you to specify a custom set or a different order of internal taggers (NOT input formats), which are gonna be applied. In most caseschanging the order of thetaggers does not make a huge difference, but fully understanding this optionrequires a bit of technical knowledge. Let's go through a use case to see what you can do with it.

Note: Internal taggers are applied in a sane order by default and not meant for beginners. Most of the time you don't need to change the order and this usually is for very specific experts use cases. So if you don't fully understand this option, just leave it as is.

Use case: re-tagsorttitle /sortalbumThe following taggers are relevant for this use case:

  • remove - Removes metadata fields or sets it to an empty value
  • m4bfillup - Fills up missing or relevant special fields for audio books (e.g.sorttitle /sortalbum)
  • * - Represents all remaining taggers, that are not already provided by name

Usually, theremove tagger is applied at last. If you provide--meta-remove-property=sorttitle, this ensures an existing value will really beremoved after all taggers have been applied. Them4bfillup tagger will automatically generatesorttitle /sortalbum frommovementname,movement andtitle /album if AND ONLY IF the current value is empty.

So if you change themovementname (e.g.Harray Potter toHarry Potter because of a typo),sorttitle /sortalbum will not be updated,because these fields already have a value. If youremove thesorttitle /sortalbum, it will not be auto-updated but only removed,sinceremove is applied afterm4bfillup.

This can be solved by reordering the taggers:

  • First applyremove tagger to removesorttitle /sortalbum completely
  • Then applym4bfillup to rebuildsorttitle /sortalbum
tone tag harry-potter-1.m4b --taggers="remove,m4bfillup" --meta-movement-name="Harry Potter" --meta-remove-property="sortalbum" --meta-remove-property="sorttitle"

As you see, most of the time, you only care about one special tagger to be applied first or last. This is whytone has an option to add allremaining taggers to the list using a*:

tone tag harry-potter-1.m4b --taggers="remove,*" --meta-movement-name="Harry Potter" --meta-remove-property="sortalbum" --meta-remove-property="sorttitle"

The following taggers are available at the moment (names can be applied case-insensitive):

  • ToneJson - sets metadata values fromtone.json file
  • Metadata - sets metadata values from input parameters--meta-...
  • Id - sets metadata values from--id (e.g. for fetching from web sources via custom js taggers)
  • Cover - sets cover from cover files
  • PathPattern - sets metadata values from path pattern
  • Ffmetadata - sets metadata values fromffmetadata.txt file
  • ChptFmtNative - sets chapters fromchapters.txt file
  • Equate - equates 2 or more metadata fields from--meta-equate (see below)
  • M4BFillUp - auto fillalbum,title,iTunesMediaType from existing fields if possible
  • PrependMovementToDescription - prependsmovement to all description fields, if set
  • Remove - removes metadata values from input parameter--meta-remove-property and--meta-remove-additional-field
  • ScriptTagger - your personal custom JavaScript taggers (see below)

EquateThe equate tagger can be used to set a field by referencing another, e.g. when you would like to settheAlbumArtist equal to theArtist, you could use--meta-equate "artist,albumartiest".

The--meta-equate works like this:

  • Fields to equate are separated by,, at least 2 fields are required, but more are allowed
  • The first field contains the value, the latter fields will be overwritten by this value
  • The--meta-equate parameter can be used multiple times to equate multiple fields, e.g.--meta-equate=fieldA,fieldB --meta-equate=fieldC,fieldD,fieldE
  • The provided field names are treated case-insensitive, see reference below
Field reference``` Album AlbumArtist Artist Bpm ChaptersTableDescription Composer Comment Conductor Copyright Description DiscNumber DiscTotal EncodedBy EncoderSettings EncodingTool Genre Group ItunesCompilation ItunesMediaType ItunesPlayGap LongDescription Lyrics Part Movement MovementName Narrator OriginalAlbum OriginalArtist Popularity Publisher PublishingDate PurchaseDate RecordingDate SortTitle SortAlbum SortArtist SortAlbumArtist SortComposer Subtitle Title TrackNumber TrackTotal```

Options reference

tone tag --help                                                                                                                                                                     USAGE:    tone tag [input] [OPTIONS]EXAMPLES:    tone tag --help    tone tag input.mp3 --meta-title"a title"    tone tag --debug --auto-import=covers --meta-additional-field ©st3=testing input.m4b --dry-run    tone tag --auto-import=covers --auto-import=chapters --path-pattern="audiobooks/%g/%a/%s/%p - %n.m4b" --path-pattern="audiobooks/%g/%a/%z/%n.m4b" audiobooks/ --dry-run    tone tag input.mp3 --script musicbrainz.js --script-tagger-parameter e2310769-2e68-462f-b54f-25ac8e3f1a21ARGUMENTS:    [input]    Input files or foldersOPTIONS:    -h, --help                               Printshelp information        --debug                                                             --force                                                             --include-extension                                                 --order-by                                                          --limit                                                         -y, --assume-yes                                                        --dry-run                                                           --taggers                                                           --script                                                            --script-tagger-parameter                                           --prepend-movement-to-description                                   --meta-artist                                                       --meta-album                                                        --meta-album-artist                                                 --meta-bpm                                                          --meta-chapters-table-description                                   --meta-comment                                                      --meta-composer                                                     --meta-conductor                                                    --meta-copyright                                                    --meta-description                                                  --meta-disc-number                                                  --meta-disc-total                                                   --meta-encoded-by                                                   --meta-encoder-settings                                             --meta-encoding-tool                                                --meta-genre                                                        --meta-group                                                        --meta-itunes-compilation                                           --meta-itunes-media-type                                            --meta-itunes-play-gap                                              --meta-long-description                                             --meta-part                                                         --meta-movement                                                     --meta-movement-name                                                --meta-narrator                                                     --meta-original-album                                               --meta-original-artist                                              --meta-popularity                                                   --meta-publisher                                                    --meta-publishing-date                                              --meta-purchase-date                                                --meta-recording-date                                               --meta-sort-album                                                   --meta-sort-album-artist                                            --meta-sort-artist                                                  --meta-sort-composer                                                --meta-sort-title                                                   --meta-subtitle                                                     --meta-title                                                        --meta-track-number                                                 --meta-track-total                                                  --meta-additional-field                                             --auto-import                                                       --meta-chapters-file                                                --meta-cover-file                                                   --meta-tone-json-file                                           -p, --path-pattern                                                      --path-pattern-extension                                            --meta-equate                                                       --meta-remove-additional-field                                      --meta-remove-property

filename to tag via--path-pattern /-p

It is possible to use thetag subcommand with multiple--path-pattern arguments to read metadata from path names. Please note:

  • If multiple path patterns are present, the first matching one is preferred
  • Path patterns can be applied recursively for a whole directory tree as well as for single files
  • It is recommended use the--dry-run flag to see a diff before changing anything
    • there is anissue with flags like--dry-run, that they sometimes not work depending on the position - sometimes shifting them around helps
  • Path pattern matching is based ongrok.net, so all metadata properties could be read from a path name and there are a lot of things yet to be documented
    • For now it is recommended to use the short hands below

short hands

All short hands are configured to match non-slash (/) or part numbers ([0-9-.IVXLCDM]+).

  • %a -Artist
  • %A -SortArtist
  • %c -Comment
  • %C -Copyright
  • %d -Description
  • %D -LongDescription
  • %g -Genre
  • %m -Album
  • %M -SortAlbum
  • %n -Title
  • %N -SortTitle
  • %p -Part (only matching part numbers)
  • %s -MovementName
  • %t -AlbumArtist
  • %w -Composer
  • %y -ReleaseDate
  • %z -IgnoreDummy
  • %Z -IgnoreDummy (only matching part numbers)

Custom scripted taggers (experimental)

Withtone v0.0.4 it is possible to usescripted taggers. Long story short: You can now use JavaScriptto hook into the tagging mechanism and write your ownextensions fortone.

Note: script support is limited to a specific subset of JavaScript and does not support every feature that is supported in modern browsers. If you would like to know more, take a look atjint

create a javascript file

Lets say you would like to consume an external API to set some tags, in our example we usehttp://musicbrainz.org to tag the audiobookHarry Potter and the Philosopher�s Stone :

// musicbrainz.jsfunctionmusicbrainz(metadata,parameters){// e2310769-2e68-462f-b54f-25ac8e3f1a21varid=parameters.length>0 ?parameters[0] :null;if(id===null){console.log("Please provide a valid musicbrainz release id to use this tagger");return;}varurl="http://musicbrainz.org/ws/2/release/"+id+"?inc=recordings&fmt=json";console.log("fetching url:",url);// User-Agent header is required for musicbrainz to provide a responsevarjson=tone.Fetch(url,{headers:{'User-Agent':'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4'}});// you could also read a text file in the base path of the audio file// json = tone.ReadTextFile(metadata.BasePath + "/musicbrainz.json");varresult=JSON.parse(json);metadata.Title=result.title;console.log("new title:",result.title);if('barcode'inresult){metadata.AdditionalFields["ISBN"]=result.barcode;console.log("new barcode:",result.barcode);}}// register your function name as taggertone.RegisterTagger("musicbrainz");
run your tagger

Now you can use the--script parameter to load your customJavaScript and furthermorethe--script-tagger-parameter to provide theparameters array used in the tagger function.If you would like to prevent the defaulttone taggers to be applied, you can also limit thethem to your scripted one via--taggers=musicbrainz.

tone tag"harry-potter-1.m4b" --taggers="musicbrainz" --script="musicbrainz.js" --script-tagger-parameter="e2310769-2e68-462f-b54f-25ac8e3f1a21"
Tagger API

To get an overview of fields, that can be accessed or modified via themetadata object, you should take a look at theIMetadata interface. Not all of them are primitive types, but there are API at least some helper methods to overcome this problem (more are planned):

MethodDescriptionNotes
tone.RegisterTagger(string functionName):voidRegisters a custom tagger function withfunctionName-
tone.Fetch(string url [, object? options]):stringFetches remoteurl contents usingoptions inspired byoriginal fetch APIOnly a small subset of options is implemented (mainlymethod,body andheaders)
tone.Download(string url, string destinationPath [, object options]):boolDownloads a remote<url> to<destinationFile> usingoptions inspired byoriginal fetch APIReturnstrue on success,false on error
Directories will be created recursively
Files are not overwritten by default
tone.ReadTextFile(string path):stringReads a text file completely as string-
tone.WriteTextFile(string path, string content):voidWrites text to a file (create file if not exists, overwrite contents)-
tone.AppendTextFile(string path, string content):voidAppends text to a file (create file if not exists, append contents)-
tone.LimitByteLength(string message, int maxLength):stringLimites text to byte length (not char length)-
tone.CreateDateTime(string dateString):DateTimeCreates aDateTime value from stringe.g. formetadata.PublishingDate
tone.CreateTimeSpan(number milliseconds):TimeSpanCreates aTimeSpan value from stringe.g. formetadata.TotalDuration
tone.CreatePicture(string path):PictureInfoCreates aPictureInfo value from a path (refer toDownload)formetadata.EmbeddedPictures
tone.CreateChapter(string title, number startMs, number lengthMs [, PictureInfo picture, string subtitle, string uniqueID]):ChapterInfoCreates aChapterInfoformetadata.Chapters

Development

Setup environment

To buildtone, you need thedotnet SDK with at least version6.0. After this you check out the code via git and that's it.

# check dotnet version > 6.0dotnet --version# clone git repositorygit clone https://github.com/sandreas/tone.git# change into main solutioncd tone# restore nuget packagesdotnet restore# build solutiondotnet build

First test and using an IDE

Runtone without params to test your environment

# change to project tone/tonecd tone# run the projectdotnet run# output should be something like:# USAGE:#     tone [OPTIONS] <COMMAND># ...

If this works, you can now open thetone.sln file in the main directory with your favorite IDE (e.g. Visual Studio, JetBrains Rider or Visual Studio Code)

Publish a binary

You can now also publishtone as single binary. Before you build an executable binary, you have to choose a valid runtime identifier (RID)for the operating system and the architecture you would like to build for.Valid RID values are for example win-x64, linux-x64, osx-x64 and so on

Refer to the officialRID catalog and please ensure, your RID is supported by the accordingdotnet version (older versions may not support modern runtime ids)

The most common variants are probably these:

# windows (x64)dotnet publish tone/tone.csproj --runtime"win-x64" --framework net6.0 -c Release -p:PublishSingleFile=true --self-containedtrue -p:PublishReadyToRun=true -p:PublishTrimmed=true -o"dist/tone"# macOS (x64)dotnet publish tone/tone.csproj --runtime"osx-x64" --framework net6.0 -c Release -p:PublishSingleFile=true --self-containedtrue -p:PublishReadyToRun=true -p:PublishTrimmed=true -o"dist/tone"# macOS (arm64)dotnet publish tone/tone.csproj --runtime"osx-arm64" --framework net6.0 -c Release -p:PublishSingleFile=true --self-containedtrue -p:PublishReadyToRun=true -p:PublishTrimmed=true -o"dist/tone"# linux (x64)dotnet publish tone/tone.csproj --runtime"linux-x64" --framework net6.0 -c Release -p:PublishSingleFile=true --self-containedtrue -p:PublishReadyToRun=true -p:PublishTrimmed=true -o"dist/tone"

Submitting an issue

Found an issue? Here are some helpful commands to create sample audio files without copyright to reproduce the issue:

# create a 5 seconds silent sampleffmpeg -ar 48000 -ac 1 -f s16le -i /dev/zero -t 5 -y sample.wav# convert wav to m4b (mp3 would also work)ffmpeg -i sample.wav -f mp4 sample.m4b# download a sample coverwget -c https://picsum.photos/id/237/500/500 -O cover.jpg# embed the cover into the sampleffmpeg -i sample.m4b -i cover.jpg -map 0 -map 1 -c copy -disposition:v:1 attached_pic -f mp4 ready.m4b# run your tone command to reproduce the issuetone tag --meta-genre=Fantasy sample.m4b

known issues

The following issues are known, part of an external library and already reported:

  • --meta-* options cannot be set to empty values ([spectre.console 842])
    • workaround: use--meta-remove-property instead

About

tone is a cross platform audio tagger and metadata editor to dump and modify metadata for a wide variety of formats, including mp3, m4b, flac and more. It has no dependencies and can be downloaded as single binary for Windows, macOS, Linux and other common platforms.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages


[8]ページ先頭

©2009-2025 Movatter.jp