I’m looking for an example of parsing an FLV header for duration specifically in Java. Given the URL of an FLV file I want to download the header only and parse out the duration. I have the FLV spec but I want an example. Python or PHP would be OK too but Java is preferred.
Share
Do you have problems downloading the header or parsing it? if it’s downloading then use this code:
You can wrap InputStream with DataInputStream if you want to read int’s rather than bytes.
After that just look at getInfo method from PHP-FLV Info or read the spec.