Skip to main content

Module video_format

Module video_format 

Source
Expand description

Magic-byte sniffing and MIME mapping for guest video containers.

Constants§

VIDEO_FORMAT_AV1
AV1 bitstream (often in MP4 or WebM; hint only).
VIDEO_FORMAT_MP4
MP4 / ISO BMFF (ftyp).
VIDEO_FORMAT_UNKNOWN
Unknown or not recognized as a supported Oxide video format.
VIDEO_FORMAT_WEBM
WebM / Matroska (EBML).
VIDEO_HTTP_ACCEPT
Accept header for super::capabilities URL fetches (progressive + adaptive).

Functions§

is_likely_non_video_document
MIME types that usually indicate an HTML/JSON error body rather than media.
mime_to_video_format
Map Content-Type to a VIDEO_FORMAT_* constant (for example VIDEO_FORMAT_MP4).
sniff_video_format
Inspect leading bytes to guess container (does not validate full file).
suffix_for_format
File suffix for temp files when saving bytes (.mp4, .webm, …).