MP4(3)

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

πŸ’– MP4(3) β€” MP4 File Format Library πŸ’–

okay bestie, sit down, hydrate, and let me tell you about MP4SetTrackEditMediaStart β€” it lives in the MP4 File Format Library and it's literally the glow-up button for a track edit segment's media start time. ✨


🌸 NAME 🌸

MP4SetTrackEditMediaStart β€” set the media start time of a track edit segment 🎬


✨ SYNTAX ✨

#include <mp4.h>

bool MP4SetTrackEditMediaStart(
     MP4FileHandle hFile,
     MP4TrackId trackId,
     MP4EditId editId,
     MP4Timestamp mediaStartTime
);

no cap, that's the whole signature, character for character, we don't edit the queen's source code πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • hFile β€” the mp4 file this operation applies to. like, which file are we touching, bestie 🫢
  • trackId β€” the track this operation applies to. pick your fave lane πŸ›€οΈ
  • editId β€” the edit segment this operation applies to. 🚨 caveat alert 🚨 the first edit has id 1, not 0. not me almost starting at zero πŸ™ˆ
  • mediaStartTime β€” the new value for the media start, in track time scale units. units matter, always check units, iykyk ⏱️

πŸ’« RETURN VALUES πŸ’«

  • on success: true (1) β€” slay, we ate πŸ’…
  • on error: false (0) β€” it's giving tragic, try again 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

MP4SetTrackEditMediaStart sets the media start time of the specified edit segment from the specified track, in track time scale units. 🎯

need to map that value in from some other time scale? go see MP4ConvertToTrackTimestamp() for how to do that. she's the converter bestie, she handles the math πŸ’–

and now the part that trips literally everyone: this is NOT the same thing as the edit segment start time. they're different values, different vibes, do not conflate them. 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 column? yeah. that's the whole point. πŸ”₯


🌈 SEE ALSO 🌈

(the getter to this setter, obviously β€” they're a matched set, main character energy πŸ‘‘)


reminder bestie: editId starts at 1, and mediaStartTime is in track time scale units. two tiny things, zero regrets if you remember them πŸŽ€

Cisco Systems Inc. made this, it's Version 0.9, and it's filed under the MP4(3) manual. mwah, that's the whole page, go forth and set those media start times πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from