En plein recherche sur les tags ID3, voilà comment tagger vos MP3 avec les informations artiste, album, titre, numéro de piste en ligne de commande :
Tout d’abord, installer id2lib :
yum intsall id3lib
et voilà
Pour tagger l’artiste d’un MP3 :
id3tag -a 'Bob dylan' mon_mp3.mp3 -2
Et voilà toutes les options de cette commande magique :
Usage: id3tag [OPTIONS]... [FILES]... -h --help Print help and exit -V --version Print version and exit -1 --v1tag Render only the id3v1 tag (default=off) -2 --v2tag Render only the id3v2 tag (default=off) -aSTRING --artist=STRING Set the artist information -ASTRING --album=STRING Set the album title information -sSTRING --song=STRING Set the title information -cSTRING --comment=STRING Set the comment information -CSTRING --desc=STRING Set the comment description -ySTRING --year=STRING Set the year -tSTRING --track=STRING Set the track number -TSTRING --total=STRING Set the total number of tracks -gSHORT --genre=SHORT Set the genre -w --warning Turn on warnings (for debugging) (default=off) -n --notice Turn on notices (for debugging) (default=off)
Et pour connaitre les infos d’un fichier mp3 :
id3info mon_mp3.mp3
Voilà rien de plus simple ![]()
Après il est parfaitement possible d’exploiter ces fonctions via un script PHP du genre :
<?php
$res=exec("id3tag -a '".$artiste."' ".$fichier." -2",$res_var);
//ou $artiste est l'artiste à appliquer au fichier mp3 $fichier avec un taggage en version 2
?>


