LMLM4: Difference between revisions
Jump to navigation
Jump to search
(details of format) |
(samples link) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
* Company: Linux Media Labs | * Company: Linux Media Labs | ||
* Website: http://www.linuxmedialabs.com/ | * Website: http://www.linuxmedialabs.com/ | ||
* Samples: http://www.linuxmedialabs.com/LML_downloads.php?dl=SA | |||
LMLM4 files are near-raw files, containing MPEG-4 video and MPEG Layer | LMLM4 files are near-raw files, containing [[MPEG-4]] video and [[MPEG-1 Layer II]], [[μ-law]] or [[ADPCM]] audio. | ||
A file contains multiple packets | A file contains multiple packets. Each packet is padded with zeroes to a multiple of 512 bytes (one block). | ||
typedef struct { | typedef struct { | ||
Line 12: | Line 13: | ||
uint32_t packet_size; | uint32_t packet_size; | ||
uint8_t data[packet_size - 8]; | uint8_t data[packet_size - 8]; | ||
uint8_t padding[ | uint8_t padding[ -packet_size & 511 ]; | ||
} LMLM4_Packet; | } LMLM4_Packet; | ||
The maximum size of a packet is 1048576 bytes, which is 2048 blocks. | The maximum size of a packet is 1048576 bytes, which is 2048 blocks. | ||
'''channel_number''', '''frame_type''' and '''packet_size''' are stored in big-endian order. | |||
The following frametypes are supported: | The following frametypes are supported: | ||
Line 23: | Line 26: | ||
0x02 - B-Frame, video | 0x02 - B-Frame, video | ||
0x04 - MPEG-1 Layer 2 audio | 0x04 - MPEG-1 Layer 2 audio | ||
0x05 - | 0x05 - μ-law, audio | ||
0x06 - ADPCM, audio | 0x06 - ADPCM, audio | ||
Latest revision as of 12:59, 5 January 2008
- Extension: LML uses .divx on their website, though there are other file formats that use that, too.
- Company: Linux Media Labs
- Website: http://www.linuxmedialabs.com/
- Samples: http://www.linuxmedialabs.com/LML_downloads.php?dl=SA
LMLM4 files are near-raw files, containing MPEG-4 video and MPEG-1 Layer II, μ-law or ADPCM audio.
A file contains multiple packets. Each packet is padded with zeroes to a multiple of 512 bytes (one block).
typedef struct { uint16_t channel_number; uint16_t frame_type; uint32_t packet_size; uint8_t data[packet_size - 8]; uint8_t padding[ -packet_size & 511 ]; } LMLM4_Packet;
The maximum size of a packet is 1048576 bytes, which is 2048 blocks.
channel_number, frame_type and packet_size are stored in big-endian order.
The following frametypes are supported:
0x00 - I-Frame, video 0x01 - P-Frame, video 0x02 - B-Frame, video 0x04 - MPEG-1 Layer 2 audio 0x05 - μ-law, audio 0x06 - ADPCM, audio
One packet contains a complete decodable frame.