I'm not entirely sure if this is the right thread but I was wondering if anyone has any experience (or could give me the heads up) on how would one go about reading a .wmv or .wma file and retrieving the meta data in java.
I don't want to necessarily want to play it in java Just read the info.
How much experience do you have with reading binary file formats? If sufficient, you might find it easiest (and most optimised) to write code to directly examine the ASF headers in the file. The ASF format is available openly from Microsoft here:
They technically stipulate that if you implement any of the spec. you must also implement all mandatory sections, which would include all the audio decoding too - which is a bit of a pain when you only want the metadata. However, if you were to only implement the headers, who are we to stop you?
You probably want to look at the Content Description Object (section 3.10 in the ASF spec.), and skip over all the other data in the file. You might also want to use java.nio classes to help with the decoding (e.g. byte order).
That would give you a 100% pure Java optimised implementation.
Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / AmazonAmazon UK )
Looky! I'm being abducted by space aliens! Me and this tiny ad!
a bit of art, as a gift, that will fit in a stocking