A friend handed me a 2 TB drive last spring: 312 WAV files from six years of field recording, names like ZOOM0007.WAV, plus a spreadsheet with dates and locations that had drifted out of sync with the files. She wanted to find “that rain on the tin roof in Oaxaca” without opening 300 files. I wanted to do it without touching the audio.
My approach was to keep the files byte-identical and put everything in a sidecar. First I generated a stable ID for each file from its content hash, so renames and moves wouldn’t break the mapping:
find . -name '*.WAV' -print0 | while IFS= read -r -d '' f; do
h=$(sha1sum "$f" | cut -c1-12)
printf '%s\t%s\n' "$h" "$f"
done > index.tsv
Then I built one JSON record per hash: date, recorder, location, a free-text description, and a few structured tags (weather:rain, surface:metal-roof, time:night). The spreadsheet became a CSV I joined on filename, with unmatched rows dumped to a separate file for manual review. For the actual tagging I used exiftool to write only into the sidecar, never the WAV:
exiftool -json -Description="$desc" -Keywords="$tags" \
-o "meta/$h.json" "$f"
A small Python script rebuilt a searchable index from those JSON files, and I could query by tag intersection rather than guess at filenames.
Why sidecars instead of embedding? WAV metadata support is inconsistent across editors, and I didn’t want a tool writing chunks into files she considered archival masters. The cost is a second thing to keep in sync: if she renames a file, the hash still points to the record, but if she re-exports or trims a file, the hash changes and the link breaks. I hit that myself with three files I’d normalized by mistake; they got new hashes and orphaned metadata. The fix was a reconciliation script, but it’s a manual step.
Where this falls apart: silent or near-duplicate recordings, where content hashing still works but the descriptions blur together. I also can’t search inside the audio, so “rain on tin roof” only works if someone wrote it down. And if she ever wants to hand the drive to someone else, the sidecar folder has to travel with it or the whole thing is opaque.
If you’ve tagged a personal archive like this, did you embed or keep sidecars, and what broke first when the library grew?


0 条评论
还没有评论,写下第一条。