NFO creator for Music Videos - Auri - 2011-02-05 15:55
Anyone know a NFO creator that will make an NFO file based on a 'lets say) MP4 music video details such as duration, artist, director, genre, ...
I could make them manually but I have so many music video's it's not gonna be a fun task todo Also imho the MTV and Yahoo music video scrapers are not usefull at all. Like less then 5% of my entire music video collection is being added to the library and all my music vids are named artist-songname.mp4
Would be nice if someone knows how to automate nfo creation so that XBMC can read the NFO files instead of relying on the scrapers.
Thanks in advance
- castortray - 2011-02-10 01:41
also looking for such a script, today I found this thread.
I think script from post 5 should help you, I'm not good in vbs so I can't help you in modifications
- castortray - 2011-02-10 01:57
found it !!
'* This script creates an XBMC Music Video Nfo file based on the artist & trackname. *
'* The videos must be in the format artist - trackname for this to work. *
'* Mpg, Avi, Wmv, Swf, M2v & Flv files will be picked up. If there is a format *
'* I've missed, line 34 can be edited to add the additional extension. Just add *
'* or lcase(exten) = ".xxx" before the word then. *
'* The script is currently unble to handle any 4 letter extensions such as .mpeg *
'* (C)Craigey2007 - 19-12-2007. Use at your own risk. V1.6 *
i = 0
f = 0
g = 0
log_name = "music_video_nfo_creator.log"
Set sa = CreateObject("Shell.Application")
set oF = sa.BrowseForFolder(0, "Source Folder:", ssfWINDOWS)
if (not oF is nothing) then
set fi = oF.Items.Item
Set filesys = CreateObject("Scripting.fileSystemObject")
Set sourceFolder = filesys.GetFolder(fi.Path) ' The folder containing your Music Videos
set mvidslist = sourceFolder.files
startTime = Timer
For Each mvids in mvidslist
trackName = mvids.name
exten = right(mvids,4)
if lcase(exten) = ".avi" or lcase(exten) = ".wmv" or lcase(exten) = ".mpg" or lcase(exten) = ".swf" or lcase(exten) = ".m2v" or lcase(exten) = "flv" then
fullfilename = WScript.ScriptFullName
currentFolder = Left(filename, InstrRev(filename, "\"))
Set FSOd = CreateObject("Scripting.FileSystemObject")
Set logFile = FSOd.OpenTextFile(currentfolder+log_name, 8, True)
on error resume next
seperator = InstrRev(str1,"-") 'count left to the first occurance of "-"
if (seperator >= 1) then 'if the seperator exists split into artist and song
artist = Left(str1,seperator-2) 'seperate artist
songLength= (Len(str1)- seperator) 'work out chr length of song
song = right(str1,songLength) 'seperate song
strArtist = artist
strSong = song
strSong = Replace(strSong,exten,"")
strArtist = trim(strArtist)
strSong = trim(strSong)
noArtist = Len(strArtist) 'if it can't find an artist name, replace with 'Unknown'
if noArtist = "0" then
strArtist = "Unknown"
noSong = Len(strSong) 'if it can't find a song name, replace with 'Unknown'
if noSong = "0" then
strSong = "Unknown"
else 'leave alone
strArtist = "Unknown"
str1 = replace(str1,exten,"")
destfil = sourceFolder+"\"+str1+".nfo"
if filesys.FileExists(destFil) then
logFile.Writeline "INFO:**********************Duplicate Below*************************"
Set fsonfo = CreateObject("Scripting.FileSystemObject")
Set nfoFile = FSOnfo.OpenTextFile(destfil, 8, True)
set fsonfo = nothing
set nfofile = nothing
timesecs = Timer - startTime
logFile.Writeline trackname & " " & str1 & " " & destfil & " " & g & " " & f & " " & i & " " ×ecs
elapsedTimesecs = Timer - startTime
elapsedtimesecs = CInt(elapsedtimesecs)
if i = "0" then
ermsg="No Music Videos were Found."
erTitle="Files not Found"
MsgBox erMsg, vbOkOnly + vbExclamation, erTitle
do while elapsedtimesecs > 59
elapsedtimesecs = elapsedtimesecs - 60
do while mins > 59
mins = mins - 60
do while hours > 24
hours = hours - 24
timetaken = f & " Music Videos Nfo files created in "
if days > 1 then
timetaken = timetaken & days & " Days & "
if days = 1 then
timetaken = timetaken & days & " Day & "
if hours > 1 then
timetaken = timetaken & hours & " Hours & "
if days <> 1 and hours = 1 then
timetaken = timetaken & hours & " Hour & "
if mins > 1 then
timetaken = timetaken & mins & " Minutes & "
if hours <> 1 and mins = 1 then
timetaken = timetaken & mins & " Minute & "
if elapsedtimesecs <> 1 then
timetaken = timetaken & elapsedTimesecs & " Seconds"
if elapsedtimesecs = 1 then
timetaken = timetaken & elapsedTimesecs & " Second"
if g = 1 then
timetaken = timetaken & vbcrlf & g & " NFO File already existed & was ignored"
elseif g > 1 then
timetaken = timetaken & vbcrlf & g & " NFO Files already existed & were ignored"
set FSOd = Nothing
set logFile = Nothing
I hope it help