MP4(3)

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

πŸ’– MP4ConvertFromMovieDuration β€” the mp4 manual, bestie edition πŸ’–

okay so real talk, this one lives in the MP4 File Format Library (that's the MP4(3) section of the manual, iykyk), and it's literally just here to do one lil job: math on time scales. slay. let's get into it πŸŽ€


✨ NAME ✨

MP4ConvertFromMovieDuration β€” converts a duration from the movie (file) time scale to a specified time scale.

like. it takes a duration that's counting in movie ticks and re-counts it in your ticks. that's the whole vibe. πŸ’…


✨ SYNTAX ✨

#include <mp4.h>

u_int64_t MP4ConvertFromMovieDuration(
     MP4FileHandle hFile,
     MP4Duration duration,
     u_int32_t newTimeScale
)

not me showing up with #include <mp4.h> first thing, as she should. πŸ‘‘


✨ ARGUMENTS ✨

  • hFile β€” specifies the mp4 file to which the operation applies. basically which file are we doing this to, bestie 🫢
  • duration β€” specifies the duration that is to be converted. this is the number you're dragging into a new time scale.
  • newTimeScale β€” specifies the new time scale in ticks per second to which the duration should be converted. yes, ticks per second. write that down. πŸ“

✨ RETURN VALUES ✨

  • upon success β†’ the duration, but in the new time scale units 🌈
  • upon error β†’ 0 😭
fr fr, 0 means something went wrong. don't be out here reading it as "zero duration, all good." πŸ’€

✨ DESCRIPTION ✨

MP4ConvertFromMovieDuration converts a duration such as the total movie (file) duration from the movie time scale to another specified time scale.

that's it. that's the function. she converts, she returns, she goes home. main character energy honestly ✨


✨ SEE ALSO ✨

go read those too, bestie, it's giving homework but make it cute πŸ¦‹


and that's a wrap on the MP4ConvertFromMovieDuration page!! this lil masterpiece comes to you from Cisco Systems Inc., Version 0.9, sitting pretty in the MP4(3) section of the manual πŸ’– mwah, obsessed with her, no cap πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from