[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Reading and writing mp3 metadata
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 30 Apr 2013 13:01:13 -0300
> You may want to look to
> https://github.com/daurnimator/lamt/blob/master/id3v1.lua#L53 for
> inspiration.
My code was indeed too complicated. Try this
f = io.open("foo.mp3","rb")
f:seek("end",-128)
t = {}
t.signature = f:read(3)
t.title = f:read(30)
t.artist = f:read(30)
t.album = f:read(30)
t.year = f:read(4)
t.comment = f:read(30)
t.genre = f:read(1)
f:close()