MP4(3)

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

✨ NAME ✨

MP4GetTrackEditMediaStart β€” bestie, this is the one that gets the media start time of a track edit segment πŸ’–

So like, if you're poking around in the MP4 File Format Library (that's the MP4(3) manual, section 3, iykyk) and you need to know where a track edit segment's media actually starts? Yeah. This is her. πŸ‘‘


🌸 SYNTAX 🌸

#include <mp4.h>

MP4Timestamp MP4GetTrackEditMediaStart(
     MP4FileHandle hFile,
     MP4TrackId trackId,
     MP4EditId editId
)

Okay so the way that you just include <mp4.h> and then call her with three little arguments and she hands you back an MP4Timestamp… we love a low-effort, high-reward function fr fr 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • hFile β€” this is the mp4 file the operation applies to. Like, which file are we even doing this to, bestie. Specify it here. πŸ’…
  • trackId β€” the track the operation applies to. Every track's got an id and you gotta tell her which one you're obsessed with. πŸ¦‹
  • editId β€” the edit segment you want the media start time for. Not the track, not the file β€” the specific edit segment. Main character of this particular call. ⭐

🌈 RETURN VALUES 🌈

She returns the media start time of the edit segment, in track time scale units of the track in the mp4 file. πŸ•βœ¨

Not seconds. Not milliseconds. Track time scale units. Do not come for me about this later, I warned you.

πŸ’– DESCRIPTION πŸ’–

MP4GetTrackEditMediaStart returns the media start time of the of the specified track edit segment. (Yes the original says "of the of the" β€” iconic typo, we're keeping her exactly as she is, no cap. πŸ’€)

Caveat: the value is in units of the track time scale. So like, if you were expecting a nice friendly wall-clock number… no babe. Track time scale units, periodt. πŸ™ˆ

Also β€” and this is the part people always get twisted β€” this is not the same thing as the edit segment start time, MP4GetTrackEditStart(). Two completely different girls. Do not mix them up. 😭

For example:

EditId    Start     MediaStart     Duration
1         0         15             30
2         30        120            20
3         50        3000           10

See how Start and MediaStart are just… not the same numbers? Yeah. That's the whole point. Start is where the edit sits, MediaStart is where the media actually lives. Different vibes entirely. πŸŽ€


🧚 SEE ALSO 🧚


And that's the whole page, bestie!! This lil masterpiece of documentation came to you from Cisco Systems Inc. at Version 0.9, and honestly? She ate. Go forth and call your function. πŸ’œπŸ”₯

πŸ“¦ where this page comes from