Page 1 of 1

Video Cover Art Metadata

PostPosted: Mon Apr 16, 2012 6:30 pm
by jworkm
I have just started using Serviio and so far I am very impressed. I do have a question about the generation of Video thumbnails. I just can't get it to work the way I want it to.

I have ripped my DVD's and used MetaX to write all metadata including the cover art into the MP4 video files. When scanning the files, I would like the embedded cover art to be used, and if the cover art is not embedded, extract a frame from the movie and use that as the cover art. I would also like all other embedded metadata to be used, IE actor, desc, genre etc. Even though I know most renderes won't use that data.

I cannot seem to get that to work. If I use the Online metadata sources, I do get some of the cover art, and metadata. However this content all appears to come from an online source. If the movies is not detected or properly detected then I seem to get random thumbnails (Mainly "girl with a dragon tatto") and random metadata. Most all of my movies that are not properly detected are displayed with information that is nowhere relevant to the actual video. I would prefer this content to just show with a default icon from the renderer and no metadata.

If I use the nfo option, I have extracted a few NFO's, I do get the correct metadata, however the cover art appears to just be a frame from the movies and not the embedded cover art.

It seems as what I want should be possible, I just cannot figure out the right setup or ordering to make this happen.

Any suggestions or pointers to documents would be greatly appreciated.

Again I want.....

if video has embedded cover art extract and use that along with any other metadata found in video. If video does not have embedded cover art, but does have other metadata included ie title, genre, desc, actor, then extract that metadata and lookup cover art online via metadata title that was included. If no metadata at all simply extract a frame from video file and do not try to lookup metadata online.

Thanks in advance

Re: Video Cover Art Metadata

PostPosted: Tue Apr 17, 2012 11:13 am
by zip
Embedded cover art for videos is not supported. Only for audio files.

Re: Video Cover Art Metadata

PostPosted: Tue Apr 17, 2012 3:26 pm
by jworkm
Any plans to support embedded video cover art? Does the src code happen to be available to look at making the change?

I modified an existing patch for Minidlna that calls an external perl script I wrote to extract the embedded cover art or frame from video if cover art did not exist in the video. And this seems to work just fine on all my media renderers including the Xbox. But I like the features and folder layouts better in Serviio . But for me, getting the cover art from the video is a big plus since I have spent so much time making sure the data was all self contained in most of my videos.

Re: Video Cover Art Metadata

PostPosted: Tue Apr 17, 2012 4:19 pm
by zip
what is the command to get the embedded image?

Re: Video Cover Art Metadata

PostPosted: Tue Apr 17, 2012 5:40 pm
by jworkm
I am using the Perl MP4::Info module in my script. I am happy to paste the full script if you would like but the relevant parts are.....

// Get the meta tag information
$tag = get_mp4tag($mp4File)

// Now get cover art and use perl print to print the data to a filehandle
if(defined($tag->{COVR})) {
# Found embedded cover art
unless(open(COVERART, '>>'.$coverArtName)) {
print LOG "ERROR:: error opening cover art output jpg, $coverArtName to write to\n";
die "Cannot open cover art file $coverArtName\n";
}
print LOG "INFO:: Found Cover art in ".$mp4File.", writting to ".$coverArtName."\n";
print COVERART $tag->{COVR};
close(COVERART);

Re: Video Cover Art Metadata

PostPosted: Tue Apr 17, 2012 10:45 pm
by jworkm
Jaudiotagger can apparently do the video metadata extraction, including cover art for many media types. I have checked out 2.0.3 from their svn repo and will be attempting to get a little java snippet that does this. Please be aware I am not a programmer, but a hack that kinda understands what I am doing ;)

But hopefully I can get some direction. I would really love to do away with Minidlna but I really like the cover art the way I have it working with Minidlna.

Re: Video Cover Art Metadata

PostPosted: Wed Apr 18, 2012 12:03 pm
by zip
I'm using JAudiotagger for audio files, wasn't aware it can deal with video files too.

Re: Video Cover Art Metadata

PostPosted: Fri Apr 20, 2012 6:01 pm
by jworkm
It appears I spoke to soon about JAudiotagger. I saw MP4 and automatically assumed video ;) However, it does appear there are a couple of other ways to potentially do this.

Both are referenced from http://stackoverflow.com/questions/2168 ... r-for-java

1) Use Xuggler ( http://www.xuggle.com/xuggler ). Should be able to extract the Cover_Data field

2) Use subs4me's JNI wrapper around the MediaInfo libraries. I have this with the command line MediaInfo and it does appear to be able to extract the binary embedded cover data.

What are your thoughts about implementing a embedded metadata extractor as priority 1 if a metadata title is found in the video metadata, then proceed to the other extraction methods as needed. Maybe setup an extraction method priority list in the GUI??

Also, is this something that is possible in the pluggin architecture, or is that designed for Feeds only? I am happy to help where I can if this is something of intrest.

Re: Video Cover Art Metadata

PostPosted: Fri Apr 20, 2012 6:36 pm
by zip
I don't really want to bundle another native app like MediaInfo or Xuggler, so unless it's a java only library or ffmpeg can do it it'd be a no.

Re: Video Cover Art Metadata

PostPosted: Fri Apr 20, 2012 7:15 pm
by jworkm
Fair enough. What about making another extraction option "User Defined" that took the path to an external script, or groovy plugin, that passed the metadata and thumbnail path back to the parent extrator method in a format it expected it?

Re: Video Cover Art Metadata

PostPosted: Sat Apr 21, 2012 3:40 pm
by zip
That would include quite a lot of work, but never say never.

Re: Video Cover Art Metadata

PostPosted: Sun Jul 15, 2012 12:17 pm
by johan
Hello there all.
Just started getting used to all nice functions on this media server.
But however, i'm missing the tag info described previous in this thread.
I have also done the large ammount of work to tag all my mp4 files with meta x.
And it would be relly nice if servio would use that info, if avalible instead of getting online, since i have controll over the info that comes on there.
Especially, the use of embedded cover art instead of generated thumb.

Is there a plan to get this done (i saw last entry of this topic whas a while ago, so perhaps there are new plans....?

/Johan