lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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()