ndac_todoroki

ndac_todoroki

ID3 tags are a mess :frowning_face:

ID3v1 tags and ID3v2 tags aren’t compatible with each other. ID3v2.1 and ID3v2.4 uses different data structures.

There are a way to read/write ID3v1 tags in pure Elixir/Erlang. You just read the header of the file, using Bitstring. But things were not easy for ID3v2 tags.
Previous projects exists like ID3v2, but it is still just for reading.
I needed a library to write tags, so I can batch download mp3 files using Flow and HTTPoison, and edit metadata.

I tried by forking the library above, but it seemed a lot of work. So instead, I used a Rust library which is named rust-id3.
Thank you Rustler!

https://github.com/ndac-todoroki/elixir-id3

Currently this library supports only the major ID3 frames, like titles, artists, and years. Frames which could contain multiple data such as comments or images are yet to be done. (I am learning Rust as I implement…)

Usage are simple; Reading ID3 tag will be like this.

iex> {:ok, tag} = ID3.get_tag("audio.mp3")
iex> tag
%ID3.Tag{
  album_artist: "Queen",
  artist: "Queen",
  date_recorded: ~N[1977-10-07 00:00:00],
  date_released: ~N[1981-11-02 00:00:00],
  disc: 1,
  duration: nil,
  genre: "Rock",
  title: "We Will Rock You",
  total_discs: 1,
  total_tracks: 17,
  track: 16,
  year: 1981
}

You can edit the Tag struct, and write it back via ID3.write_tag("audio.mp3", new_tag).

This is my first Elixir library (if this is :slight_smile:). Please feel free to tell me what should be done to be better!
I should be able to continue on this project after a month or so. Thanks!

Showing Posts 1 to 1

malodou1

malodou1

Hey thanks for the library, I just tried it but its not working.

I get this error during compilation.

thread 'main' panicked at 'Erlang version 2.16 not handled, please file a a bug report.',

— All posts loaded —

Where Next? Top

Trending in Announcing Top

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews