2021-04-02 20:50:28 -04:00
|
|
|
# Lofty
|
2021-04-23 09:27:16 -04:00
|
|
|
[](https://github.com/Serial-ATA/lofty-rs/actions/workflows/ci.yml)
|
2021-04-23 18:12:55 -04:00
|
|
|
[](https://crates.io/crates/lofty)
|
|
|
|
[](https://crates.io/crates/lofty)
|
2021-04-22 22:11:04 -04:00
|
|
|
[](https://docs.rs/lofty/)
|
2020-10-25 16:29:14 +00:00
|
|
|
|
2021-06-20 23:24:59 -04:00
|
|
|
Parse, convert, and write metadata to various audio formats.
|
2020-10-27 02:08:05 +00:00
|
|
|
|
2021-04-03 23:15:06 -04:00
|
|
|
## Supported Formats
|
2020-10-25 21:39:38 +00:00
|
|
|
|
2022-03-16 16:59:55 -04:00
|
|
|
| File Format | Metadata Format(s) |
|
|
|
|
|-------------|--------------------------------------|
|
|
|
|
| Ape | `APEv2`, `APEv1`, `ID3v2`\*, `ID3v1` |
|
|
|
|
| AIFF | `ID3v2`, `Text Chunks` |
|
|
|
|
| FLAC | `Vorbis Comments`, `ID3v2`\* |
|
|
|
|
| MP3 | `ID3v2`, `ID3v1`, `APEv2`, `APEv1` |
|
|
|
|
| MP4 | `iTunes-style ilst` |
|
|
|
|
| Opus | `Vorbis Comments` |
|
|
|
|
| Ogg Vorbis | `Vorbis Comments` |
|
|
|
|
| Speex | `Vorbis Comments` |
|
|
|
|
| WAV | `ID3v2`, `RIFF INFO` |
|
|
|
|
|
2022-03-18 14:53:25 -04:00
|
|
|
\* The tag will be **read only**, due to lack of official support
|
2020-10-25 21:39:38 +00:00
|
|
|
|
2021-12-20 09:44:38 -05:00
|
|
|
## Examples
|
2021-12-12 12:47:26 -05:00
|
|
|
|
2021-12-20 09:44:38 -05:00
|
|
|
* [Tag reader](examples/tag_reader.rs)
|
|
|
|
* [Tag stripper](examples/tag_stripper.rs)
|
2021-12-20 10:58:00 -05:00
|
|
|
* [Tag writer](examples/tag_writer.rs)
|
2021-12-12 12:47:26 -05:00
|
|
|
|
2021-12-20 09:44:38 -05:00
|
|
|
To try them out, run:
|
2021-12-12 12:47:26 -05:00
|
|
|
|
|
|
|
```bash
|
|
|
|
cargo run --example tag_reader /path/to/file
|
2021-12-20 09:44:38 -05:00
|
|
|
cargo run --example tag_stripper /path/to/file
|
2022-03-15 20:52:10 -04:00
|
|
|
cargo run --example tag_writer <options> /path/to/file
|
2021-12-12 12:47:26 -05:00
|
|
|
```
|
|
|
|
|
2021-04-03 23:15:06 -04:00
|
|
|
## Documentation
|
2021-04-21 14:48:45 -04:00
|
|
|
|
2021-04-03 23:15:06 -04:00
|
|
|
Available [here](https://docs.rs/lofty)
|
|
|
|
|
2021-04-03 23:11:35 -04:00
|
|
|
## License
|
|
|
|
|
|
|
|
Licensed under either of
|
|
|
|
|
|
|
|
* Apache License, Version 2.0
|
|
|
|
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
* MIT license
|
|
|
|
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
|
|
|
|
|
|
|
at your option.
|
|
|
|
|
|
|
|
## Contribution
|
2020-10-25 16:29:14 +00:00
|
|
|
|
2021-04-03 23:11:35 -04:00
|
|
|
Unless you explicitly state otherwise, any contribution intentionally submitted
|
|
|
|
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
|
|
|
|
dual licensed as above, without any additional terms or conditions.
|