Expand description
LIP binary lip-sync support. LIP binary reader and writer.
LIP files store lip-sync animation keyframes for voiced dialogue. Each keyframe maps a timestamp to a viseme (mouth shape) index.
§Format Layout
+------------------------------+ 0x0000
| Header (16 bytes) |
+------------------------------+ 0x0010
| Keyframe table |
| 5 bytes * entry_count |
+------------------------------+§Header (16 bytes)
0x00..0x04 magic "LIP "
0x04..0x08 version "V1.0"
0x08..0x0C length (f32)
0x0C..0x10 entry_count (u32)§Keyframe Entry (5 bytes)
0x00..0x04 time (f32)
0x04..0x05 shape (u8)Structs§
- Lip
- In-memory LIP container.
- LipKeyframe
- One LIP keyframe entry.
- LipShape
Code - Lossless LIP shape code wrapper.
Enums§
- LipBinary
Error - Errors produced while parsing or serializing LIP binary data.
- LipShape
- Known LIP viseme (mouth shape) IDs.
Functions§
- read_
lip - Reads a LIP file from a reader.
- read_
lip_ from_ bytes - Reads a LIP file directly from bytes.
- write_
lip - Writes a LIP file to a writer.
- write_
lip_ to_ vec - Serializes a LIP file into bytes.