Last active
December 15, 2023 07:35
-
-
Save GrahamCobb/0e8c854eb75e5b00f353 to your computer and use it in GitHub Desktop.
Humax HDR Recorders file formats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This Gist is a place to maintain the community information about the internal file formats of the Humax HDR range of video recorders. | |
Credits | |
======= | |
The bulk of this data was researched and published by raydon, based on the HDR-FOX T2. | |
Additional info from EEPhil: http://hummy.tv/forum/threads/some-linux-utilities-to-work-with-the-humax.5737/#post-75172 | |
EN 300 468 Annex A.2 string formats added by Graham Cobb | |
Updated genre code listing by raydon: http://hummy.tv/forum/threads/some-linux-utilities-to-work-with-the-humax.5737/page-3#post-78460 | |
Update EventID location update by af123: http://hummy.tv/forum/threads/some-linux-utilities-to-work-with-the-humax.5737/page-3#post-78503 | |
[Please add your name here if you add additional information] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Offset Size Content | |
------ ----- ---------------------------------- Header Block, Size 0x1004 (4100) bytes --------------------------------------------- | |
0x0000 2 byte 0x1701 Constant. | |
0x0000 126 byte All Nulls.Constant | |
------ ----- ---------------------------------- This next part is rewritten when playback completes/pauses | |
It seems to contain information about the recording | |
0x0080 string 254 byte max Recording file path e.g. "/media/sda1/My Video/" (not needed when creating hmt) | |
0x017F string 256 byte max Recording date-extended file name e.g. "The One Show_21010816_1817" | |
0x0280 4 byte 0x11223344 Recording start time (Epoch format) | |
0x0284 4 byte 0x11223344 Recording end time (Epoch format) | |
0x0288 4 bytes 81 23 00 00 Length of recording (Epoch format) 32-bit byte swapped | |
0x028C 1 byte 02 Recording 00=zero length, 01=loss of power, 02=valid, 03=scrambled, 04=failed 05,06,07,08=loss of power (Play?) | |
0x028D 1 byte 0x00 Flags byte. | |
bit 2 00000100 'Locked' flag. 1 = Locked. | |
bit 3 00001000 'New/Viewed' flag. 0 = New. 1 = Viewed | |
0x028E 1 byte 0x00 Flags byte. | |
bit 0 00000001 On-Disk Encrypted flag. 1 = Encrypted. 0 = Decrypted | |
bit 1 00000010 Thumbnail exists flag. 1 = Yes. 0 = No | |
bit 2 00000100 Recording Failed - loss of power (Can't play) | |
bit 3 00001000 File Deleted by autodelete function - do you want to delete the ghost file | |
0x0290 1 byte 00 Failed recording code, 00=OK, 01=Disk Was Full, 02=Conflicted with another recording, 03=Maximum number of files per folder reached, 04=Recording (less than 30s) may not be stored, 05=loss of signal | |
0x0294 4 bytes 0x44332211 Played time in seconds. (Used by resume). 0x00 if unplayed or played to end. | |
0x0298 1 byte 0x00 Bookmark count | |
0x029A string 48 chars max. Program name for Media List. | |
0x031C 4 bytes Start of bookmark table. Maximum 32 x 4 byte entries (seconds from start). | |
------ ----- ---------------------------------- End of the part rewritten after playback, with information about the recording | |
The remainder seems to contain information about the content | |
0x03DC 1 byte 0x00 Flags byte. | |
bit 1 00000010 'Encrypted' flag. 1 = Encrypted. Used to determine if decryption on copy to USB is allowed. | |
bit 2 00000100 'Copy Allowed' flag. 1 = copy allowed. (If zero, Number of allowed copies is in offset 0x431) | |
0x03E0 2 byte 0xFF00 'Guide' flag for Media List.0xFF00 = Guide off. 0x0101 = Guide on. | |
0x03E2 1 byte 0x15 EN 300 468 Annex A.2 String header (only if guide is on). | |
0x03E5 string 74 chars max. Guide text for Media list.(only if guide is on). | |
0x0431 1 byte 0x00 Number of copies allowed when Unlimited Copies' flag is zero in 0x3DC | |
0x0434 2 byte 0x22110 | |
0x0458 4 byte 0x44332211 Channel number. | |
0x045C 1 byte 0x15 String header. | |
0x045D string 42 chars max. Channel name. | |
0x0488 2 byte 0x2211 Service ID (SID). | |
0x048A 2 byte 0x2211 Transport Stream ID (TSID). | |
0X048C 2 byte 0x2211 Originating Network ID (ONID). | |
0x048E 2 byte 0x2211 Program Map Table (PMT) PID. | |
0x0490 2 bytes 0x2211 Video PID. | |
0x0493 1 byte 0x20 Constant. | |
0x0494 2 bytes 0x2211 Video PID. | |
0x0498 1 byte 0x11 Video Type MPEG2=0x01, H264=0x02. | |
0x049C 2 bytes 0x2211 Audio PID. | |
0x04A0 1 byte 0x00 Audio Type MPEG=0x01 AC3=0x03 AAC=0x07. | |
0x04A5 1 byte 0x20 Constant. | |
0x04AD 1 byte 0x20 Constant | |
0x04B8 1 byte 0x01 Constant?? | |
0x04BC 1 byte 0x00 Video type flag for Media list. 0x01 = SD. 0x02 = HD. | |
0x04C0 1 byte 0x01 Constant ?? | |
0x04C4 1 byte 0xFF Constant ?? | |
0x04F8 4 byte 0x44332211 Program scheduled start date & time (Epoch format). | |
0x04FC 4 bytes 0x44332211 Program scheduled duration. (seconds). | |
0x0514 1 byte 0x00 Program genre code. (see table) | |
0x0516 1 byte 0x10 EN 300 468 Annex A.2 String header. | |
0x0517 string 50 byte max. Program Name for Guide & iPlate. | |
0x0616 1 byte 0x10 EN 300 468 Annex A.2 String header. | |
0x0617 string 254 byte max. Program synposis text for Media list. | |
0x0716 2 bytes 0x2211 EPG data - Event ID | |
0x073A 1 byte 0x00 'AC3' Flag. 0x00 = MPEG. 0x01=AC3. | |
0x073B 2 bytes 0xFF00 'Guide' flag for iPlate. 0xFF00 = Guide off. 0x0101 = Guide on. | |
0x073D 3 bytes 0x656E67 ISO 639 language code (only if guide is on). | |
0x0740 1 byte 0x00 Constant | |
0x0741 1 byte 0x15 EN 300 468 Annex A.2 String header(only if guide is on). | |
0x0742 string 74 chars max. Guide text for iPlate.(only if guide is on). | |
0x0798 128 byte Data block. Purpose unknown. Contains data block common to all HMT files. | |
---------------------------------------------------------------------------------------------------------------------------------- | |
0x1000 4 byte 0x44332211 Number of EPG Blocks following | |
------ ----- ---------------------------------- EPG Header List Block, Size 8188 bytes (starts at 0x1004) --------------------- | |
0x0000 32 byte blocks Copy of 32 byte header from EPG blocks following. One entry for each EPG block. | |
0x0020 | |
0x0040 Next EPG block header (if any) | |
------ ----- ---------------------------------- EPG Block type 02, Size 704 bytes,including 32 byte header (starts at 0x3000)-- | |
++++++ Start of 32 byte header +++++++++ | |
0x0000 4 byte 0x02000000 | |
0x0004 4 byte 0x00000000 Time in seconds from start of recording to change the iPlate info to this EPG block | |
0x0008 4 byte 0x00300000 12288. Byte Offset to start to EPG block.(increments by 704 for each EPG entry. | |
0x000C 4 byte 0xA0020000 | |
0x0010 16 byte Unused | |
++++++ End of 32 byte header ++++++++++ | |
0x0020 4 byte 0x44332211 Program scheduled start date & time (Epoch format). | |
0x0024 4 bytes 0x44332211 Program scheduled duration. (seconds). | |
0x0028 1 byte 0x04 | |
0x003C 1 byte 0x11 Program genre code. (see table) | |
0x003E 3 byte 0X106937 String Header. | |
0x0041 string Program name for EPG. | |
0x013E 3 byte 0X106937 String Header. | |
0x0141 string 252 byte max. Program synposis text for iPlate. | |
0x0262 1 byte 0x11 Flag | |
0x0263 2 byte 0xFF00 Guide flag. 0xFF00 = Guide off. 0x0101 = Guide on. | |
0X0265 string 0x656E67 "eng". Language for guide text. | |
0x0268 1 byte 0x00 Null terminator for string. | |
0x0269 3 byte 0x106937 String header.(only if guide is on) | |
0x026A string 74 chars max. Guide text for iPlate.(only if guide is on) | |
0x02BC 4 byte 0xC0320000 12288 + 704. Byte offset to start of next EPG block. | |
Genre Code Table | |
---------------- | |
0x00 = Unclassified | |
0x10 = Movie | |
0x20 = News and Factual | |
0x30 = Entertainment | |
0x40 = Sport | |
0x50 = Children's | |
0x60 = Entertainment | |
0x70 = News and Factual | |
0x80 = News and Factual | |
0x90 = Education | |
0xA0 = Lifestyle | |
0xB0 = Unsupported | |
0xC0 = Unsupported | |
0xD0 = Unsupported | |
0xE0 = Unsupported | |
0xF0 = Drama | |
File analysis by raydon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MPEG2 - 32 byte entries | |
Offset Purpose Value | |
-------------------------------------------------------------------------------------------------------------- | |
0x00 3 bytes Offset from Seq. header to current frame. Address of this frame minus address of Sequence header. | |
0x03 1 byte Frame Type 0x01 = I-Frame, 0x02 = P-Frame, 0x03 = B-Frame. | |
0x04 1 byte SD/HD flag 0x20 = SD. | |
0x05 1 byte Picture sequence frame count 0 to 12 (13 frames) for first count only, then 3 to 14 (12 frames) after that. | |
0x06 2 byte Offset from Seq. header to first frame. Address of first frame in Sequence minus address of Sequence header. | |
0x08 8 bytes Picture header address. Address of this frame. | |
0x10 4 bytes Presentation TimeStamp (PTS) The first 32 bits of PES PTS. | |
0x14 4 bytes Frame size. Address of next frame minus address of this frame. | |
0x18 4 bytes Played Time Played time in milliseconds. | |
0x1C 4 bytes Unused N/A | |
H264 - 64 byte entries | |
Offset Purpose Value | |
-------------------------------------------------------------------------------------------------------------- | |
0x00 3 bytes Offset from PicParamSet to current SEI. Address of SEI preceding current frame minus address of last PicParamSet. | |
0x03 1 byte Frame Type 0x01 = I-Frame, 0x02 = P-Frame, 0x03 = B-Frame. | |
0x04 1 byte HD Flag 0x30 = HD. | |
0x05 1 byte Picture sequence frame count. Starts at zero for first count only, then starts at 1 after that. Consequently the last 0x08 entry of each count sequence contains the address of first SEI of the next sequence. | |
0x06 2 bytes Offset from PicParamSet to first SEI. Address of first SEI in sequence minus address of last PicParamSet. | |
0x08 8 bytes SEI address. Address of SEI preceding the frame. | |
0x10 4 bytes Presentation TimeStamp (PTS) The first 32 bits of PES PTS. | |
0x14 4 bytes Frame size. Address of the AUD immediately after frame minus address of SEI preceding the frame. | |
0x18 4 bytes Played Time. Played time in milliseconds for timebar display. | |
0x1C 4 bytes Unused N/A | |
0x20 4 bytes HeaderEndSize Address of SEI minus address of last SeqParamSet | |
0x24 4 bytes ExtDistance Address of last PicParamSet minus address of last SeqParamSet | |
0x28 24 bytes Unused N/A | |
All values are in reverse byte order (little endian) | |
File analysis by raydon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment