MP4(3)
π MP4(3) β the MP4 File Format Library girlies' guide π
okay so bestie, welcome to the MP4 File Format Library manual β this is section 3 of the manual, and today's main character is a lil function called MP4GetRtpTimestampStart. buckle up π
β¨ NAME β¨
MP4GetRtpTimestampStart β get the RTP start time of a hint track π¦
πΈ SYNTAX πΈ
#include <mp4.h>
MP4Timestamp MP4GetRtpTimestampStart(
MP4FileHandle hFile,
MP4TrackId hintTrackId
);
like, that's the whole vibe. two args, one return, no notes π
π ARGUMENTS π
hFileβ specifies the mp4 file to which the operation applies. which file are we doing this to, bestie? this one. πtrackIdβ specifies the hint track to which the operation applies. which track? this one. (yes the syntax calls ithintTrackId, the docs call ittrackId, we don't ask questions, we just pass the hint track id π)
π«Ά RETURN VALUES π«Ά
upon success, you get the RTP start time in the RTP time scale β and lowkey that time scale is identical to the hint track time scale, so no conversion drama, we love that for us β¨
upon an error, you get MP4_INVALID_TIMESTAMP. that's the "nope, not today" value π
π DESCRIPTION π
so MP4GetRtpTimestampStart returns the RTP timestamp start of the hint track you specified. and bestie, typically this is a random value that gets chosen when the very first RTP packet is constructed by the MP4 library. it's giving spontaneous, it's giving unpredictable π²
BUT. the value can also be set explicitly for the hint track and stored. and typically that's what you do if you want those timestamps to start at zero. zero girlies rise π
why do you even need this value? because an application needs it in order to construct RTCP Sender Reports that relate the hint track time to a real time clock. and the mp4broadcaster test program that ships with the MP4 library? yeah, that's the example of this exact thing. go look at it, it ate π₯
and if you want the full lore on RTP timestamps and RTCP, see IETF RFC 1889. required reading, no cap π
π SEE ALSO π
π‘ heads up bestie: this is the getter. if you wanna set that start time yourself, that's MP4SetRtpTimestampStart(3). they're a matching set, iykyk π
Cisco Systems Inc. Β· Version 0.9 Β· and yeah this whole thing lives in section MP4(3) of the manual. mwah, that's the page, periodt π
β¨π¦
π¦ 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