Parse Humax 5050C metadata files | Winfred van Kuijk

Parse Humax 5050C metadata files

By • Published: December 31, 2009 • Last updated: January 18, 2010 • Filed in: Tips & tricks


This one is related to the post describing the workflow to transfer and transcode video files from a Humax 5050C.

This time I will describe how I read the metadata that is stored in the .hmt file on the Humax. The most important reason: to show the description of the recorded event.

Humax 5050C details

The Humax 5050C stores video files as single program transport streams (SPTS), and for each recording it also stores a metadata file (.hmt).

The structure of this file is described in great detail on the page where you can also download a Windows tool to  send files from and to the Humax 5050C. It is a highly recommended read if you are interested in the nitty gritty stuff!

Structure of .hmt file

I am not going to describe it in too much detail, for that you should download the PDF from Peter.

In words:

  • The file starts with static information about the date, event that we wanted to record, channel, etc.
  • After this 1 or more events follow. Example: I want to record the program “yes”, but because the recording starts a bit early and stops late, the actual list of events is “no, yes, no, no”. In another case it could be “yes, no”. Etc. So by comparing the first event name with each of the names from this event list, we know which description to pick.
  • Each event contains a description, which is broken up in 1 or more blocks of max 250 bytes.

The high-level structure:

Hex editor tool

It is quite helpful to have access to a Hex editor, the one I used is 0xED. The default Mac calculator tool is also useful, you probably want to set it to Programmer mode.

Download the script

Click to view the complete script, right-click to save (remove the .txt extension).

It is written in Perl. I am not an expert Perl programmer, so it is more pseudo-code than real Perl code. 😉

[Download not found]

Suggestions, thoughts, etc? Let me know and/or leave a comment.

Leave a Reply

« | Home | »