I'm searching a java library to calculate video file duration for all possible video formats (flv, mpeg, avi, mp4).
I've tried "getDuration()" (class player" into package javax.media) but it's wrong for my porpouse.
Peraphs jffmpeg (net.sourceforge.jffmpeg.VideoDecoder)?
Has someone ever tried it?
where can i Find some explampe code?
Welcome to the Ranch and well done but please tell us how you did it.
Joined: May 21, 2012
I've used ffmpeg.exe. I execute this file and it returns a string with duration value inside.
There is ffmpeg version also for Mac and I select to execute ffmpeg.exe or ffmpeg according to os version.
Here the code:
Joined: Oct 13, 2005
Thank you very much. I have added code tags, which improve your post. Don’t use [b] or similar tags inside code tags.