A lightweight Java utility that extracts structured metadata from images and videos without loading entire media files into memory. It supports hardware information, camera parameters, GPS extraction, reverse geocoding, and Google Maps routing using the drewnoakes/metadata-extractor library.
- Supports JPG, JPEG, PNG, WEBP, MP4, MOV, AVI
- Extracts camera hardware & EXIF metadata
- Reads GPS coordinates from images and MP4 files
- Converts GPS coordinates into human-readable locations
- Generates clickable Google Maps links
- High-performance binary header parsing
[ Raw Media File ]
│
▼
[ Unified Processing Engine ]
│
┌─────────────────┼─────────────────┐
▼ ▼ ▼
[ Image Tags ] [ EXIF / XMP ] [ MP4 Atom Boxes ]
│ │ │
└─────────────────┼─────────────────┘
▼
[ Metadata Extraction ]
│
┌─────────────┴─────────────┐
▼ ▼
[ Console Output ] [ Reverse Geocoding ]
│
▼
[ Location + Maps ]
- Java 11+
- Maven 3.6+
- Internet connection (for reverse geocoding)
<dependency>
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
<version>2.19.0</version>
</dependency>Clone the repository:
git clone https://github.com/Aditya70-creator/MetadataExtractorProject.git
cd MetadataExtractorProjectPlace a media file inside the project and update:
String filePath = "sample.jpg";Run:
mvn compile exec:java -Dexec.mainClass="MetadataExtractorApp"Main extraction API.
Flow
- Detect media type
- Extract Image EXIF or MP4 location tags
- Parse metadata
- Send GPS coordinates to reverse geocoder
- Display formatted metadata and location
Internal network layer that:
- Connects to OpenStreetMap (Nominatim)
- Resolves latitude & longitude
- Returns a readable location name
Add the dependency and call:
MetadataExtractorApp.extractMediaProperties(
"C:\\Users\\Desktop\\sample.mp4"
);Example:
public class UploadController {
public void handleFileUpload(String path) {
MetadataExtract.extractMediaProperties(path);
}
}git checkout -b feature/MyFeature
git commit -m "Add new feature"
git push origin feature/MyFeatureThen open a Pull Request.
| Images | Videos |
|---|---|
| JPG | MP4 |
| JPEG | MOV |
| PNG | AVI |
| WEBP |
MIT License
- drewnoakes/metadata-extractor
- OpenStreetMap / Nominatim
- Java & Apache Maven Community
⭐ Star the repository if you found it useful.