Music Video setups
#1
Searching around, it doesn't seem that the MV function is one of the more popular features on XBMC which is understandable, but wondering if anyone feels they've got a pretty successful setup for them?

If so, how do you have your section laid out... which scraper do you use, does it work most of the time, any particularly painful bugs? I started setting mine up yesterday with a few files and didn't get many great results but I'll be trying again later with a bigger library and hopefully things will fill out a bit better. It's a nice inclusion to the system and hoping it doesn't get abandoned due to lack of interest or anything!

If there's any addons people have found that expand it's usability, that'd be great! (I know of the MTV one, but it doesn't work here in the UK unfortunately).
Reply
#2
Most of my music videos weren't recognize so I use a nfo in order to have my music videos recognize.
Reply
#3
I have all my Music Videos sorted into genre folders. I then wrote a small script that runs through automatically and produces an nfo file per video clip with artist/title/genre.
I'm with seijmo I found the scrapers didn't recognize 95% of my collection.
This script system works perfectly for me.

Cheers
Reply
#4
Any chance you share your script? It will be usefull to fill my missing nfo
Reply
#5
OK All,
Basically my files are named as TITLE - ARTIST.AVI
These files are then, as I said located in a genre folder. With that done simply run this script and point it at your genre folder and it will do the rest. A lot of this script was taken from a forum somewhere... forgotten where / who, but a big thanks to whoever it was.
Quote: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
else
wscript.quit
end if

Set filesys = CreateObject("Scripting.fileSystemObject")
Set sourceFolder = filesys.GetFolder(fi.Path) ' The folder containing your Music Videos
strGenre = Mid(sourceFolder, InstrRev(sourceFolder, "\") +1)

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) = ".mp4" then
i=i+1
str1=trackname

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"
end if
noSong = Len(strSong) 'if it can't find a song name, replace with 'Unknown'
if noSong = "0" then
strSong = "Unknown"
end if
else 'leave alone
strArtist = "Unknown"
end if

str1 = replace(str1,exten,"")
destfil = sourceFolder+"\"+str1+".nfo"



if filesys.FileExists(destFil) then
g=g+1
logFile.Writeline "INFO:**********************Duplicate Below*************************"
else
f=f+1
Set fsonfo = CreateObject("Scripting.FileSystemObject")
Set nfoFile = FSOnfo.OpenTextFile(destfil, 8, True)
nfoFile.Writeline "<musicvideo>"
nfoFile.Writeline "<title>"&strSong&"</title>"
nfoFile.Writeline "<artist>"&strArtist&"</artist>"
nfoFile.Writeline "<album></album>"
nfoFile.Writeline "<genre>"&strGenre&"</genre>"
nfoFile.Writeline "<runtime></runtime>"
nfoFile.Writeline "<plot></plot>"
nfoFile.Writeline "<year></year>"
nfoFile.Writeline "<director></director>"
nfoFile.Writeline "<studio></studio>"
nfoFile.Writeline "</musicvideo>"
nfoFile.Close
set fsonfo = nothing
set nfofile = nothing
end if

timesecs = Timer - startTime
logFile.Writeline trackname & " " & str1 & " " & destfil & " " & g & " " & f & " " & i & " " &timesecs
logFile.Close

end if
next



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
wscript.quit
end if

days=0
hours=0
mins=0

do while elapsedtimesecs > 59
mins=mins+1
elapsedtimesecs = elapsedtimesecs - 60
loop

do while mins > 59
hours=hours+1
mins = mins - 60
loop

do while hours > 24
days=days+1
hours = hours - 24
loop

timetaken = f & " Music Videos Nfo files created in "
if days > 1 then
timetaken = timetaken & days & " Days & "
end if
if days = 1 then
timetaken = timetaken & days & " Day & "
end if
if hours > 1 then
timetaken = timetaken & hours & " Hours & "
end if
if days <> 1 and hours = 1 then
timetaken = timetaken & hours & " Hour & "
end if
if mins > 1 then
timetaken = timetaken & mins & " Minutes & "
end if
if hours <> 1 and mins = 1 then
timetaken = timetaken & mins & " Minute & "
end if
if elapsedtimesecs <> 1 then
timetaken = timetaken & elapsedTimesecs & " Seconds"
end if
if elapsedtimesecs = 1 then
timetaken = timetaken & elapsedTimesecs & " Second"
end if

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"
end if

set FSOd = Nothing
set logFile = Nothing

msgbox(timetaken)
Dump that into notepad and save it as NFO Creator.vbs and your good to go!
Cheers
Reply
#6
works great thanks!

Is there an easy way to modify the script in order to search subfolders?
Reply
#7
Sorry for the late reply,
It can definitely be done, but nothing via a line or two. My suggestion is I have mine running once a week as batch job... Perhaps you could do the same pointing it to all your sub folder then run the one batch job - not ideal but might meet your needs.

Cheers
Reply
#8
pHo Wrote:If so, how do you have your section laid out... which scraper do you use, does it work most of the time, any particularly painful bugs? I started setting mine up yesterday with a few files and didn't get many great results but I'll be trying again later with a bigger library and hopefully things will fill out a bit better. It's a nice inclusion to the system and hoping it doesn't get abandoned due to lack of interest or anything!

I am also starting to become a great fan of the musicvideo library and hope it will remain and maybe even further improve.

The one thing that annoys me is that it somehow doesnt pick up tags within MP4 files (not even artist, album, and title). I have the tags for ITunes and XBMC picks up MP3 tags (for music), but for whatever reason no MP4 tags (for videos).

If this feature could be added, this would be terrific!!!
Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
Reply

Logout Mark Read Team Forum Stats Members Help
Music Video setups0