Sunday 6 December 2009

Retrospective rename music tracks

If you copy one of your CDs to digital form while not connected to the internet then how can you name the files correctly and embed the information also in the music files?

Is there an easier way to do this?
Has someone already written a script?
This example for .ogg files.

Get freedb/cddb info from http://www.freedb.org/ text search
Use emacs and macros to generate the  file name + rename list and the meta info programming command list.

cd ~/ogg
mv noartist/unknown_disc various_artists/oh_brother_where_art_thou_motion_picture_soundtrackmv noartist-unknown_disc.m3u various_artists-oh_brother_where_art_thou_motion_picture_soundtrack.m3u


mv track_01.ogg James_Carter__The_Prisoners__Po_Lazuras.ogg
mv track_02.ogg Harry_McClintock__Big_Rock_Candy_Mountain.ogg
mv track_03.ogg Norman_Blake__You_Are_My_Sunshine.ogg
mv track_04.ogg Alison_Krauss__Down_To_The_River_To_Pray.ogg
mv track_05.ogg Soggy_Bottom_Boys_Feat_Dan_Tyminski__I_Am_A_Man_Of_Constant_Sorrow_radio_station_version.ogg
mv track_06.ogg Chris_Thomas_King__Hard_Time_Killing_Floor_Blues.ogg
mv track_07.ogg Norman_Blake__I_Am_A_Man_Of_Constant_Sorrow_instrumental.ogg
mv track_08.ogg The_Whites__Keep_On_The_Sunny_Side.ogg
mv track_09.ogg Gillian_Welch__Alison_Krauss__Ill_Fly_Away.ogg
mv track_10.ogg G_Welch,_A_Krauss,_Emmylou_Harris__Didnt_Leave_Nobody_But_The_Baby.ogg
mv track_11.ogg Sarah,_Hannah__Leah_Peasall__In_The_Highways.ogg
mv track_12.ogg The_Cox_Family__I_Am_Weary_Let_Me_Rest.ogg
mv track_13.ogg John_Hartford__I_Am_A_Man_Of_Constant_Sorrow_instrumental.ogg
mv track_14.ogg Ralph_Stanley__O_Death.ogg
mv track_15.ogg Soggy_Bottom_Boys_Feat_Tim_Blake_Nelson__In_The_Jailhouse_Now.ogg
mv track_16.ogg Soggy_Bottom_Boys_Feat_Dan_Tyminski__I_Am_A_Man_Of_Constant_Sorrow_band_version.ogg
mv track_17.ogg John_Hartford__Indian_War_Whoop.ogg
mv track_18.ogg Fairfield_Four__Lonesome_Valley.ogg
mv track_19.ogg The_Stanley_Brothers__Angel_Band.ogg

#oops
mv G_Welch,_A_Krauss,_Emmylou_Harris__Didnt_Leave_Nobody_But_The_Baby.ogg G_Welch_A_Krauss_Emmylou_Harris__Didnt_Leave_Nobody_But_The_Baby.ogg
mv Sarah,_Hannah__Leah_Peasall__In_The_Highways.ogg Sarah_Hannah__Leah_Peasall__In_The_Highways.ogg

#### vorbiscomment -w overwrites old info, so e.g. tracknumber was gone.
D=ogg/various_artists/oh_brother_where_art_thou_motion_picture_soundtrack
ALBUM="Oh Brother Where Art Thou Soundtrack"
VBC=vorbiscomment
TN=01;F=James_Carter__The_Prisoners__Po_Lazuras.ogg;ARTIST="James Carter & The Prisoners";TRACK="Po Lazuras";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=02;F=Harry_McClintock__Big_Rock_Candy_Mountain.ogg;ARTIST="Harry McClintock";TRACK="Big Rock Candy Mountain";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=03;F=Norman_Blake__You_Are_My_Sunshine.ogg;ARTIST="Norman Blake";TRACK="You Are My Sunshine";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=04;F=Alison_Krauss__Down_To_The_River_To_Pray.ogg;ARTIST="Alison Krauss";TRACK="Down To The River To Pray";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=05;F=Soggy_Bottom_Boys_Feat_Dan_Tyminski__I_Am_A_Man_Of_Constant_Sorrow_radio_station_version.ogg;ARTIST="Soggy Bottom Boys Feat. Dan Tyminski";TRACK="I Am A Man Of Constant Sorrow (radio station version";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=06;F=Chris_Thomas_King__Hard_Time_Killing_Floor_Blues.ogg;ARTIST="Chris Thomas King";TRACK="Hard Time Killing Floor Blues";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=07;F=Norman_Blake__I_Am_A_Man_Of_Constant_Sorrow_instrumental.ogg;ARTIST="Norman Blake";TRACK="I Am A Man Of Constant Sorrow (instrumental";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=08;F=The_Whites__Keep_On_The_Sunny_Side.ogg;ARTIST="The Whites";TRACK="Keep On The Sunny Side";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=09;F=Gillian_Welch__Alison_Krauss__Ill_Fly_Away.ogg;ARTIST="Gillian Welch & Alison Krauss";TRACK="I'll Fly Away";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=10;F=G_Welch_A_Krauss_Emmylou_Harris__Didnt_Leave_Nobody_But_The_Baby.ogg;ARTIST="G Welch, A Krauss, Emmylou Harris";TRACK="Didn't Leave Nobody But The Baby";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=11;F=Sarah_Hannah__Leah_Peasall__In_The_Highways.ogg;ARTIST="Sarah, Hannah & Leah Peasall";TRACK="In The Highways";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=12;F=The_Cox_Family__I_Am_Weary_Let_Me_Rest.ogg;ARTIST="The Cox Family";TRACK="I Am Weary (Let Me Rest";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=13;F=John_Hartford__I_Am_A_Man_Of_Constant_Sorrow_instrumental.ogg;ARTIST="John Hartford";TRACK="I Am A Man Of Constant Sorrow (instrumental";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=14;F=Ralph_Stanley__O_Death.ogg;ARTIST="Ralph Stanley";TRACK="O Death";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=15;F=Soggy_Bottom_Boys_Feat_Tim_Blake_Nelson__In_The_Jailhouse_Now.ogg;ARTIST="Soggy Bottom Boys Feat. Tim Blake Nelson";TRACK="In The Jailhouse Now";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=16;F=Soggy_Bottom_Boys_Feat_Dan_Tyminski__I_Am_A_Man_Of_Constant_Sorrow_band_version.ogg;ARTIST="Soggy Bottom Boys Feat. Dan Tyminski";TRACK="I Am A Man Of Constant Sorrow (band version";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=17;F=John_Hartford__Indian_War_Whoop.ogg;ARTIST="John Hartford";TRACK="Indian War Whoop";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=18;F=Fairfield_Four__Lonesome_Valley.ogg;ARTIST="Fairfield Four";TRACK="Lonesome Valley";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"
TN=19;F=The_Stanley_Brothers__Angel_Band.ogg;ARTIST="The Stanley Brothers";TRACK="Angel Band";$VBC -w -t tracknumber=$TN  $F -t "ARTIST=$ARTIST" -t "TITLE=$TRACK" -t "ALBUM=$ALBUM"

No comments: