Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
As already suggested in the other thread, use ffmpeg -i and parse its output. There is also a library https://github.com/bramp/ffmpeg-cli-wrapper for the same and https://github.com/kokorin/Jaffre
Alas, the JMF framework as well as all the alternatives (xuggle etc.) ), somehow not very popular with the java community. Usually, all work with bedia is done in other languages, using some services to connect Java with the necessary functionality :-(
I will be pleasantly surprised and will certainly use it if someone tells me a sane and developing alternative for media in Java.
Thanks for mentioning Jaffree. There are 2 utilities in ffmpeg: ffprobe and ffmpeg.
The simplest: ffprobe <file path> - but this method does not always show the duration correctly, because it only scans the titles of media streams.
More accurate and slightly less fast: ffmpeg -i <path to file> -f null -c copy /dev/null (or just Nul on Windows).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question