ruuda / hound

A wav encoding and decoding library in Rust
https://codeberg.org/ruuda/hound
Apache License 2.0
482 stars 63 forks source link

Support for writing textual metadata #38

Open xd009642 opened 4 years ago

xd009642 commented 4 years ago

Add support for textual metadata in the INFO chunk i.e. description, artist-name, title etc. This would be of a lot of use to me in a project I'm doing. I could potentially also do a PR for this at some point if it's desired :+1:

ruuda commented 4 years ago

This should be possible. Do you know of a program that runs on Linux that can actually read those, to test compatibility?

xd009642 commented 4 years ago

ffprobe can read it, it's in the metadata section. Example output:

Input #0, wav, from 'file_example_WAV_1MG.wav':
  Metadata:
    title           : Impact Moderato
    album           : YouTube Audio Library
    artist          : Kevin MacLeod
    genre           : Cinematic
  Duration: 00:00:33.53, bitrate: 256 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, 2 channels, s16, 256 kb/s

Edit: also used this sample wav file to check https://file-examples.com/wp-content/uploads/2017/11/file_example_WAV_1MG.wav