But the data I'm getting from the track metadata is quite confusing. First things first, I don't seem to be able to figure out the length of the video in seconds. For a pretty small video Track.getDuration() is returning 2,307,776 (are these samples?) and videoTrack.getTrackMetaData().getTimescale returns 90,000 (samples per second or something? that many?).
I think I probably lack of some basic understanding of the stuff at work here, so any help in that sense would be welcome.
Hi there,
I need to trim a video so as to keep only the last n seconds. Say n is 5.
I'm looking into this example: https://github.com/sannies/mp4parser/blob/master/examples/src/main/java/com/googlecode/mp4parser/SingleTrackShortenExample.java
But the data I'm getting from the track metadata is quite confusing. First things first, I don't seem to be able to figure out the length of the video in seconds. For a pretty small video Track.getDuration() is returning 2,307,776 (are these samples?) and videoTrack.getTrackMetaData().getTimescale returns 90,000 (samples per second or something? that many?).
I think I probably lack of some basic understanding of the stuff at work here, so any help in that sense would be welcome.
Thanks a lot in advance!