Given a flv file, how do I get the video duration in java code? That is, how to parse the flv header to get the video duration?
Note: I’ve found this other question, but the answer is about getting the file header content from a given url and not about parsing that header.
The Red5 project has a class called
FLVReaderwhich does what you want. It’s LGPL licensed.