Skip to content
Hirdaya Shrestha edited this page Sep 14, 2026 · 1 revision

Frequently asked questions about hAudiotagger.

General

What is hAudiotagger?

hAudiotagger is a Flutter plugin for reading, writing, and editing audio metadata. It's built on the lofty Rust library via flutter_rust_bridge.

What platforms are supported?

Android, iOS, Linux, macOS, Windows, and Web.

Is it free?

Yes. hAudiotagger is open-source under the MIT License.

How does it compare to other metadata libraries?

Feature hAudiotagger Other solutions
Platforms All 6 Usually 2-3
Web support Yes (WASM) Rarely
Write support Yes Varies
Extended metadata 60+ fields Limited
Chapters Yes Rarely
Parallel processing Yes (rayon) No

Installation

Do I need to install Rust?

No. Pre-built binaries are downloaded automatically for each platform.

Do I need to configure anything?

No configuration is needed for native platforms. For web, see Web Setup.

What Flutter version do I need?

Flutter 3.0.0+ with Dart SDK 3.6.0+.

Usage

When should I use readField vs read?

Use readField when you only need one field. It's faster because it doesn't load the entire metadata:

// Fast: only loads title
final title = await Haudiotagger.readField(path, TagField.title);

// Slower: loads everything
final tag = await Haudiotagger.read(path);

When should I use file path vs bytes API?

  • File path — Use on native platforms for best performance
  • Bytes — Use on web, or when you already have the file in memory

How do I update only one field?

Use update instead of write:

// This replaces ALL metadata
await Haudiotagger.write(path, Tag(title: 'New Title'));

// This only changes the title
await Haudiotagger.update(path, TagChanges(title: 'New Title'));

How do I batch process files?

Use batchWrite or batchUpdate:

// Write same tag to all files
await Haudiotagger.batchWrite(paths, tag);

// Apply same changes to all files
await Haudiotagger.batchUpdateChanges(paths, TagChanges(album: 'New Album'));

How do I preview changes before writing?

Use TagPipeline.preview:

final pipeline = TagPipeline()..trimWhitespace();
final result = await pipeline.preview(path);

print(result.changes); // See what would change

Formats

What formats are supported?

MP3, FLAC, MP4/M4A, Ogg Vorbis, Opus, AAC, WAV, AIFF, APE, and WavPack.

Can I write metadata to all formats?

Most formats support full read/write. Some formats have limitations:

Format Read Write
MP3 Yes Yes
FLAC Yes Yes
MP4/M4A Yes Yes
Ogg Vorbis Yes Yes
Opus Yes Yes
AAC Yes Yes
WAV Yes Yes
AIFF Yes Yes
APE Yes Yes
WavPack Yes Yes

Does it support ID3v2?

Yes. hAudiotagger supports both ID3v2.3 and ID3v2.4, with version detection and conversion.

Web

Why doesn't the file path API work on web?

Browsers cannot access arbitrary local files via file paths due to security sandboxing. Use the *FromBytes variants.

Why do I need cross-origin isolation?

WebAssembly shared memory requires cross-origin isolation. Without it, the WASM module fails to load.

See Web Setup for configuration instructions.

Is web slower than native?

Yes. Web runs single-threaded WASM without parallel processing. For large batch operations, use native platforms.

Performance

How fast is hAudiotagger?

On native platforms with 100 files:

  • Read: 1,282 files/second
  • Write: 197 files/second
  • Update: 197 files/second

See Performance for details.

How do I get the best performance?

  1. Use file path API on native
  2. Use batch operations for multiple files
  3. Use readField when you only need one value
  4. Avoid reading bytes when you have file paths

Does it support parallel processing?

Yes. On native platforms, batch operations use rayon for parallel processing. Web is single-threaded.

Error Handling

How do I handle errors?

All operations can throw HaudiotaggerError:

try {
  final tag = await Haudiotagger.read(path);
} on HaudiotaggerError catch (e) {
  print('Error: ${e.message}');
}

What errors can occur?

  • OpenFile — File not found or inaccessible
  • Read — Failed to parse metadata
  • Write — Failed to write metadata
  • UnsupportedFormat — File format not supported

What happens with corrupted files?

hAudiotagger returns null for unreadable files or throws HaudiotaggerError. It never panics.

Troubleshooting

"SharedArrayBuffer is not defined"

Cross-origin isolation is not enabled. See Web Setup.

WASM fails to load

Ensure you're using flutter build web and serving from a proper web server.

Tags not reading correctly

Some formats have limited support. Check the Supported Formats table.

Batch operations are slow

Use file path API instead of bytes API on native platforms.


Clone this wiki locally