Skip to content

Extracting metadata from audio resources #10151

@jsilland

Description

@jsilland

I would like to extend Hugo's resource handling to add first-class support for audio files (mp3 / aac / flac), including the ability to extract text metadata (artist / album / etc…) as well as cover art. Hugo currently special-cases image resources and provides APIs to operate on the content of an image and to extract EXIF data; I would like to add an equivalent resource type to similarly allow extracting metadata from audio files.

My primary use case is to embed audio content on my website without having to duplicate the files' existing metadata in the declaration of a page resource — this would greatly reduce the toil associated with publishing new audio content over time. I don't foresee a need to manipulate or access the audio content itself, just the metadata which is accessible as part of those file formats.

I am happy to put work into making this happen — I am comfortable writing Go and there are existing native libraries to perform the tag parsing, e.g. https://github.com/dhowden/tag. I have seen the recent addition to the contribution guide mentioning not wanting to accept patches for additional features; I'd be happy to trade one or few bugfixes in order to land this one. Either way, please let me know if this seems like a reasonable addition to Hugo, either now or in the future.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions