Expand description
CA_VP8 are a custom version of a VP8 video by CA. These files contain only video data, no audio.
Within this module are functions to convert these files into IVF files, readable by tools such FFMpeg, VLC or MPV.
These files can usually be found under the movies folder, with the extension .ca_vp8. This format
is versioned through a version number in the file’s header. This lib supports has support for reading
and writing the versions 0 and 1.
§CA_VP8 Structure
§Header
§V1
| Bytes | Type | Data |
|---|---|---|
| 4 | StringU8 | Signature of the file. |
| 4 | u32 | Version of the file. |
| 4 | u32 | Length of the header. |
| 4 | StringU8 | FourCC of the video. |
| 2 | u16 | Width of the video. |
| 2 | u16 | Heigth of the video. |
| 4 | f32 | Milliseconds per frame. |
| 4 | u32 | Unknown. |
| 4 | u32 | Number of frames - 1. |
| 4 | u32 | Offset of the frame table. |
| 4 | u32 | Number of frames. |
| 4 | u32 | Largest frame. |
| 1 | u8 | Unknown value. |
§V0
| Bytes | Type | Data |
|---|---|---|
| 4 | StringU8 | Signature of the file. |
| 4 | u32 | Version of the file. |
| 4 | u32 | Length of the header - 8. |
| 4 | StringU8 | FourCC of the video. |
| 2 | u16 | Width of the video. |
| 2 | u16 | Heigth of the video. |
| 4 | f32 | Milliseconds per frame. |
| 4 | u32 | Unknown. |
| 4 | u32 | Number of frames. |
| 4 | u32 | Offset of the frame table. |
| 4 | u32 | Number of frames. |
| 4 | u32 | Largest frame. |
§Frames Data
This is valid for versions 0 and 1.
| Bytes | Type | Data |
|---|---|---|
| Frame table’s offset - header length | &[u8] | Frames data, concatenated. |
| Until the end of the file | &[Frame Table Entry] | List of entries with each frame metadata (position, size,…). |
§Frame Table Entry
This is valid for versions 0 and 1.
| Bytes | Type | Data |
|---|---|---|
| 4 | u32 | Offset of the frame from the start of the file. |
| 4 | u32 | Size in bytes of the frame’s data. |
| 4 | u32 | Optional. Unknown value. Only present sometimes. |
| 1 | bool | Is the frame a key frame? |
Credits for this module:
- Research and initial implementation for this was done by John Sirett here:
As such, the read/save functions for CaVp8 and Ivf in the submodules of this module (and only those functions) are an exception to the MIT license above and are under the CC-SA 4.0 license, available here:
Structs§
- Frame
- This struct contains the information needed to locate an specific frame from a video within the raw frame data.
- Video
- This represents an entire CaVp8 File decoded in memory.
Enums§
- Supported
Formats - This enum contains the list of formats this lib supports.
Constants§
- EXTENSION
- Extensions used by CaVp8 Files.