How can I extract meta data from various video file formats, especially the Resolution and the type of codec used. (But also all other stuff like author). I was not able to
The vikiiii solutions works, but I found :
As a consequence I installed the Windows MediaInfo application and search which are the Keys available to create some java Enum and ease usage.
I created a repository on github https://github.com/clun/movies-metadata to have everything in the same place. Just run mvn:test
on the sample project to get informations on samples MP4, OGG, AVI, FLV, WEBM and MKV.
Here the sample code of the test :
MovieMetadata movieMedataData = new MovieMetadata("./src/test/resources/small.mkv");
movieMedataData.get(General.FORMAT);
movieMedataData.get(Video.DURATION_STRING);
movieMedataData.get(Video.WIDTH_STRING);
movieMedataData.get(Video.HEIGHT_STRING);
movieMedataData.get(Video.BITRATE_STRING);
movieMedataData.get(Audio.COMPRESSION_RATIO);
//...