MP4(3)

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

πŸ’– MP4(3) πŸ’–

okay bestie, welcome to the MP4 File Format Library manual, section 3, page MP4(3) πŸŽ€ this one's short, sweet, and honestly kinda niche, but you're gonna slay it. no cap.


🌸 NAME 🌸

MP4SetVideoProfileLevel β€” sets the minimum MPEG-4 video profile and level required to render the contents of the file ✨

like... it's the vibe gatekeeper of your video. it says "you need at least this much MPEG-4 to even look at this file." πŸ’…


✨ SYNTAX ✨

#include <mp4.h>

bool MP4SetVideoProfileLevel(
        MP4FileHandle hFile,
        u_int8_t profileLevel
)

yep, that's the whole thing. two arguments. very demure, very mindful. 🧚


πŸŽ€ ARGUMENTS πŸŽ€

  • hFile β€” specifies the mp4 file to which the operation applies. like, which file are we doing this to, bestie? that one. 🫢
lowkey noticing the original lists only hFile here and not profileLevel?? okay so we're just not gonna talk about it. moving on. πŸ™ˆ

🫢 RETURN VALUES 🫢

  • Upon success, true (1). πŸ₯³
  • Upon an error, false (0). 😭

that's it. one bit of emotional whiplash. iconic.


πŸ‘‘ DESCRIPTION πŸ‘‘

MP4SetVideoProfileLevel sets the minimum profile/level of MPEG-4 video support necessary to render the contents of the file. it's literally telling the world "hey, you need this much decoder to play me." no more, no less. πŸ”₯

ISO/IEC 14496-1:2001 MPEG-4 Systems defines the following values, and bestie you will be memorizing these, sorry, I don't make the rules:

  • 0x00 β€” Reserved πŸ’€
  • 0x01 β€” Simple Profile @ Level 3
  • 0x02 β€” Simple Profile @ Level 2
  • 0x03 β€” Simple Profile @ Level 1
  • 0x04 β€” Simple Scalable Profile @ Level 2
  • 0x05 β€” Simple Scalable Profile @ Level 1
  • 0x06 β€” Core Profile @ Level 2
  • 0x07 β€” Core Profile @ Level 1
  • 0x08 β€” Main Profile @ Level 4
  • 0x09 β€” Main Profile @ Level 3
  • 0x0A β€” Main Profile @ Level 2
  • 0x0B β€” N-Bit Profile @ Level 2
  • 0x0C β€” Hybrid Profile @ Level 2
  • 0x0D β€” Hybrid Profile @ Level 1
  • 0x0E β€” Basic Animated Texture @ Level 2
  • 0x0F β€” Basic Animated Texture @ Level 1
  • 0x10 β€” Scalable Texture @ Level 3
  • 0x11 β€” Scalable Texture @ Level 2
  • 0x12 β€” Scalable Texture @ Level 1
  • 0x13 β€” Simple Face Animation @ Level 2
  • 0x14 β€” Simple Face Animation @ Level 1
  • 0x15-0x7F β€” Reserved 🚫
  • 0x80-0xFD β€” User private 🀫
  • 0xFE β€” No audio profile specified
  • 0xFF β€” No audio required
not me reading 0xFE and 0xFF in a video profile function and going "...audio??" πŸ’€ yes bestie, that's genuinely what it says. the spec said what it said. we don't question the spec. πŸ™ˆ

🌈 SEE ALSO 🌈

go read those too, they're the sibling energy to this one πŸ¦‹


and that's the whole page, bestie!! brought to you by Cisco Systems Inc., Version 0.9 β€” yeah, 0.9, she's a little vintage, we love her anyway πŸ’œ mwah, go set some profile levels, you're doing amazing sweetie βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from