There are various command line tools available for editing metadata of audio files. But none of them can edit "Album artist" tag of the audio file. Is there any command line tool or perl module to do the same ? Thanks
mid3v2
comes with the mutagen library and is the best command-line tool for this purpose that I know of. When called with the -f
argument, the TPE2
tag is listed as supported.
MP3::Tag support it.
#!/usr/bin/perl
use MP3::Tag;
$mp3 = MP3::Tag->new($filename);
$mp3->new_tag("ID3v2");
$mp3->{ID3v2}->add_frame("TALB", "Album title");
$mp3->{ID3v2}->add_frame("TPE2", "Album artist");
$mp3->{ID3v2}->write_tag;
$mp3->close();
or
#!/usr/bin/perl
use MP3::Tag;
$mp3 = MP3::Tag->new($filename);
$mp3->select_id3v2_frame_by_descr('TPE2', 'album artist'); # Edit in memory
$mp3->update_tags(); # commit
$mp3->close();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With