Read the metadata tags from video container files and import into database / library?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #11
From my last look at MediaInfo, it was a no go at least in the form of a dll - too much string manipulation via STL stuff IIRC.

For MP4 files (the only one we've been asked for, and the only one I know of with at least some major player (apple) using it) then we already have an MP4 tag reader - it'd just need the atoms added.

thericky:

I'd encourage you to at least try what I say. If it picks up *something* in the MP4 tag reader from my music, then extension is a heck of a lot easier for videos sometime in the future. And they're NOT ID3 tags - they're MP4 native atoms. Lastly, I know it wasn't your intent, but:

<rant>Suggesting that "it'd not be hard for someone that knows what they're doing" just turned off 99% of all developers. If it's not hard, stump up and do it yourself. This is a volunteer project, we do it in our own free time, and one thing that's consistent across all people no matter what they do is they hate being told what they should do with their free time. We do whatever we bloody well like, whenever we bloody well feel like it.</rant>

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
thericky Offline
Member
Posts: 55
Joined: Sep 2005
Reputation: 0
Post: #12
Sorry, didn't mean for it to be taken that way. If I had the spare time, I would absolutely code it myself. I wasn't aware that they weren't ID3... I guess iTunes makes it look like they are.

I thank you all for your efforts on XBMC and don't mean to sound ungrateful. I will try it in the My Music section and post here with the results soon.

I already went through and populated all of my tv show folders with folder.jpg files as well as well-named files and it's working great. I'm watching Danger Mouse as I type this. Wink

Keep up the good work.
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,595
Joined: Sep 2003
Reputation: 9
Location: Sweden
Post: #13
XBMC is in a feature freeze right now but I thought that I would bump this discussion anyway because it relates to this other discussion about adding all files to the databases and library => http://forum.xbmc.org/showthread.php?tid=14186

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,595
Joined: Sep 2003
Reputation: 9
Location: Sweden
Post: #14
FYI; a new generic meta data API will be implemented in FFmpeg SVN soon, that is hopefully in time after XBMC Atlantis 'Gold' have been released, so no need to look at this just now but when it is time to upgrade FFmpeg in XBMC's DVDPlayer video-player core.
http://lists.mplayerhq.hu/pipermail/ffmp...53753.html
http://lists.mplayerhq.hu/pipermail/ffmp...html#53753

Quote:A generic metadata API was queried several times... Now, here it is !
- The first patch add the new API itself. It contains a compatibility
layer so that software using the old API will still work.
It also contains the appropriate #if, so that the old API and the
compatibility layer will disappear after next lavf major bump.
- The second patch changes all the muxers/demuxers to use the new API.
- The third patch changes ffmpeg.c, ffplay.c and ffserver.c to use
the new API.

Basically, this API allows to associate random string value to random
string name, for AVFormatContext, AVStream, AVChapter and AVProgram.
It also supports more advanced features, such as recursive metadata,
and multiple tags with the same name.
For an example usage of such features, here is what matroska can
contain:

BAND
- LEADPERFORMER
-- ADDRESS
--- DATE
--- DATEEND
-- ADDRESS
--- DATE
I am not sure if this will be of any help with this or not? Confused
PS! Also note that FFmpeg is currently undergoing major changes in its other API/ABI as well, (and last valid revision for libavcodec version 51 is r15261), which is good to keep in mind when it is time to update FFmpeg in XBMC's DVDPlayer.

Wink

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
(This post was last modified: 2008-09-23 16:32 by Gamester17.)
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,595
Joined: Sep 2003
Reputation: 9
Location: Sweden
Question  MediaInfo still the best option for this? Post: #15
I wonder if MediaInfo still the best option to work as a atom tag reader for video files when scanning them into the database?
jmarshall Wrote:
Gamester17 Wrote:Could we not use MediaInfo library in XBMC when scanning video files into the database? Confused

See this request for MediaInfo tag reader library for DVDPlayer for more information => http://trac.xbmc.org/ticket/3824

MediaInfo supplies technical and can read tag information about a video or audio file containers.

MediaInfo is coded in C++, is cross-platform (Win32, Linux, and Mac), open source code (GPL/LGPL dual-license), and can be compiled into a .dll (Dynamicly Linked Library) on Windows, .so (Shared Object) on Linux, .dynlib (Dynamic Library) on Mac.

What information MediaInfo will get from looking at a container:
General: Title, Author, Director, Album, Track Number, Date, Duration, and much more.
Video: Codec, Resolution, Pixel Aspect Ratio, FPS, Bit-rate, and much more.
Audio: Codec, Sample Rate, Channels, Language, Bit-rate, ReplayGain, and much more.
Text Language of Subtitles (SRT, SSA, ASS, SAMI, )
Chapters: Number of Chapters, List of Chapters (names)

Examples of just some of the supported formats:
Video: AVI, MKV, OGM, DV (RAW), MPEG-1, MPEG-2, MPEG-TS, MPEG-4, WMV, MOV, IFO/VOB (DVD-Video), CDXA (VCD/SVCD), Blu-ray and HD DVD files, and more.
Audio: MP3 (Id3v2), OGG, WAV, PCM, RA, AC3, DTS, AAC, M4A, AU, AIFF, WMA, APE/MAC, FLAC, and more.

Checkout the MediaInfo website for more information:
http://mediainfo.sourceforge.net

Source code (and SVN):
http://sourceforge.net/projects/mediainfo

Cool
From my last look at MediaInfo, it was a no go at least in the form of a dll - too much string manipulation via STL stuff IIRC.
So I decided to I e-mail MediaInfo's author, Jerome Martinez (a.k.a. Zenitram), asking about this and I got this reply:
Quote:Hi,

Yes, all the API is string based, because it is easier.
But you needn't worry about STL: you can have basic raw char*, this is not
difficult to handle, you needn't STL knowledge, and MediaInfo handle
difference between the different formats.

Anyway, about integration of metadata in MediaInfo, my goal is to have all the
metadata available in a file, so if data is present, what is request ("Right
now it allows for the following atoms (new atoms can be defined as well) Show
Name, Episode ID, Episode Number, Season Number, Cast Members, Producers,
Directors, Writers, Original Air Date, Original Network, Long Description (Plot),
Artwork, Video Kind (TV Show, Movie, Music Video) Rating, Genre.") is
easy to have.

If some files have problems, don't hesitate to send me:
- the files with problems
- What you would like to have in XBMC.

I think that MediaInfo will be ever better as FFmpeg for metatags, because
metatags are the goal of MediaInfo, and the goal of FFmpeg is to play a file
well.
For example, the forum speaks about ID3 in .mp4, I don't think that FFmpeg can
handle this, but if you provide me a file with this metadata, MediaInfo will be
able to read it.

We can try to work together about this "problem" (the more testers with problems
and advice for mapping original format tag to MediaInfo tag I have, the happiest
I am Smile )

Note about some definition:
- .dll (Dynamicly Linked Library) on Windows
- .so (Shared Object) on Linux
- .dynlib (Dynamic Library) on Mac

All of them can be compiled on a lot of compilers
(for Mac: tested both GCC and Xcode) for a static lib or a dyn lib.

Zen

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #16
See what I posted on trac. As far as our dll loader is concerned, STL strings within the dll are what we can't handle - nothing to do with the interface per-se.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Gamester17 Offline
Team-XBMC Forum Moderator
Posts: 10,595
Joined: Sep 2003
Reputation: 9
Location: Sweden
Post: #17
http://trac.xbmc.org/ticket/3824
jmarshall Wrote:Note that the problem, as far as the xbox (and win32) is concerned at least, is due to STL being used within the library, not for the interface per-se.

I think you'll find that our dll loader is going to barf on any dll that includes stl strings and so on.
MediaInfo's author, Jerome Martinez (a.k.a. Zenitram), said that he would be willing to work with XBMC developers in order get MediaInfo library working in XBMC, (his e-mail address is "zen at mediaarea dot net").

Would that help? ...or what about using it as a static library? Confused

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
blckshp Offline
Junior Member
Posts: 6
Joined: Oct 2008
Reputation: 0
Post: #18
All of my .mp4 files are atomized via MetaX via AtomicParsley. How can I view the relevant info such as director and cast as well as the cover image saved in atoms like that of the IMDB Video Library?

[Edit]
Or....What do I use to edit or create my own the MyVideos*.db ?
(This post was last modified: 2008-10-19 19:28 by blckshp.)
find quote
blckshp Offline
Junior Member
Posts: 6
Joined: Oct 2008
Reputation: 0
Post: #19
How can I help push a new feature (see Ticket #5079, http://trac.xbmc.org/ticket/5079) to add mp4 meta data to the video library (ref. my previous post: http://forum.xbmc.org/showthread.php?tid=39205) as it is evident the meta data is being read (probably via atomicparsely) so all that needs to be done is add to library via sqlite3.

I see this being much more efficient than the IMDB lookup, and a more reliable population of the library on multiple systems.

Show me where to get started!!!
find quote
Lumpsack Offline
Senior Member
Posts: 103
Joined: Oct 2008
Reputation: 0
Post: #20
Maybe the developers section of the forums can help
find quote
Post Reply