From 71b33c991976a007380bccb20046c4a40dce280c Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Thu, 4 Jun 2026 16:17:17 -0400 Subject: [PATCH 1/2] Add flac extension and AudioBitDepth to common media definitions These are generic media properties usable by any modality that stores audio, so define them alongside the other common media file definitions: - flac (.flac) lossless audio extension - AudioBitDepth metadata, added as an optional field of MediaAudioProperties Moved here from the BEP047 behavioral PR per review discussion. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/schema/objects/extensions.yaml | 5 +++++ src/schema/objects/metadata.yaml | 9 +++++++++ src/schema/rules/sidecars/media.yaml | 1 + 3 files changed, 15 insertions(+) diff --git a/src/schema/objects/extensions.yaml b/src/schema/objects/extensions.yaml index 26ce7a6eb0..7690412c3d 100644 --- a/src/schema/objects/extensions.yaml +++ b/src/schema/objects/extensions.yaml @@ -126,6 +126,11 @@ fif: display_name: Functional Imaging File Format description: | An MEG file format used by Neuromag, Elekta, and MEGIN. +flac: + value: .flac + display_name: Free Lossless Audio Codec + description: | + A [FLAC](https://en.wikipedia.org/wiki/FLAC) lossless audio file. jpg: value: .jpg display_name: Joint Photographic Experts Group Format diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index 0122e0d2a0..f7af1cbb9b 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -237,6 +237,15 @@ AttenuationCorrectionMethodReference: description: | Reference paper for the attenuation correction method used. type: string +AudioBitDepth: + name: AudioBitDepth + display_name: Audio Bit Depth + description: | + Number of bits per sample in the audio stream + (for example, `16`, `24`, or `32`). + Typically reported for uncompressed or losslessly compressed audio. + type: integer + minimum: 1 AudioChannelCount: name: AudioChannelCount display_name: Audio Channel Count diff --git a/src/schema/rules/sidecars/media.yaml b/src/schema/rules/sidecars/media.yaml index 9e5dc25ed4..cf745dac45 100644 --- a/src/schema/rules/sidecars/media.yaml +++ b/src/schema/rules/sidecars/media.yaml @@ -16,6 +16,7 @@ MediaAudioProperties: AudioCodec: recommended AudioSampleRate: recommended AudioChannelCount: recommended + AudioBitDepth: optional AudioCodecRFC6381: optional MediaImageProperties: From 1330ad996622f9990a6415d4c02aeecd9e024dc6 Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Thu, 4 Jun 2026 16:25:28 -0400 Subject: [PATCH 2/2] List flac in the media-files appendix audio formats table --- src/appendices/media-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appendices/media-files.md b/src/appendices/media-files.md index 62759f3dfb..8dd47fc364 100644 --- a/src/appendices/media-files.md +++ b/src/appendices/media-files.md @@ -33,7 +33,7 @@ suffix with appropriate migration tooling ### Audio formats -{{ MACROS___make_extension_table(["wav", "mp3", "aac", "ogg"]) }} +{{ MACROS___make_extension_table(["wav", "flac", "mp3", "aac", "ogg"]) }} ### Video container formats