How to Extract Metadata from FLAC, WAV, and Lossless Audio Files
Lossless audio formats store metadata differently than MP3. FLAC uses Vorbis Comments, WAV relies on RIFF INFO chunks and optional BWF extensions, and formats like WavPack and Monkey's Audio use APE tags. This guide covers how each system works, how to extract metadata with command-line tools and programming libraries, and how to handle lossless audio metadata at scale.
How Lossless Audio Metadata Differs from MP3
Most audio metadata guides start and end with ID3 tags because MP3 dominates consumer audio. But if you work with lossless formats, ID3 is the wrong mental model. Each lossless codec developed its own metadata system, and the differences affect which tools you use, what fields are available, and how reliably tags survive format conversions.
FLAC stores tags as Vorbis Comments, a simple key-value system shared with Ogg Vorbis and Opus. Every field is a UTF-8 string with no fixed length limit, and you can define as many custom fields as you need. There is no predefined list of tag names, though a standard set (TITLE, ARTIST, ALBUM, TRACKNUMBER, DATE, GENRE) covers most use cases.
WAV files use RIFF INFO chunks, a metadata format that predates ID3. Each field is identified by a four-character code like INAM (title), IART (artist), or ICRD (creation date). The format dates back to 1991 and the original Microsoft/IBM RIFF specification. It works, but the field set is limited and encoding support varies between applications.
Broadcast WAV (BWF) extends the standard WAV container with a bext chunk designed for professional audio production. BWF metadata includes origination date, time reference (sample-accurate position on a timeline), a 256-character description field, and loudness measurements defined in EBU Tech 3285. Radio stations, post-production houses, and archival institutions rely on BWF metadata to track provenance and synchronize audio with video.
Monkey's Audio and WavPack use APE tags (specifically APEv2), which are structurally similar to Vorbis Comments. APE tags sit at the end of the file rather than the beginning, so retagging never triggers a full file rewrite. Each value can be flagged as text, binary, or an external reference.
Understanding which system your files use is the first step. The extraction tool and the command you run depend entirely on the container format.
Comparing Lossless Metadata Systems Side by Side
Here is a side-by-side comparison of the four metadata systems you will encounter when working with lossless audio.
Vorbis Comments (FLAC, Ogg Vorbis, Opus)
- Encoding: UTF-8, always
- Field names: Free-form key strings, no rigid standard
- Size limits: No per-field or total size restriction in the FLAC specification
- Custom fields: Unlimited, just add a new key
- Placement: Second metadata block in the FLAC stream (after StreamInfo)
- Embedded art: Stored in a separate PICTURE metadata block with type, MIME, dimensions, and binary data
RIFF INFO (WAV)
- Encoding: Varies by application (often ASCII or system codepage)
- Field names: Four-character chunk identifiers (INAM, IART, ICMT, ICRD)
- Size limits: Chunk-size dependent, practically limited to a few KB per field
- Custom fields: Limited to the defined four-character codes
- Placement: Inside a LIST chunk in the RIFF container
- Embedded art: Not natively supported
BWF bext Chunk (Broadcast WAV)
- Encoding: ASCII for most fields, with a CodingHistory free-text block
- Field names: Fixed structure defined by EBU Tech 3285
- Size limits: Description is 256 characters, OriginatorReference is 32 characters
- Custom fields: Not directly, though iXML chunks can extend BWF with arbitrary XML
- Placement: Dedicated bext chunk in the RIFF container, alongside standard WAV chunks
- Key fields: Originator, OriginationDate, OriginationTime, TimeReference (sample offset), LoudnessValue, LoudnessRange
APE Tags (WavPack, Monkey's Audio, OptimFROG)
- Encoding: UTF-8 for text values
- Field names: Free-form key strings, similar to Vorbis Comments
- Size limits: No formal per-field limit
- Custom fields: Unlimited
- Placement: End of file (retagging does not rewrite the audio data)
- Value types: Text, binary, or external reference (flagged per item)
The practical takeaway: FLAC and APE-tagged formats give you the most flexibility. WAV's RIFF INFO is functional but constrained. BWF adds professional production metadata that no other format matches.
Extracting FLAC Metadata with Command-Line Tools
FLAC ships with its own tagging utility, and general-purpose tools like ExifTool and MediaInfo also handle FLAC well. Start with whichever tool fits your existing workflow.
metaflac
metaflac is the official FLAC metadata editor from the Xiph.Org Foundation. It reads and writes Vorbis Comments, embedded pictures, and all other FLAC metadata blocks.
List every Vorbis Comment tag in a file:
metaflac --show-all-tags album.flac
This prints key=value pairs, one per line. To extract a single field:
metaflac --show-tag=ARTIST album.flac
Export all tags to a text file for backup or batch editing:
metaflac --export-tags-to=tags.txt album.flac
The exported file is plain text with one TAG=VALUE per line. You can edit it and reimport:
metaflac --import-tags-from=tags.txt album.flac
To see every metadata block (StreamInfo, Vorbis Comments, pictures, seek tables, padding), use the list command with a block type filter:
metaflac --list --block-type=VORBIS_COMMENT album.flac
Or list all blocks:
metaflac --list album.flac
metaflac also handles batch operations. Pass multiple filenames, or use shell globbing to process an entire directory:
metaflac --show-all-tags *.flac
ExifTool
ExifTool reads FLAC Vorbis Comments, StreamInfo (sample rate, bit depth, channels, duration), and embedded pictures. It also picks up any ID3 tags appended to FLAC files, which happens occasionally when tagging software uses the wrong format.
exiftool album.flac
This prints all readable metadata in a human-friendly format. To get specific fields:
exiftool -Artist -Album -SampleRate -BitsPerSample album.flac
For machine-readable output, use JSON:
exiftool -json album.flac
ExifTool is a good choice when you need a single tool that handles FLAC alongside images, video, and documents in the same pipeline.
MediaInfo
MediaInfo focuses on technical stream parameters. For a FLAC file, it reports codec, sample rate, bit depth, channels, duration, bitrate, and any embedded tags:
mediainfo album.flac
For structured output that feeds into scripts:
mediainfo --Output=JSON album.flac
MediaInfo is strongest when you need to verify encoding parameters (confirming a file is 24-bit/96kHz, for instance) alongside the descriptive tags.
Organize Your Audio Library in a Shared Workspace
Upload lossless audio files to Fast.io and search them with AI. Free 50 GB storage, no credit card required.
Extracting WAV and BWF Metadata
WAV metadata extraction is trickier than FLAC because the format supports multiple, sometimes overlapping, metadata chunks. A single WAV file can contain RIFF INFO tags, a BWF bext chunk, iXML data, and even an ID3 chunk.
ExifTool for WAV
ExifTool reads all standard WAV metadata sources:
exiftool recording.wav
For a BWF file, you will see fields like Description, Originator, OriginationDate, OriginationTime, TimeReference, and CodingHistory pulled from the bext chunk. Standard RIFF INFO fields (Title, Artist, Comment, DateCreated) appear alongside them.
To extract only the BWF-specific fields:
exiftool -Description -Originator -OriginationDate -TimeReference recording.wav
MediaInfo for WAV
MediaInfo extracts both technical parameters and embedded metadata from WAV files. It handles BWF bext data well:
mediainfo --Full recording.wav
The --Full flag shows every detected field, including BWF origination details and RIFF INFO tags that shorter output modes skip.
BWF MetaEdit
For dedicated BWF work, the Library of Congress distributes BWF MetaEdit, a free tool designed specifically for reading and writing Broadcast WAV metadata. It supports the bext chunk, INFO chunk, and the XMP chunk. BWF MetaEdit is widely used in archival and broadcast workflows where BWF compliance matters.
bwfmetaedit --out-tech recording.wav
This outputs a technical summary. BWF MetaEdit also provides a GUI for editing bext fields and can enforce EBU Tech 3285 conformance rules.
Handling iXML in Production WAV Files
Field recorders from manufacturers like Sound Devices, Zoom, and Lectrosonics embed iXML metadata in WAV files. iXML is an XML chunk that stores scene names, take numbers, track names, microphone positions, and timecode. ExifTool can read iXML data:
exiftool -XMP:all -XML:all recording.wav
If your files come from professional production environments, checking for iXML alongside RIFF INFO and bext gives you the complete metadata picture.
Programmatic Extraction with Python and Node.js
When you need to extract metadata from hundreds or thousands of lossless audio files, scripting is the practical approach. Both Python and Node.js have mature libraries that handle FLAC, WAV, and other lossless formats.
Python with mutagen
mutagen is the standard
Python library for reading and writing audio metadata. It supports FLAC Vorbis Comments, WAV RIFF INFO, APE tags, and ID3. Install it with pip:
pip install mutagen
Read FLAC tags:
from mutagen.flac import FLAC
audio = FLAC("album.flac")
print(audio.tags) # All Vorbis Comments
print(audio["ARTIST"]) # Specific field
print(audio.info.sample_rate) # 44100, 96000, etc.
print(audio.info.bits_per_sample) # 16, 24, etc.
Read WAV metadata:
from mutagen.wave import WAVE
audio = WAVE("recording.wav")
if audio.tags:
print(audio.tags)
print(audio.info.sample_rate)
print(audio.info.channels)
mutagen normalizes tag access across formats, so switching between FLAC and WAV requires changing the import and constructor but not the field-reading logic.
For batch processing, loop over files and collect results into a structured format:
import json
from pathlib import Path
from mutagen.flac import FLAC
results = []
for flac_file in Path("./music").glob("**/*.flac"):
audio = FLAC(str(flac_file))
results.append({
"file": str(flac_file),
"artist": audio.get("ARTIST", ["Unknown"])[0],
"album": audio.get("ALBUM", ["Unknown"])[0],
"title": audio.get("TITLE", ["Unknown"])[0],
"sample_rate": audio.info.sample_rate,
"bits_per_sample": audio.info.bits_per_sample,
})
with open("catalog.json", "w") as f:
json.dump(results, f, indent=2)
Node.js with music-metadata
The music-metadata package parses tags from over 30 audio formats, including FLAC, WAV, AIFF, APE, and WavPack. It normalizes tags from Vorbis Comments, RIFF INFO, ID3, and APE into a unified common object.
npm install music-metadata
Read FLAC metadata:
import { parseFile } from 'music-metadata';
const metadata = await parseFile('./album.flac');
console.log(metadata.common.artist);
console.log(metadata.common.album);
console.log(metadata.format.sampleRate);
console.log(metadata.format.bitsPerSample);
The common object normalizes tag names across formats. The native object gives you raw tags in their original format (Vorbis Comments for FLAC, RIFF INFO for WAV), which is useful when you need fields that do not map to the common schema.
For streaming extraction from large files without loading them into memory:
import { parseStream } from 'music-metadata';
import { createReadStream } from 'node:fs';
const stream = createReadStream('./large-recording.wav');
const metadata = await parseStream(stream);
Both libraries handle the format detection and chunk parsing internally. You point them at a file, and they return structured metadata regardless of whether the source uses Vorbis Comments, RIFF INFO, or APE tags.
Managing Extracted Audio Metadata at Scale
Extracting tags from a handful of files is straightforward. The challenge grows when you are managing thousands of lossless audio files across a team, whether that is a music catalog, a podcast archive, a broadcast library, or production recordings from field sessions.
Local tools like metaflac and ExifTool work well for individual machines. But when multiple people need to search, filter, and act on audio metadata, the extracted data needs to live somewhere accessible.
One approach is exporting metadata to a spreadsheet or database. The Python and Node.js scripts above can dump structured JSON or CSV that feeds into whatever system your team uses. This works, but it creates a separate data layer that drifts out of sync as files are added, renamed, or retagged.
Cloud workspace platforms offer another path. Fast.io's Metadata Views let you describe the fields you want extracted in plain language, and AI populates a sortable, filterable grid. While Metadata Views are built for documents, images, and business files rather than raw audio codec tags, they work well for the surrounding assets in audio production workflows: track sheets, session notes, licensing agreements, and delivery manifests. You can search and organize these files alongside your audio without building a custom pipeline.
For the audio files themselves, uploading lossless files to a shared workspace with Intelligence Mode enabled means the files are indexed and searchable by content. Team members and AI agents can query the workspace through the Fast.io MCP server or the web interface, asking questions like "which recordings from the March session are 96kHz" and getting answers grounded in the actual files.
The combination matters: local tools extract codec-level metadata that only dedicated parsers can read, while cloud workspaces handle the organizational layer of finding, sharing, and acting on those files across a team.
Frequently Asked Questions
How do I view metadata in a FLAC file?
Use metaflac --show-all-tags file.flac to print every Vorbis Comment tag. For a broader view that includes StreamInfo (sample rate, bit depth, channels) and embedded pictures, use exiftool file.flac or mediainfo file.flac. All three tools are free and run on Windows, macOS, and Linux.
What metadata format does WAV use?
Standard WAV files store metadata in RIFF INFO chunks using four-character field codes like INAM (title) and IART (artist). Broadcast WAV (BWF) files add a bext chunk with production metadata including originator, origination date, time reference, and loudness values. Some WAV files also contain iXML chunks with scene and take data from field recorders, or ID3 tags added by certain tagging applications.
How do I edit FLAC Vorbis Comments?
With metaflac: use --set-tag=FIELD=VALUE to add or update a single tag, --remove-tag=FIELD to delete one, or --import-tags-from=file.txt to replace all tags from a text file. Desktop editors like Mp3tag and Kid3 provide a GUI for editing Vorbis Comments across batches of files. In Python, the mutagen library lets you read and write FLAC tags programmatically.
Can I extract BWF metadata from WAV files?
Yes. ExifTool reads bext chunk fields (Description, Originator, OriginationDate, TimeReference, CodingHistory) directly. MediaInfo with the --Full flag also displays BWF data. For dedicated BWF work, BWF MetaEdit from the Library of Congress reads, writes, and validates Broadcast WAV metadata against EBU Tech 3285.
What is the difference between Vorbis Comments and APE tags?
Both are key-value metadata systems with UTF-8 encoding and no fixed field list. The main difference is placement: Vorbis Comments sit near the beginning of the file (second metadata block in FLAC), while APE tags are stored at the end. This means retagging an APE-tagged file never requires rewriting the audio data. Vorbis Comments are used by FLAC, Ogg Vorbis, and Opus. APE tags are used by Monkey's Audio, WavPack, OptimFROG, and TAK.
Do lossless audio files support embedded album art?
FLAC supports embedded images through a dedicated PICTURE metadata block that stores the image type, MIME type, dimensions, color depth, and binary data. ExifTool recognizes 21 picture type categories for FLAC art. WAV does not natively support embedded images in RIFF INFO, though some applications add art via ID3 chunks. APE tags can store binary data including images, flagged with a binary type marker.
Related Resources
Organize Your Audio Library in a Shared Workspace
Upload lossless audio files to Fast.io and search them with AI. Free 50 GB storage, no credit card required.