MP4(3)

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

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

okay bestie, gather round, we're talking about the MP4 library manual page, section 3, and honestly? it's giving iconic. this is the one about peeking at your video tracks and finding out what kind of encoding they're serving. no cap. πŸŽ€


✨ NAME ✨

MP4GetTrackVideoType β€” get the encoding type of a video track πŸ¦‹


✨ SYNTAX ✨

lowkey the most important part, so here it is, exactly as written, don't @ me:

#include <mp4.h>

u_int8_t MP4GetTrackVideoType(
     MP4FileHandle hFile,
     MP4TrackId trackId
)

✨ ARGUMENTS ✨

  • hFile β€” specifies the mp4 file to which the operation applies. like, which file are we even doing this to, bestie? this one. πŸ“
  • trackId β€” specifies the track for which the video type is desired. you gotta tell it which track you're curious about, it's not a mind reader πŸ’…

✨ RETURN VALUES ✨

upon success, you get the video type of the track. slay. πŸŽ‰

upon error, you get MP4_INVALID_VIDEO_TYPE back. so if you see that, something went sideways, and that's your little red flag 🚩


✨ DESCRIPTION ✨

MP4GetTrackVideoType returns the encoding type of the specified video track in the mp4 file. that's it, that's the whole vibe. you hand it a file and a track, it tells you what flavour of video lives in there. πŸ”βœ¨

the known video encoding types are (and yes, we're listing every single one, because we don't skip, we don't summarise, we respect the lore):

  • MP4_MPEG1_VIDEO_TYPE β€” MPEG-1 Video
  • MP4_MPEG2_SIMPLE_VIDEO_TYPE β€” MPEG-2 Simple Profile Video
  • MP4_MPEG2_MAIN_VIDEO_TYPE β€” MPEG-2 Main Profile Video (Broadcast/DVD)
  • MP4_MPEG2_SNR_VIDEO_TYPE β€” MPEG-2 SNR Profile Video
  • MP4_MPEG2_SPATIAL_VIDEO_TYPE β€” MPEG-2 Spatial Scalability Profile Video
  • MP4_MPEG2_HIGH_VIDEO_TYPE β€” MPEG-2 High Profile Video (HDTV)
  • MP4_MPEG2_442_VIDEO_TYPE β€” MPEG-2 442 Profile Video (Studio)
  • MP4_MPEG4_VIDEO_TYPE β€” MPEG-4 Video
  • MP4_JPEG_VIDEO_TYPE β€” JPEG stills or motion JPEG
  • MP4_PRIVATE_VIDEO_TYPE β€” User private type

like hello, look at that lineup 😭 it's a whole roster. MPEG-2 really said "I contain multitudes" with all those profiles, and we love that for it. πŸ‘‘


✨ SEE ALSO ✨

go read these next, bestie, they're the friend group:


🫢 and that's the page!! brought to you by Cisco Systems Inc., Version 0.9, and this whole thing is filed under MP4(3) β€” mwah, periodt, go forth and inspect your tracks πŸ’œπŸŒˆ

πŸ“¦ where this page comes from