MP4GetTrackDuration man page
MP4GetTrackDuration — Get the duration of a track
Specifies the mp4 file to which the operation applies.
Specifies the track for which the duration is desired.
The duration in track time scale units of the track in the mp4 file.
MP4GetTrackDuration returns the total duration of all the samples in the specified track in the mp4 file.
Caveat: The value is in units of the track time scale.