Jump to content

manage metada for a music video collection


curiousgally

Recommended Posts

curiousgally

Hi,

 

I'm trying to evaluate emby at the moment and have been experimenting stuff. I have a huge collection of music videos that are not US content. So metadata cannot be managed by online metadata providers but instead manually. Considering the size of the collection it would be very hard for me to manually edit all of them using the emby metadata manager. I also tried embedding the metadata within the videos, some how emby couldn't pick them up real well. So since I'm a programmer, thinking if it would work I could create metadata files manually reading through my folders. Is this doable at all ?  To achieve the same, i would need to know where metadata in metadata manager get stored for a specific video ? What's the format i need to create the metadata files so emby can read it? 

 

Also what is the best solution if I have huge collection which need to have metadata entered manually like in this case. Any suggestion is appreciated. 

 

Please advise if emby defeats the whole purpose if I'm going to manually manage my whole collection in this way.

 

Thanks.

Link to comment
Share on other sites

willo123

It certainly is possible, I am using this approach for music videos (and reasonably similar approach to sports). The way I went about is the following:

1) Tag the files using dedicated music tagging app such as TagRename. This is major PITA as video tagging support is appalling, aside of mp4 container for which various music tagging applications work reasonably well, although aside of the most basic tags, tags used for the same metadata items is not very consistent between various apps.

2) Export the tags to xml sidecar files using comman line applications (MediaInfo CLI in my case)

3) Create nfo file out of the xml file using xsl transformation using any parser that provides command line  support (Saxon B in my case). This is the only part you need to code yourself. For very basic tags this is really straightforward, but if you want to support lots of tags and and several tagging applications, it may get reasonably complicated, due to fact that Emby's fieldset is not the best fit for music videos and does not differentiate different types of music videos (single song music video would need different set of fields compared to a concert) and the tagging inconsistencies between different tagging applications.

4) Tie all that together with Windows batch file that loops through your root folder. In my case the the batch file looks like this:

 

 

SETLOCAL ENABLEDELAYEDEXPANSION
 
set mediaInfo=M:\MediaLibrary-tools\tools\MediaInfo_CLI_0.7.84_Windows_x64
set saxon=java -jar "../tools/saxonb9-1-0-8j/saxon9.jar"
set xsl="Tag2Nfo_0-1.xsl"
set src=M:\Concert\
 
FOR /R "%src%" %%F IN ("*.mp4") DO (
SET filePath=%%~dpF
SET fileName=%%~nxF
SET oFileName=%%~nF
rem "!mediaInfo!\MediaInfo.exe" --OUTPUT=XML "!filePath!!fileName!" > "!filePath!!fileName!.xml"
"!mediaInfo!\MediaInfo.exe" -f --OUTPUT=XML "!filePath!!fileName!" > "!filePath!!fileName!.xml"
!saxon! -o:"!filePath!!oFileName:.mp4=!.nfo" -s:"!filePath!!fileName!.xml" -xsl:%xsl% mode=normal
)
Edited by willo123
Link to comment
Share on other sites

curiousgally

Thanks for the detailed instructions willo123. I now atleast know where to get started with  :)

 

One clarification though do i need to put the nfo file in the same folder where the video is ?

Link to comment
Share on other sites

Happy2Play

Thanks for the detailed instructions willo123. I now atleast know where to get started with  :)

 

One clarification though do i need to put the nfo file in the same folder where the video is ?

 

That is where Emby will read the nfo file from.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...