Functions | |
| Generator[int] | find_box (bytes mp4_bytes, bytes target_type, int box_start=0) |
| int | find_moov (BufferedIOBase mp4_io) |
| str | get_codec_string (bytes mp4_bytes) |
| bytes | read_init (BufferedIOBase bytes_io) |
| bytes | transform_init (bytes init, Orientation orientation) |
Variables | |
| tuple | FLIP = (ONE32 + ZERO32 + ZERO32) + (ZERO32 + NEGONE32 + ZERO32) |
| tuple | MIRROR = (NEGONE32 + ZERO32 + ZERO32) + (ZERO32 + ONE32 + ZERO32) |
| string | NEGONE32 = b"\xff\xff\x00\x00" |
| string | ONE32 = b"\x00\x01\x00\x00" |
| tuple | ROTATE_180 = (NEGONE32 + ZERO32 + ZERO32) + (ZERO32 + NEGONE32 + ZERO32) |
| tuple | ROTATE_LEFT = (ZERO32 + NEGONE32 + ZERO32) + (ONE32 + ZERO32 + ZERO32) |
| tuple | ROTATE_LEFT_FLIP = (ZERO32 + NEGONE32 + ZERO32) + (NEGONE32 + ZERO32 + ZERO32) |
| tuple | ROTATE_RIGHT = (ZERO32 + ONE32 + ZERO32) + (NEGONE32 + ZERO32 + ZERO32) |
| tuple | ROTATE_RIGHT_FLIP = (ZERO32 + ONE32 + ZERO32) + (ONE32 + ZERO32 + ZERO32) |
| tuple | TRANSFORM_MATRIX_TOP |
| string | XYW_ROW = ZERO32 + ZERO32 + b"\x40\x00\x00\x00" |
| string | ZERO32 = b"\x00\x00\x00\x00" |
Utilities to help convert mp4s to fmp4s.
| Generator[int] homeassistant.components.stream.fmp4utils.find_box | ( | bytes | mp4_bytes, |
| bytes | target_type, | ||
| int | box_start = 0 |
||
| ) |
Find location of first box (or sub box if box_start provided) of given type.
Definition at line 16 of file fmp4utils.py.
| int homeassistant.components.stream.fmp4utils.find_moov | ( | BufferedIOBase | mp4_io | ) |
Find location of moov atom in a BufferedIOBase mp4.
Definition at line 149 of file fmp4utils.py.
| str homeassistant.components.stream.fmp4utils.get_codec_string | ( | bytes | mp4_bytes | ) |
Get RFC 6381 codec string.
Definition at line 37 of file fmp4utils.py.
| bytes homeassistant.components.stream.fmp4utils.read_init | ( | BufferedIOBase | bytes_io | ) |
Read the init from a mp4 file.
Definition at line 163 of file fmp4utils.py.
| bytes homeassistant.components.stream.fmp4utils.transform_init | ( | bytes | init, |
| Orientation | orientation | ||
| ) |
Change the transformation matrix in the header.
Definition at line 201 of file fmp4utils.py.
| tuple homeassistant.components.stream.fmp4utils.FLIP = (ONE32 + ZERO32 + ZERO32) + (ZERO32 + NEGONE32 + ZERO32) |
Definition at line 180 of file fmp4utils.py.
| tuple homeassistant.components.stream.fmp4utils.MIRROR = (NEGONE32 + ZERO32 + ZERO32) + (ZERO32 + ONE32 + ZERO32) |
Definition at line 179 of file fmp4utils.py.
| string homeassistant.components.stream.fmp4utils.NEGONE32 = b"\xff\xff\x00\x00" |
Definition at line 174 of file fmp4utils.py.
| string homeassistant.components.stream.fmp4utils.ONE32 = b"\x00\x01\x00\x00" |
Definition at line 173 of file fmp4utils.py.
| tuple homeassistant.components.stream.fmp4utils.ROTATE_180 = (NEGONE32 + ZERO32 + ZERO32) + (ZERO32 + NEGONE32 + ZERO32) |
Definition at line 178 of file fmp4utils.py.
| tuple homeassistant.components.stream.fmp4utils.ROTATE_LEFT = (ZERO32 + NEGONE32 + ZERO32) + (ONE32 + ZERO32 + ZERO32) |
Definition at line 177 of file fmp4utils.py.
| tuple homeassistant.components.stream.fmp4utils.ROTATE_LEFT_FLIP = (ZERO32 + NEGONE32 + ZERO32) + (NEGONE32 + ZERO32 + ZERO32) |
Definition at line 182 of file fmp4utils.py.
| tuple homeassistant.components.stream.fmp4utils.ROTATE_RIGHT = (ZERO32 + ONE32 + ZERO32) + (NEGONE32 + ZERO32 + ZERO32) |
Definition at line 176 of file fmp4utils.py.
| tuple homeassistant.components.stream.fmp4utils.ROTATE_RIGHT_FLIP = (ZERO32 + ONE32 + ZERO32) + (ONE32 + ZERO32 + ZERO32) |
Definition at line 183 of file fmp4utils.py.
| tuple homeassistant.components.stream.fmp4utils.TRANSFORM_MATRIX_TOP |
Definition at line 185 of file fmp4utils.py.
Definition at line 175 of file fmp4utils.py.
| string homeassistant.components.stream.fmp4utils.ZERO32 = b"\x00\x00\x00\x00" |
Definition at line 172 of file fmp4utils.py.