2012-04-15 6 views
5

Ho cercato su stackoverflow, e sono stato su google e anche su duckduckgo e nessuno sembra avere un buon modo per farlo.editing di metadati in bash linux per file multimediali (non immagini) in linux

L'unico strumento che sembra aver funzionato era Exiftool che ha solo la capacità di lettura per i file ogg (che è quello che sto usando al momento). Mi piacerebbe un modo per farlo tramite la riga di comando poiché gli mp3/ogg e il loro nome sono i metadati ma i metadati sono vuoti. So già come analizzare i nomi dei file in bash ma non riesco a trovare un modo per rimetterlo sui file. Potrei fare manualmente questo genere di cose ma non ne vale la pena dato che dovrei farlo manualmente.

Musicbrainz picard inoltre non li etichetta correttamente per qualche strana ragione, ecco perché devo farlo.

risposta

8

ID3 i tag sono specifici per MP3. Per Ogg Vorbis specifiche commento di campo, vedi: Field Names

vorbiscomment (pacchetto vorbis-tools) possono modificare e interrogazione ogg informazioni tag.
mp3info è uno dei tanti strumenti per lavorare con i tag mp3.


.ogg

# Clear all info 
printf ''| vorbiscomment -w test.ogg 
      vorbiscomment -l test.ogg 
# modify info 
echo ======== 
printf 'TITLE=The Last Saskatchewan Pirate 
ARTIST=Captain Tractor 
ALBUM=East of Edson 
DATE=2000-01-01 
COMMENT=Just another TEST comment 
DESCRIPTION=*** Hello *** 
'|vorbiscomment -w test.ogg 
    vorbiscomment -l test.ogg 
echo ======== 

uscita (.ogg)

======== 
TITLE=The Last Saskatchewan Pirate 
ARTIST=Captain Tractor 
ALBUM=East of Edson 
DATE=2000-01-01 
COMMENT=Just another TEST comment 
DESCRIPTION=*** Hello *** 
======== 

mp3

# Delete the entire ID3 tag 
mp3info -d test.mp3 
echo ======== 
# modify info 
mp3info -t "The Last Saskatchewan Pirate" \ 
     -a "Captain Tractor" \ 
     -l "East of Edson" \ 
     -g "Folk/Rock" \ 
     -y "2000" \ 
     -n "1" \ 
     -c "Just another TEST comment" \ 
     test.mp3 
mp3info test.mp3 
echo ======== 

uscita (.mp3)

======== 
File: test.mp3 
Title: The Last Saskatchewan Pirate Track: 
Artist: Captain Tractor 
Album: East of Edson     Year: 2000 
Comment: Just another TEST comment  Genre: Folk/Rock [81] 

======== 
+0

bella risposta! conosci qualche strumento come questo per i file '.wtv'? – shellter

+0

grazie per la risposta. – 133794m3r