MP4(3)
β¨ MP4(3) β¨
okay so this is a page from the MP4 File Format Library manual, bestie, and we're about to get into it π
π NAME π
MP4DeleteTrack β deletes a track, fr fr. like, gone. bye. π«Ά
πΈ SYNTAX πΈ
first things first, you gotta pull in the header:
#include <mp4.h>
and then the actual call looks like this:
bool MP4DeleteTrack(
MP4FileHandle hFile,
MP4TrackId trackId
)
that's the whole vibe. two things go in, one bool comes out β¨
π ARGUMENTS π
hFileβ this is the mp4 file we're doing the operation on. the main character, lowkey πtrackIdβ and this is the track we're doing the operation to. the one getting yeeted π
β RETURN VALUES β
- if it goes well:
true(aka1) π - if it goes bad:
false(aka0) π
that's it. that's the whole range of outcomes. iconic.
π¦ DESCRIPTION π¦
so MP4DeleteTrack deletes the control information that's associated with the track you specified. and bestie, listen β if this call succeeds, that trackId becomes invalid. like, it's not a valid id anymore. don't come for it later, it's not there π
β οΈ but here's the part you CANNOT skip: the samples that belong to this track are not deleted by this call. nope. not even a little bit.
so how do you actually get rid of them? via MP4Optimize(). that's the move π«Ά
and the reason it's like this is actually so real β multiple tracks can reference the same samples, so you can't just nuke them from one track's perspective. you have to take a global view when deleting them. like, look at the whole situation before you start deleting things. main character energy but for the entire file π
π SEE ALSO π
MP4(3)β go read it, iykyk
and that's the whole page, bestie!! this one's from Cisco Systems Inc., sitting at Version 0.9 β so like, early days, vintage era, still ate π β¨ mwah, go delete a track responsibly π
π¦ 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