2014-06-09, 12:22
after several years using (and a little developing) Media Portal I recently discovered that XBMC has build in features (like DNLA) which are very important for me. Nevertheless there is still my problem with meta data for movies. I have a very well tagged library of mkv files and really don't need to access any web site for getting meta data. Actually running different scrapers deliver lots of movies that cannot be found because either the German titles are not maintained or they simply do not exist on the web pages (e.g. private videos). I followed different discussions here - some people seem to have a similar need.
In short, I would need a scraper for tags that are embedded in the movie files. (I know, scraper is not the correct word here, but this plug-in type describes the functionality.)
From what I have seen in the different discussions, it is not possible to start a script from a XBMC scraper.
For my mkv files the tool mkvextract delivers a nice XML formatted output with all needed data in it (see attached sample) when I call 'mkvextract tags /path/moviefile > targetfile.xml'. Of course I could create a web site that, if it is called with the movie file name, runs mkvextract and returns the XML data. But this is a little like "take a sledgehammer to crack a nut". More efficient would be to call mkvextract directly from within a scraper and get the XML result immediately. The good thing is that this could work on all OSes that MKVToolnix supports (my favorite Linux ... another PRO for XBMC).
I am aware of the argument that unfortunately there is no real standard for meta data tags in movies but a little matching table could solve that issue e.g. 'plot=summary'.
In general also for other movie containers that can have embedded tags (e.g. mv4) similar possibilities could be created. E.g. the tool mediainfo (do not mix up with the equally named XBMC plug-in) can be used for different containers.
May be that I have overseen some discussions, that point to possible solutions. I really would appreciate any hint about how to transfer embedded metadata into the XBMC database.
For Media Portal I use Ant AMC and the plug-in MyFilms (which is also not what I really wanted), so it also would be possible to create a MySQL export from AMC and somehow convert it to the XBMC format. But I really would prefer to have the embedded tags as a source.
Another problem seems to be getting the real file name into a scraper buffer (just my impression from scanning the comments).
Mhhh... I did not figure out how to attach files here, so below the output of mkvextract.
In short, I would need a scraper for tags that are embedded in the movie files. (I know, scraper is not the correct word here, but this plug-in type describes the functionality.)
From what I have seen in the different discussions, it is not possible to start a script from a XBMC scraper.
For my mkv files the tool mkvextract delivers a nice XML formatted output with all needed data in it (see attached sample) when I call 'mkvextract tags /path/moviefile > targetfile.xml'. Of course I could create a web site that, if it is called with the movie file name, runs mkvextract and returns the XML data. But this is a little like "take a sledgehammer to crack a nut". More efficient would be to call mkvextract directly from within a scraper and get the XML result immediately. The good thing is that this could work on all OSes that MKVToolnix supports (my favorite Linux ... another PRO for XBMC).
I am aware of the argument that unfortunately there is no real standard for meta data tags in movies but a little matching table could solve that issue e.g. 'plot=summary'.
In general also for other movie containers that can have embedded tags (e.g. mv4) similar possibilities could be created. E.g. the tool mediainfo (do not mix up with the equally named XBMC plug-in) can be used for different containers.
May be that I have overseen some discussions, that point to possible solutions. I really would appreciate any hint about how to transfer embedded metadata into the XBMC database.
For Media Portal I use Ant AMC and the plug-in MyFilms (which is also not what I really wanted), so it also would be possible to create a MySQL export from AMC and somehow convert it to the XBMC format. But I really would prefer to have the embedded tags as a source.
Another problem seems to be getting the real file name into a scraper buffer (just my impression from scanning the comments).
Mhhh... I did not figure out how to attach files here, so below the output of mkvextract.
Code:
<?xml version="1.0"?>
<!-- <!DOCTYPE Tags SYSTEM "matroskatags.dtd"> -->
<Tags>
<Tag>
<Targets>
<TargetTypeValue>50</TargetTypeValue>
</Targets>
<Simple>
<Name>TITLE</Name>
<String>10.000 B.C.</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>[/php]
<Simple>
<Name>ORIGINAL_TITLE</Name>
<String>10,000 BC.</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>SUMMARY</Name>
<String>Ein junger Mann wird dank seines Geschicks bei der Mammut-Jagd... (truncated)</String>
<TagLanguage>de</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>ACTOR</Name>
<String>Steven Strait, Camilla Belle, Cliff Curtis</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>DIRECTOR</Name>
<String>Roland Emmerich</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>IMDB</Name>
<String>tt0443649</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>RATING</Name>
<String>5.8</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>COUNTRY</Name>
<String>USA</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>GENRE</Name>
<String>Abenteuer, Drama</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>DATE_RELEASED</Name>
<String>2008</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>LANGUAGES</Name>
<String>Deutsch, Englisch</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>LAW_RATING</Name>
<String>12</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>LENGTH</Name>
<String>104</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
</Tag>
</Tags>