#41 Rework of Metadata and Cover Art handling

open
nobody
None
5
2012-12-21
2012-12-21
cojms1
No

So, for a while now I have been having issues with large files (>2Gb) on my system. Anything of this size and the metadata would not be extracted. To get around this I could use a transcoding profile set to thumbnail to take care of this for me. Then I got to think, what would happen if I needed another transcode to take place (e.g. a thumbnail and MKV to PS3 conversion).

The attached patch allows the following to take place...

Use FFmpeg to handle the metadata (if it is available)
Use the native file handler to extract the cover art (if it is available)
If I couldn't get it from the native handler then look in a configured folder (see below)
If I can't get it from there then use FFmpegthumbnailer if it is installed to generate the thumbnail

Flow chart for the process is attached.

Configuration of the folder fallback is as follows, and should placed in the import section of the config.xml...

<coverart>
<video>
<path>/mnt/mediadrive/covers/video</path>
<patterns>
<pattern match="%title%" />
<pattern match="%tvsh%" />
<pattern match="%filename%" />
</patterns>
</video>
<audio>
<path>/mnt/mediadrive/covers/audio</path>
<patterns>
<pattern match="%tpe2% - %album%" />
<pattern match="%artist% - %title%" />
</patterns>
</audio>
</coverart>

Available variables are...

title
artist
album
date
genre
description
longdescription
tracknumber
albumarturi
region
author
director
publisher
rating
actor
producer
filename - this the filename excluding the extension and path

You can also use any tag that may have been specified in the aux-data section of the library options.
The first matching pattern is the one that will be used as the cover art.

I have tested this patch after applying the patches in 3583307 and 3564743, other patches have previously been applied as well.

Discussion

  • cojms1
    cojms1
    2012-12-21

    Metadata Flowchart

     
  • cojms1
    cojms1
    2012-12-21

    Patch updating the extraction of metadata