Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

pudge
  (email not shown publicly)
http://pudge.net/
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Monday April 28, 2003
04:43 PM

Images in MP3s

[ #11894 ]

iTunes 4 can store album cover art in the MP3 tag.

perl -MMP3::Info -e '
$file = shift;
$x = get_mp3tag($file, 2, 2);
($i = $x->{PIC}) =~ s/^(....).//;
($e = $1) =~ s/\W//g;
$file =~ s/\.mp3/.$e/;
open $f, ">", $file;
print $f $i;
' song.mp3

This can extract it!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Not normalized (Score:3, Insightful)

    by jdavidb (1361) on 2003.04.29 9:12 (#19565) Homepage Journal

    Maybe I've been working with databases too much, but doesn't it seem a little redundant to put the album cover art in each file?

    Still cool, though!

    --
    J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
    • Well, you buy individual songs from their service, and very well might stream/copy individual files around.
    • Maybe I've been working with databases too much, but doesn't it seem a little redundant to put the album cover art in each file?

      Yes.

      Also, note that you can have different images on each file.

      --

      --
      xoa