MP4(3)

πŸ“¦ version 2.1.0, in fedora 43, fedora 44

MP4 πŸ’– MP4GetDuration β€” get the duration of the movie (file) 🎬

okay bestie, welcome to the MP4 File Format Library manual page, section 3 ✨ this one's a lil cutie, it's giving "how long is this movie actually" energy and honestly? we love a simple API 🫢


✨ NAME ✨

MP4GetDuration β€” Get the duration of the movie (file) πŸŽ₯⏱️


🌸 SYNTAX 🌸

#include <mp4.h>

MP4Duration MP4GetDuration(
     MP4FileHandle hFile
)

look at her, so clean, so minimal, no notes πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • hFile β€” Specifies the mp4 file to which the operation applies. basically you're handing her the file you wanna interrogate, and she's like "bet, say less" πŸ—‚οΈ

πŸ¦‹ RETURN VALUES πŸ¦‹

She hands you back the duration of the movie (file), measured in movie (file) time scale units. yes, those specific units, we'll get into it, stay with me πŸ“βœ¨


πŸ’œ DESCRIPTION πŸ’œ

So MP4GetDuration returns the maximum duration of all the tracks in the specified mp4 file. not just one track, not an average, the MAX. she's finding the longest track in the whole file and reporting that as the movie's duration, main character behaviour tbh πŸ‘‘

⚠️ Caveat, bestie, listen up: the duration is in movie (file) time scale units. Not seconds. Not milliseconds. Movie time scale units. Do NOT come for her later being like "why is this number so weird", because she told you 😭

πŸ’– SEE ALSO πŸ’–

ngl the third one is your bestie for converting that duration into something a human can read, iykyk 🌈


and that's the whole page fr fr πŸ’€ brought to you by Cisco Systems Inc., Version 0.9, and this lil MP4(3) moment β€” go forth and get those durations, periodt πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from