FAQ  •  Register  •  Login

Metadata Extraction from M4V Video

<<

krutsch

Serviio newbie

Posts: 10

Joined: Sun Oct 14, 2012 6:42 pm

Post Sun Oct 14, 2012 7:53 pm

Metadata Extraction from M4V Video

Hello,

I have a collection of my (owned) DVDs encoded via Handbrake and tagged with MetaX, iVI Pro and Subler. They playback just great via Serviio 1.0.1 to my Sony BDP-S590 using the Bravia 2012 (US) profile.

I have these movies in my local iTunes Movies folder and Serviio is set to scan the same 'Movies' folder. The titles show up, but none of the embedded metadata gets extracted and/or presented via the playback menu's interface. For example, the 'Genre' folder displays 'Unknown' and all of the movies are included within.

I set the 'Descriptive metadata' drop-down on the Serviio console to 'No descriptive metadata', since I want to use the embedded tags - when I specify 'Online metadata sources' the results are not what I want (i.e. it works fine, but the genres don't line up with what I've set in the file and it makes finding things difficult for me).

Should Serviio be able to read the metadata for M4V files encoded as above for Apple TV or do I need to explore another metadata solution? FWIW, I tried MyMovies last night, but I wasn't able to get any of that metadata to show up via Serviio, so I gave up on that approach.

Thanks in advance for any pointers / suggestions anyone can provide.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 14320

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Oct 14, 2012 10:22 pm

Re: Metadata Extraction from M4V Video

krutsch wrote:Should Serviio be able to read the metadata for M4V files encoded as above for Apple TV

No. You could try either XMBC metadata or Online. I think MyMovies changed their format (encrypted), so I think I'll remove the support from Serviio.
<<

krutsch

Serviio newbie

Posts: 10

Joined: Sun Oct 14, 2012 6:42 pm

Post Sun Oct 14, 2012 11:03 pm

Re: Metadata Extraction from M4V Video

zip wrote:
krutsch wrote:Should Serviio be able to read the metadata for M4V files encoded as above for Apple TV

No. You could try either XMBC metadata or Online. I think MyMovies changed their format (encrypted), so I think I'll remove the support from Serviio.


That's fair. How about this? If there is a documented format for Serviio's metadata repository, I could volunteer to write something that would peel the metadata out of iTunes and place into Serviio. There a couple of ways to do this (AppleScript or a native app that leverages the iTunes APIs). I suspect there are a lot of users that would love to manage their metadata in iTunes but stream their media via DLNA to a much larger eco-system of non-Apple devices. This approach might be faster/easier/safer than reading the metadata from the file itself. Then, one adds the iTunes folders to Serviio and voila.

Just curious if there is any interest... and apologies if this is something that has already been tried and/or is possible to do with public documentation.

Cheers
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 14320

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Oct 15, 2012 12:57 pm

Re: Metadata Extraction from M4V Video

Is the metadata stored in a iTunes file? If yes I could write a metadata extractor for it.
<<

krutsch

Serviio newbie

Posts: 10

Joined: Sun Oct 14, 2012 6:42 pm

Post Mon Oct 15, 2012 4:01 pm

Re: Metadata Extraction from M4V Video

zip wrote:Is the metadata stored in a iTunes file? If yes I could write a metadata extractor for it.


Yes. There is an XML document called iTunes Music Library.xml in your iTunes folder that contains everything (all music, playlists, movies, TV shows). Everything is in there, metadata -wise, along with a path to the actual media file. The definition for the file format and keys is stored here:

http://www.apple.com/DTDs/PropertyList-1.0.dtd

My file is pretty large, but here's an example for a single movie:

<dict>
<key>Track ID</key><integer>26804</integer>
<key>Name</key><string>The Wild Geese</string>
<key>Artist</key><string>Andrew V. McLaglen</string>
<key>Genre</key><string>Military &#38; War</string>
<key>Kind</key><string>MPEG-4 video file</string>
<key>Size</key><integer>1705707030</integer>
<key>Total Time</key><integer>7744503</integer>
<key>Year</key><integer>1978</integer>
<key>Date Modified</key><date>2012-10-14T18:16:19Z</date>
<key>Date Added</key><date>2012-10-14T18:25:28Z</date>
<key>Bit Rate</key><integer>160</integer>
<key>Release Date</key><date>1978-05-01T12:00:00Z</date>
<key>Artwork Count</key><integer>1</integer>
<key>Sort Artist</key><string>Andrew V. McLaglen</string>
<key>Sort Name</key><string>Wild Geese</string>
<key>Persistent ID</key><string>9D838A43E5384DC3</string>
<key>Content Rating</key><string>mpaa|R|400|</string>
<key>Track Type</key><string>File</string>
<key>Has Video</key><true/>
<key>HD</key><false/>
<key>Video Width</key><integer>720</integer>
<key>Video Height</key><integer>350</integer>
<key>Movie</key><true/>
<key>Location</key><string>file://localhost/Volumes/Drobo/My%20iTunes/Movies/The%20Wild%20Geese/The%20Wild%20Geese.m4v</string>
<key>File Folder Count</key><integer>-1</integer>
<key>Library Folder Count</key><integer>-1</integer>
</dict>

Here is an example of a single TV show episode:

<key>24420</key>
<dict>
<key>Track ID</key><integer>24420</integer>
<key>Name</key><string>A Night to Remember</string>
<key>Artist</key><string>Mad Men</string>
<key>Album</key><string>Mad Men Season 2</string>
<key>Genre</key><string>Drama</string>
<key>Kind</key><string>MPEG-4 video file</string>
<key>Size</key><integer>548599427</integer>
<key>Total Time</key><integer>2920427</integer>
<key>Year</key><integer>2008</integer>
<key>Date Modified</key><date>2011-01-10T01:34:02Z</date>
<key>Date Added</key><date>2012-10-10T22:08:27Z</date>
<key>Bit Rate</key><integer>156</integer>
<key>Play Count</key><integer>1</integer>
<key>Play Date</key><integer>3432738019</integer>
<key>Play Date UTC</key><date>2012-10-10T23:20:19Z</date>
<key>Release Date</key><date>2008-01-09T12:00:00Z</date>
<key>Artwork Count</key><integer>1</integer>
<key>Series</key><string>Mad Men</string>
<key>Season</key><integer>2</integer>
<key>Episode</key><string>208</string>
<key>Episode Order</key><integer>8</integer>
<key>Sort Name</key><string>Night to Remember</string>
<key>Persistent ID</key><string>4628454F7F3F6666</string>
<key>Content Rating</key><string>us-tv|TV-MA|600|</string>
<key>Track Type</key><string>File</string>
<key>Has Video</key><true/>
<key>HD</key><false/>
<key>Video Width</key><integer>720</integer>
<key>Video Height</key><integer>480</integer>
<key>TV Show</key><true/>
<key>File Type</key><integer>1295275552</integer>
<key>Location</key><string>file://localhost/Volumes/Drobo/My%20iTunes/TV%20Shows/Mad%20Men/Season%202/A%20Night%20to%20Remember.m4v</string>
<key>File Folder Count</key><integer>-1</integer>
<key>Library Folder Count</key><integer>-1</integer>
</dict>

Note that this gives you everything you need, assuming that the cover art is embedded in the file, which is not always the case with music but usually is with video. If you could parse the entire file and map that to the metadata repository for Serviio, you would have a sweet solution for presenting movies and TV shows. If there is anything I can do to help, please let me... I have a lot of gadgets (Apple and otherwise), a large iTunes collection of music, TV shows and movies, and would love to see this materialize.
<<

krutsch

Serviio newbie

Posts: 10

Joined: Sun Oct 14, 2012 6:42 pm

Post Mon Oct 15, 2012 5:39 pm

Re: Metadata Extraction from M4V Video

^^^^^^ On the cover art issue with iTunes...

iTunes will often store the cover art for media files in a separate folder structure, called 'Album Artwork' in the iTunes main folder. This will cause issues for Serviio if attempting to use an embedded image, which may not be present in the file and/or extracted by Serviio.

However, to solve that problem, I use Doug's AppleScripts for iTunes:

http://dougscripts.com/itunes/scripts/s ... bumartjpeg

...which allow you to select one/more/all your media files and export cover art from the iTunes repository and places in the folder where each media file is located, as a JPEG named 'Folder.jpg'. This works for music, as well as videos, and has been reliable for my collection.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 14320

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Oct 15, 2012 6:43 pm

Re: Metadata Extraction from M4V Video

<<

krutsch

Serviio newbie

Posts: 10

Joined: Sun Oct 14, 2012 6:42 pm

Post Tue Oct 16, 2012 2:45 pm

Re: Metadata Extraction from M4V Video

OK, I appreciate your time and consideration and maybe this will show up later as a feature.

I want to stick with this. however, because in my ad-hoc testing, the same 720p video looks better when played back on my Sony BDP-S590 than it does on my Apple TV 3 (which was a surprise to me).

In the meantime I will continue using XBMC to organize metadata. Is there a way to tell Serviio to 'start over' with the meta data and rescan everything? I did click the 'Rescan video metadata' but that didn't seem to change anything after I re-exported my XBMC metadata (i.e. after re-exporting the metadata, I was back to 'Unknown' as the only Genre in the collection)?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 14320

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Fri Oct 19, 2012 10:28 am

Re: Metadata Extraction from M4V Video

krutsch wrote:I did click the 'Rescan video metadata' but that didn't seem to change anything after I re-exported my XBMC metadata (i.e. after re-exporting the metadata, I was back to 'Unknown' as the only Genre in the collection)?

That should work.

Return to Serviio Support & Help

Who is online

Users browsing this forum: No registered users and 4 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.