Read the metadata tags from video container files and import into database / library?
#1
Lightbulb 
i'm not completely literate when it comes to these things, but i was wondering if it's possible to embed info (title, director, year, etc.) right into an avi file in the same way that audio files have metatags. if this is the case, couldn't xbmc just use the tag info to set up a my videos library like the my music library. the reason i ask is that the current method of searching imdb for movie info isn't quite as useful for some types of videos (tv episodes, music videos, sports clips, etc). if xbmc was just reading the tags off each video file, then people (i'm assuming) could manually tag their videos themselves if the lookup isn't satisfactory.

this was just a thought i had. i apologize in advance if it's way off.
Reply
#2
I have about a terrabyte of tv shows which I ripped from the original Dvds. I have ripped them in h.264 AVC1 at 640x480 aac audio. The reason for my choice in codec was that it will play natively in my ipod and apple tv and coverflow. one nice feature of it is that it embeds metadata directly to the file, just like mp3 id3 tags.

All my videos are tagged with show name, season, description, episode numbers, and even artwork. itunes, the ipod and apple tv sees all this metadata fine. xbmc however does not display any of this info. the metadata is embeded directly into the file its not being pulled from any dtabase.

I was wondering if theres a way to have xbmc pull this info directly from the file or if its a planned update.

thank you
Reply
#3
XBMC doesn't currently do this, no.

We can read metadata from mp4, but currently only audio-related stuff.

A patch would be most welcome, however.

The idea would be to first modify the MP4 tag loader to read in the TV/Movie related tags.

Then modify the scanner to first attempt to read those tags (if mp4 filetype is found) before trying the scrapers.

A patch would be most welcome. At the very least, supply some sample files with all the tags that are/should be readable, plus information on which atoms should be searched to find those tags.

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
Reply
#4
Lightbulb 
Could we not use MediaInfo library in XBMC when scanning video files into the database? Huh

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, and many more).
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.

Quote: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.

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

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

Cool
Reply
#5
Unfortunately I am not a developer and have no idea how I would even begin to write a patch or convert the mediainfo source to xbmc.

I Just though it be a nice feature to have since it would eliminate the need for scrapping for already tagged files. if you'd like I can certainly make a small clip and fully tag it for you.

Right now it allows for the following atoms (new atoms can be defined aswell) 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) Raiting, Genre.

If you have seen screenshots of the AppleTV whenever you are in the TV section and you are hovering above a video it will display the plot sumary, and all the other tag info underneath the show artwork. please let me know if I can be of any non-development assistance. as I have been using XBMC since it was a XBMP, and I would love to give something back to the community.
Reply
#6
I've just upgraded XBMC to use the xTV skin (good stuff) and have a bunch of MP4 files with ID3 information and artwork embedded in them. However, XBMC seems to be reading none of it for video. It is reading it for music though.

How do I get the Movie and TV sections to pull and display ID3 information from my MP4 video files?
Reply
#7
You can't I'm afraid. We don't support tagged video formats in My Video views. The problem is ofcourse a bit of a chicken and an egg issue - no formats except MP4 (and really it was itunes that started tagging 'em) have consistent tag support, and very few applications bother reading them.

You can see whether it'll read them by adding them to my music though.

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
Reply
#8
Well that explains why it isn't working for me. Wink Any chance of future MP4 tag support?

Other than trying to add the videos to the My Music section, is the only current way to get videos properly named in the Videos section to actually name the files something meaningful and organize them by folders on a hard drive? If so, can I hide the .MP4 extension?
Reply
#9
My suggestion is still to implement the MediaInfo tag reader library for XBMC's DVDPlayer, see:
http://trac.xbmc.org/ticket/3824

...but then again I am not a programmer/developer myself Sad


thericky Wrote:is the only current way to get videos properly named in the Videos section to actually name the files something meaningful and organize them by folders on a hard drive?
Yes, unless it's a movie for which meta data can be scraped of the internet, (post in the support forum).

thericky Wrote:If so, can I hide the .MP4 extension?
Yes, look under settings in the GUI.
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.
Reply
#10
I'm trying to make it work with TV shows and having difficulties getting it to properly add them to my Library... very frustrating. I've added a regexp and renamed my files to the proper format and yet it still isn't scraping the info correctly and nothing gets added to my Library.

I did turn off file extensions, so that helped a little bit, so I guess I'll just ignore the whole Library thing and go with sticking folder.jpg info in there like I've done with my music.

I can't imagine it'd be all that hard for someone who knows what they're doing to program it to say "if the file is MP4, check for ID3 tags. if there are tags, use them. if not, just display the file name" and put a checkbox in the Video settings that says "Use MP4 ID3 tags when available".
Reply
#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
Reply
#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.
Reply
#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.
Reply
#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? Huh
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.
Reply
#15
Question 
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? Huh

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.
Reply

Logout Mark Read Team Forum Stats Members Help
Read the metadata tags from video container files and import into database / library?1