Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Vanilagy/mediabunny/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Mediabunny provides comprehensive codec support through type definitions and constants for video, audio, and subtitle formats.Types
MediaCodec
Union type of all known media codecs (video, audio, and subtitle).VideoCodec
Union type of all known video codecs.'avc'- H.264/AVC'hevc'- H.265/HEVC'vp9'- VP9'av1'- AV1'vp8'- VP8
AudioCodec
Union type of all known audio codecs.- Compressed codecs:
'aac','opus','mp3','vorbis','flac','ac3','eac3' - PCM codecs:
'pcm-s16','pcm-s16be','pcm-s24','pcm-s24be','pcm-s32','pcm-s32be','pcm-f32','pcm-f32be','pcm-f64','pcm-f64be','pcm-u8','pcm-s8','ulaw','alaw'
SubtitleCodec
Union type of all known subtitle codecs.'webvtt'- WebVTT subtitles
Constants
VIDEO_CODECS
List of known video codecs, ordered by encoding preference.AUDIO_CODECS
List of known audio codecs, ordered by encoding preference.PCM_AUDIO_CODECS
List of known PCM (uncompressed) audio codecs, ordered by encoding preference.NON_PCM_AUDIO_CODECS
List of known compressed audio codecs, ordered by encoding preference.SUBTITLE_CODECS
List of known subtitle codecs, ordered by encoding preference.Codec details
Video codecs
avc (H.264/AVC)
avc (H.264/AVC)
Advanced Video Coding, widely supported baseline codec. Good for compatibility.Encoding preference: 1st (highest)
hevc (H.265/HEVC)
hevc (H.265/HEVC)
High Efficiency Video Coding. ~40% more efficient than AVC.Encoding preference: 2nd
vp9
vp9
VP9 codec. Similar efficiency to HEVC, commonly used for web video.Encoding preference: 3rd
av1
av1
AV1 codec. ~60% more efficient than AVC, royalty-free.Encoding preference: 4th
vp8
vp8
VP8 codec. Slightly less efficient than AVC.Encoding preference: 5th (lowest)
Audio codecs
Compressed audio codecs
Compressed audio codecs
- aac: Advanced Audio Coding, widely supported
- opus: Modern codec optimized for interactive speech and music
- mp3: MPEG-1 Audio Layer 3, legacy but universally supported
- vorbis: Open-source alternative to AAC
- flac: Free Lossless Audio Codec
- ac3: Dolby Digital (AC-3)
- eac3: Enhanced AC-3 (Dolby Digital Plus)
PCM audio codecs
PCM audio codecs
Uncompressed pulse-code modulation formats:
- pcm-s16/pcm-s16be: 16-bit signed (little/big endian)
- pcm-s24/pcm-s24be: 24-bit signed (little/big endian)
- pcm-s32/pcm-s32be: 32-bit signed (little/big endian)
- pcm-f32/pcm-f32be: 32-bit float (little/big endian)
- pcm-f64/pcm-f64be: 64-bit float (little/big endian)
- pcm-u8: 8-bit unsigned
- pcm-s8: 8-bit signed
- ulaw: μ-law encoding
- alaw: A-law encoding