IVF容器格式
Extension: ivf
IVF is a simple file format that transports raw VP8 data.
An IVF file begins with a 32-byte header.
The header is followed by a series of frames. Each frame consists of a 12-byte header followed by data.
IVF容器的后綴名是.ivf.
用來(lái)封裝vp8或vp9數(shù)據(jù).
其文件頭32字節(jié)抑堡,頭之后是一幀一幀數(shù)據(jù)摆出,幀數(shù)據(jù)的開(kāi)頭是12字節(jié)的幀頭。
File Header(32 Bytes)
bytes 0-3 signature: 'DKIF'
bytes 4-5 version (should be 0)
bytes 6-7 length of header in bytes
bytes 8-11 codec FourCC (e.g., 'VP80')
bytes 12-13 width in pixels
bytes 14-15 height in pixels
bytes 16-19 frame rate
bytes 20-23 time scale
bytes 24-27 number of frames in file
bytes 28-31 unused
舉例:
Frame Header(12 Bytes)
bytes 0-3 size of frame in bytes (not including the 12-byte header)
bytes 4-11 64-bit presentation timestamp
muxing overhead of IVF
假設(shè)ivf文件的大小為ivf_mux_size字節(jié)首妖,其中的數(shù)據(jù)為frame_count幀偎漫,那么muxing overhead是多少?
overhead_size = 32 + 12 * frame_count
raw_data_size = ivf_mux_size - overhead_size
muxing_overhead = overhead_size/raw_data_size