1

基本的に、私は兄の iPod から大量の音楽ファイルを取得しました。これらのファイルはメタデータを保持していますが、iPod がそれらを保存するのを好んでいるように見える、絶対に恐ろしい 4 文字の名前が付けられています。必要に応じて名前を変更するための簡単なスクリプトを作成することにしましたが、ID3 メタデータを読み取るための適切なライブラリについて知りたいと思っています。Perl か Python のどちらかが好みです。Perl は仕事で使っているので慣れていますが、Python はもっと練習する必要があり、Python エバンジェリストの友人を喜ばせてくれるでしょう。

とにかく、短縮版: mp3 の山から ID3 メタデータを簡単に抽出できる、Python または Perl 用の優れたライブラリ/モジュールの名前を教えてください。

4

7 に答える 7

9

CPAN Search turns up several Perl modules when you search for ID3. The answer to almost any Perl question that starts with "Is there a library..." is to check CPAN.

I tend to like MP3::Tag, but old people like me tend to find something suitable and ignore all advances in technology until we are forced to change.

于 2009-06-16T09:15:53.017 に答える
5

ここにいくつかのpythonライブラリがあります

http://id3-py.sourceforge.net/

http://nedbatchelder.com/code/modules/id3reader.html

http://code.google.com/p/mutagen/【更新URL】

于 2009-06-16T08:17:17.527 に答える
4

http://www.id3.org/Implementations

于 2009-06-16T08:12:50.623 に答える
2

私はMP3::Infoで幸運に恵まれました。

于 2009-06-16T12:23:04.090 に答える
2

MP3::Tagも素晴らしいです。繰り返しになりますが、Perl モジュールを探している場合は、まず search.cpan.org にアクセスしてください。

 use MP3::Tag;

  $mp3 = MP3::Tag->new($filename);

  # get some information about the file in the easiest way
  ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo();
  # Or:
  $comment = $mp3->comment();
  $dedicated_to
    = $mp3->select_id3v2_frame_by_descr('COMM(fre,fra,eng,#0)[dedicated to]');

  $mp3->title_set('New title');         # Edit in-memory copy
  $mp3->select_id3v2_frame_by_descr('TALB', 'New album name'); # Edit in memory
  $mp3->select_id3v2_frame_by_descr('RBUF', $n1, $n2, $n3);    # Edit in memory
  $mp3->update_tags(year => 1866);      # Edit in-memory, and commit to file
  $mp3->update_tags();                  # Commit to file
于 2009-06-17T02:10:19.087 に答える
1

このスニペット: Rename MP3 files from ID3 tags from python recipies が役立つと思います。id3reader libを使用します。

于 2009-06-16T22:56:34.593 に答える
0

Python Package Indexには、「id3」の検索に一致する python パッケージのリストがありその上位のいくつかはニーズに関連しているようです。上記のブライアンの答えと同様に、「...というpythonモジュールはありますか」に対する答えは、おそらくPyPIから始まります。

于 2009-06-17T03:06:53.027 に答える