Skip to content

Trying to read metadata from AVI-files in Java

So, I was trying to read metadate from AVI-files in Java. From the metadata I am actually interested in the date of creation only.

After some googling I couldn’t find any decent Java library that would/could do that simple job.

How disappointing.

Here’s what I’ve got so far:

I’ve found two libraries with no documentation around. Looking at the code (which was provided for both) it seems to me that there’s no apparent way to get at the “when was that clip recorded?”-data:

The latter one being – it seems – a good example that the public/private dichotomy of visibility seems too much of pretended omniscience on the side of the code’s author. I.e. there are private classes that should be public in order to be useful outside of it’s intended use – The author pretended to know that private visibility would be enough. It is not – but that may be a topic of another blog-entry.

The class AVIReader may be a template for reading metadata – but I actually don’t want to do the dirty work myself.

Then there is libextractor (found via Reading File Metadata with extract and libextractor) – which is a mighty framework but has some dependencies (it seemed) I didn’t want to have to satisfy.

And finally there’s the Java Media Framework. I couldn’t find an easy way – actuall no way at all – to get at the date-metadata with that framework by SUN.

Any suggestions from my reader?

Verwandte Artikel

{ 1 } Comments

  1. Josef Garvi | 2009/11/23 at 04:31 | Permalink

    The thing is that the recording time is stored differently depending on the encoding used in the AVI file. For DV clips, it is stored in the individual video frames. For MJPEG clips, it is stored in one of the header chunks, but exactly where to find it varies a little per manufacturer. So far, my code handles all the film formats we are using, but you may be using other formats or manufacturers that I haven’t crossed paths with yet…

Post a Comment

Your email is never published nor shared. Required fields are marked *