A media analyzer lib that utilizes FFprobe and MediaInfo and merges the result into one data model.
- MediaAnalyzer — the main service. Given a media file, it analyzes it with MediaInfo followed by ffprobe, translates the results into intermediary objects and merges them into the final data model.
- Java 17+
- ffprobe and MediaInfo on the PATH (8.x / 26.x or later recommended — the field mappings follow current output shapes)
- MediaInfo >= 25.09 for the HDR mastering and light-level fields
(
masteringPeakNits,masteringMinNits,maxCllNits,maxFallNits): the splitMasteringDisplay_Luminance_Min/_Maxfields first appear in that release, and older versions report these values as null.
Add the lib as a dependency to your build.gradle.kts:
implementation("se.svt.oss:media-analyzer:x.y.z")val mediaFile = MediaAnalyzer().analyze("/path/to/file.mxf")Requires Jackson 2 on the classpath (jackson-module-kotlin is pulled in transitively);
a Jackson 3 upgrade is planned once all consuming apps are on Spring Boot 4.
Run ./gradlew check for unit tests and code quality checks. Integration tests (which
need real media files) run by default; pass -PskipIntegrationTests to exclude them.
If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.
This project is very much a work in progress so all kinds of feedback are welcome — bug reports, feature requests etc. Details on how to contribute can be found in CONTRIBUTING.
This software is released under the:
Copyright 2020 Sveriges Television AB