Get width and height from m4v movie file - Java

1.7k Views Asked by At

I have a m4v video file.

I want to get the width and height values of the movie.

I tried to grab it with "org.apache.tika" library which i succeed to get other metadata from the movie but not the width and height.

Any suggestions (Java) ?

Thanks.

Or.

2

There are 2 best solutions below

0
On

I've been doing this in MediaManager using the mediainfo command. The java code that wraps the command line program can be seen here MediaFileInfoFetcher.java. The good think about the command is that it can output media info as XML. So it's easy to use from Java.

0
On

I know this is an old thread, but I have just used Metadata Extractor for obtaining still images and video sizes. Metadata Extractor works on the container, not the media streams. It works on common container formats.

In my opinion, it is welll written and has good support.