Skip Menu |

This queue is for tickets about the MP3-Info CPAN distribution.

Report information
The Basics
Id: 2112
Status: open
Priority: 0/
Queue: MP3-Info

People
Owner: daniel [...] cpan.org
Requestors: cnandor [...] cpan.org
Cc: pastorofmuppets [...] users.sf.net
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Stream extraction and tag rendering
Cc: pastorofmuppets [...] users.sf.net
From Steve Sloan (pastorofmuppets at users.sf.net), moved to new RT system: In my current project, I want to read the ID3 tag from a file, store the info in a database, then strip-out the tag and store just the MPEG data in a file. To export a song from the database, I just spit-out the MPEG data and attach an ID3 tag (v1.1), rendered on-the-fly. These is difficult to implement without access to MP3::Info's internal data, so I propose adding two functions: (1) map_mp3data( $file, $function, $buffsize = 4096 ) This opens the file (or filehandle) passed and computes the start and end points of the MPEG stream (i.e. after the V2 tag and before the V1 tag). It then reads the data, $buffsize bytes at a time, and calls the function-reference $function, with the current buffer as $_. This would allow for easy processing of MPEG data (e.g. decoding/playing). (2) render_mp3tag( ... ) This function behaves the same as set_mp3tag(), except without the file argument, and instead of modifying the tag in the file, it renders the new tag (V1.1) and returns it in binary form. The grunt work for both of these functions is already present, only requiring some code rearrangement. E.g. set_mp3tag() would call render_mp3tag() to generate the tag, then write it to the file. remove_mp3tag() could call map_mp3data() in cases where a simple file truncate won't do (i.e. V2 tag present). I've attached my version of MP3::Info with these changes. They should probably be implemented a bit more cleanly, but in either case, I strongly urge you to add this functionality.

Message body is not shown because it is too large.

Is this still an issue with the latest MP3::Info release?
From: CNANDOR [...] cpan.org
On Wed Sep 06 19:56:13 2006, DANIEL wrote: Show quoted text
> Is this still an issue with the latest MP3::Info release?
I am no longer maintaining it, so not sure, but I would think so. I never saw this as a problem I cared much to solve in MP3::Info, though I don't know the new maintainer's opinion on it.