Difference between revisions of "MetaData Handling"
Langstonius (Talk | contribs) (→Usage) |
Langstonius (Talk | contribs) (→Usage) |
||
Line 53: | Line 53: | ||
===Usage=== | ===Usage=== | ||
From command line: | From command line: | ||
− | + | <table> | |
− | + | <tr> | |
− | + | <td>Command</td></td>Option</td> | |
+ | </tr> | ||
+ | |||
+ | <tr> | ||
+ | <td> '/usr/pluto/bin/linuxmceTag 420'</td><td>Option to takte file number to scan. Can be directory or individual file.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td> '/usr/pluto/bin/linuxmceTag 'home/public/data/videos/stuff/'</td><td> || Takes a path enclosed in single quotes.</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td> '/usr/pluto/bin/linuxmceTag ' </td><td> Defaults to /home/public/data/videos with no options</td> | ||
+ | </tr> | ||
+ | </table> | ||
Revision as of 04:04, 2 April 2011
Version | Status | Date Updated | Updated By |
---|---|---|---|
710 | Unknown | N/A | N/A |
810 | relevant | 8Sept2010 | Langstonius |
1004 | Unknown | N/A | N/A |
1204 | Unknown | N/A | N/A |
1404 | Unknown | N/A | N/A |
Usage Information |
LinuxMCE has the ability to tag multiple types of files, even those with no native tagging ability. This allows the persistence of metadata from linuxmce installation to another as the data is written to file. This page is a wide overview of the process used depending on the types of files and their capabilities.
Contents
Basic Handling Overview
ANY attribute stored in the media database for a file be it audio, video or otherwise gets stored on a file level as well. How it gets stored, depends on the file:
mp3 files: Embed ALL the data into the ID3 section of the mp3 file. For any attributes that match analogously we use those attribute types for anything THAT DOESN'T we store it in a format that's read by SerializeClass, in a GEOB tag inside the ID3 section of the file.
Ogg and Flac files, we do similar, using Taglib to map attributes analogously into those media metadata types. TagLib does not support storing blobs, so it can't store everything into the ogg and flac files. Pictures, are stored, as APIC sections in MP3 files or as picture resources in ogg files. Flac files do not have this facility.
FOR ANYTHING ELSE We create what is essentially a file that just contains an ID3 section so it looks like an empty mp3 file alongside the existing file which stores the attributes and data in exactly the same way as mp3 files using APIC resources to store pictures, mapping common attributes to id3 attributes and anything else as a SerializeClass blob inside a GEOB section.
In Practice When a new file is detected by UpdateMedia, its data is interrogated, depending on whether there is an ID3 file, or an embedded id3 section, or something that taglib can handle and the data is brought back into the database. If there is a GEOB section then the other attributes not directly analogous will be brought back in.
When the pictures are brought in, a new picture row is made in the picture table, and the appropriate attribute and join tables. and the picture is stored in '/home/mediapics/xxxxx.jpg' where 'xxxxx' is the PK_Picture row. If tags change on the linuxmce side, they're supposed to be reincorporated back into the serialized tag form. The URL to an image resource if one was specified, is stored as well.
As per Tschak from IRC 7 sept 2010 --Langstonius 05:48, 8 September 2010 (CEST)
Manual file tagging
Manually adding or removing attributes can be accomplished by navigating in the webadmin to 'Media Files Sync'. You can then select the file or files in question and edit attributes or lookup extended metadata via Imdb, Amazon, or TheTVDB.
Merging Attributes
From time to time you may find the need to combine (merge) or update the name of an attribute used by multiple files.
For example, you may have imported multiple Genres name variations (via IMDB or ID3 data) for a single Genre. E.g. "Sci-Fi", "Science-Fiction" and "Science Fiction". This will mean multiple files of the same Genre don't filter correctly (or you need to select 3 Genres), and it will also clutter your UI.
To fix this, go to the LinuxMCE Admin Website and select:
- Select Files & Media => Media Browser
- Tick Genre and select Go (leave the search field blank to display all values)
- Click the Properties link next to the Genre you want to change (e.g change "Science Fiction" to "Science-Fiction")
- Update the Name: attribute text box and click update (you may have to scroll to the right to see this text box)
- If the attribute name already exists a message will be displayed: "The attribute already exists. Do you want to merge this one with it?"
- Click Yes, merge them
Do an full Orbiter regeneration (Wizard => Devices => Orbiters) and the new/updated genres should be visible via UI1/2. All files previously tagged should be displayed under the single attribute.
Note: The above should work with any Attribute not just Genres - just replace Genre with the attribute you want to change in the above instructions.
Automatic File tagging
Currently, audio files have the ability to have tags extracted from them and integrated into the LinuxMCE database. This is not the case for video media. Research has led to the development of a standalone media identification tool that will utilize online resources to identify media for presentation on orbiters and other parts of the LinuxMCE system.
State
Currently the tool, referred to as 'linuxmceTag' is in the svn in the directory '/src/autotagger/'. It is currently not included in the build system and the binary must be taken from the svn and placed into '/usr/pluto/bin/' When initialized from the web admin, a window will show up following the log identifying files in the directory and those below it. It currently looks 1 directory down for files.
Usage
From command line:
Command | </td>Option</td>