API / Minn\Media\Av / Asf

Asf final class

Minn\Media\Av\Asf · public/minn/src/Minn/Media/Av/Asf.php · 182 lines

Advanced Systems Format files (WMV, WMA, ASF) as the reference's media reader measures them (probe media-meta). The file properties give the playing time (less the preroll) and creation date; each stream's properties its size or wave format; the codec list the names; the stream bitrates the bitrate, the file's being their sum. A video file with no audio still describes an empty ASF audio stream.

Uses 1
Used by 1

Constants and properties

privateHEADER = '3026b2758e66cf11a6d900aa0062ce6c'
privateFILE_PROPERTIES = 'a1dcab8c47a9cf118ee400c00c205365'
privateSTREAM_PROPERTIES = '9107dcb7b7a9cf118ee600c00c205365'
privateSTREAM_BITRATES = 'ce75f87b8d46d1118d82006097c9a2b2'
privateCODEC_LIST = '4052d1861d31d011a3a400a0c90348f6'
privateAUDIO = '409e69f84d5bcf11a8fd00805f5c442b'
privateVIDEO = 'c0ef19bc4d5bcf11a8fd00805f5c442b'
privateEPOCH = 11644473600

Seconds between 1601, where a Windows file time starts, and 1970.

Public

staticdetects(string $head): bool#

Whether a file's first bytes are an ASF header object.

staticread(Minn\Media\Av\Source $source): array#

The file's analysis.

@return array<string, mixed>

Internals 4

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatebitrates(string $body): array#

Each stream's bitrate by its number.

@return array<int, int>
privatecodecs(string $body): array#

The codec list's first video and first audio name.

@return array{video?: string, audio?: string}
privatevideo(string $specific, int|float|null $bitrate, ?string $name): array#

A video stream's size and its codec's name.

@return array<string, mixed>
privateaudio(string $format, ?string $name): array#

An audio stream described by its wave format and its codec's name.

@return array<string, mixed>