MP4(3)
π 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:editIdstarts at 1, andmediaStartTimeis 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
- fedora 43: libmp4v2-devel 2.1.0-0.34.trunkREV507.fc43 Β· LicenseRef-Callaway-MPLv1.1
- fedora 43: libmp4v2-devel 2.1.0-0.34.trunkREV507.fc43 Β· LicenseRef-Callaway-MPLv1.1
- fedora 44: libmp4v2-devel 2.1.0-0.35.trunkREV507.fc44 Β· LicenseRef-Callaway-MPLv1.1
- fedora 44: libmp4v2-devel 2.1.0-0.35.trunkREV507.fc44 Β· LicenseRef-Callaway-MPLv1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms