A method for saving HiDef recordings on the 5000T (Difficult)

EEPhil

Number 28
There exists a method for saving HiDef programmes from the FVP-4000T/5000T, but it is complicated.
I am assuming that the method I describe for a 5000T will work on a 4000T, although I'm not sure of the positioning of the USB ports.
I have used a PC running an old version of Windows. Any other operating system should work, although the choice of ftp and DLNA programs will be different.
For brevity I will use "5000T" to mean both the Humax FVP-4000T and FVP-5000T, PC to mean any personal computer whatever the operating system.

This method is based on an idea I had in 2016 that I posted to this forum (see here if interested). For various reasons it wouldn't work in that form and I didn't have a 5000T at the time. As soon as I bought a 5000T I tried this method and it worked.

The actual method is in post 4.
 
Last edited:
Outline

With the FOX/1800T/2000T models it is possible to patch the .hmt sidecar file to trick the Humax into allowing the download of HiDef material. With the 5000T there is no .hmt file. The replacement sidecar file is .hjm. The contents of the .hmt files are well known and are predictable. As a recording proceeds just a few bytes change with time. Saving the recording to a USB drive also only changes a few bytes in the .hmt file.
With the 5000T the majority of the .hjm changes as the recording proceeds and is currently unpredictable. There is a large difference between the .hjm files for encrypted and decrypted programmes. It is therefore impossible to patch the .hjm file to allow downloading of HiDef programmes - at least with our current knowledge. It is also impossible to write files to the recordings area of the internal disk via ftp.

It is possible using the Humax interface to copy StdDef recordings to an external USB drive. It is also possible to copy them back from the USB drive to the recordings area of the internal disk. This gives us a way to proceed.

What we need to do is create a recordings folder on a USB drive, copy encrypted files to it in such a way as to fool the Humax into allowing HiDef to either be copied to the internal disk or streamed. The only way that I have found that this can be done is to mix files from a StdDef recording with the HiDef .ts file. Experimentation has found that the HiDef .ts file must be renamed to fit in with the StdDef sidecar files. Renaming the sidecar files to fit the HiDef name doesn't work. Once the external filestore has been built, the USB drive can be removed from your PC and connected to the Humax. Immediately the files become available to the DLNA server and can be seen (but NOT played) on the Humax. Streaming the file or copying it to the internal disk will decrypt it. However because the sidecar files and the .ts file still don't match it will not be playable on the Humax and will have the wrong name and EPG details.

The next posts go through the method in detail. Chances are I will have not explained something (formatting, ftp & DLNA, most likely) sufficiently well. If someone wants to add information to those parts, please do.
 
Last edited:
What can't be done?

I haven't found a way to return decrypted HiDef programmes back to the Humax to be played through the recordings menu. That means the EPG contents cannot be saved and a bookmark of where you stopped playing isn't saved.
I cannot think of a simple automated way to save multiple HiDef recordings. You will need to manually go through the process for each programme you want to save.
If you want to save HiDef files on a regular basis I would suggest you source an earlier Humax model (FOX/2000T) where the process is far easier!

What can be done then?

A decrypted download of the HiDef programme can be placed on your PC. You could edit it and/or convert it to another format. I use VideoReDo to edit out adverts etc. and use the intelligent copy to create H.264 mp4 files. Either the raw decrypted .ts file or the processed .mp4 can be placed in the Humax download area and played like any other downloaded video.

What do you need?

A PC (Windows or other) connected to the network your Humax is on. The Humax needs to have the ftp server switched on.
-Using the remote: F/Settings/Advanced Settings/File Share/FTP Server/On

You may also want to turn on the media server.
- F/Settings/Advanced Settings/Server Management/Network Server/On

You will have to use ftp as this does not try to decrypt files, Samba may attempt to decrypt some files and the method will not work. I cannot test this as Samba doesn't play nicely with my PC.
You need an external USB disk. A pen drive will do at a pinch providing it is large enough for the files you are saving. A powered external USB drive of say 500GB or more would be ideal. It needs to be formatted in a way both your PC and the Humax understand and does not have a 4GB file limitation (don't use FAT32!). I find NTFS will do the job. The USB device will need to be connected to your PC and later to the Humax. I suggest using the rear port on the Humax. It might be quicker. I am finding that both ports are incredibly slow when writing. Less so for reading.
For your PC you will need an ftp client program. (I use WinSCP). A client program that allows you to download and save files served by the DLNA server on the Humax would be helpful. (I usually use my own bodged program, but have found MediaMonkey* does a good job. It is rumoured that VLC can save network streams but I can't get it to work).
Finally, you will need plenty of patience, lots of time and probably a pen and paper!

(* I have no connection with MediaMonkey and do not guarantee it will work for you. It was the only free (up to a point) client program I could find that works for me. If anyone knows of any others let everyone know.)
 
Last edited:
Preparation: Create an outline filestore on the USB device.

Connect your USB device to the PC and make sure the format is correct. If not consult your PC's documentation and format the USB as NTFS. You may be able to use another format - just make sure it is compatible with your PC and the Humax and the format does not limit the file size to 4GB.
In the top level of the USB drive create the folders .cache .recordings and .recycleBin . I found Windows had a problem with this, but the folders could be created using a command shell.
Image0.gif
Make sure you can see the .recordings folder on the USB drive. If you can't see this check that you can view hidden files on your PC. (You will need to look this up elsewhere as my Windows computer is ancient and I don't have the up-to-date knowledge to help! If you are using a non-Windows PC, I know nothing!)

Method

I shall explain this by means of an example. (Beware there are many images)

I have a HiDef recording of Danger Mouse (recorded 18:07 on 15/6/21) that I want to download and/or save.

Record a short programme in StdDef (or a radio programme). A one minute programme will do. To avoid confusion I use a radio programme usually with a title I wouldn't normally record. For this example I'm using a Radio 5LSX Cricket commentary.

Make sure you know the IP address of your Humax.
- F/Settings/Network Settings/Configure LAN/OK note the IP address.

Using the ftp program connect to your Humax (IP address noted above) using the username anonymous and your email address as the password.
When you first login you should be presented with the following list of folders.

Image11.gif

Select Recordings.
If you see folders with names ending .ts and one of these correponds to any of the files you are interested in go to additional steps.*

Image4.png

Locate the short programme - for the example Cricket_20210615_1934.

Image6.gif

Transfer all the files with this name EXCEPT the .ts to your PC. Locate the HiDef programme you wish to save - example Danger Mouse_20210613_1807.

Image7.gif

Transfer the Danger Mouse_20210613_1807.ts file to your PC. On your PC copy all the Cricket_20210615_1934 files to the .recordings folder on the USB drive along with Danger Mouse_20210613_1807.ts and rename (on the USB drive) Danger Mouse_20210613_1807.ts to Cricket_20210615_1934.ts.

Image9.gif

It might be worth making a note of this renaming - it is possible to download multiple recordings using different short files and it is easy to forget the linkage!
On your Humax, delete the short recording - eg. Cricket R5SX 19:34 on 15/6/21.
- Recordings/Programmes scroll down to Cricket +/Delete/OK (assuming only 1 programme with that name)
or - Recordings/Programmes/Cricket/OK scroll down to the date/time required +/Delete/OK (more than one programme with that name)

Eject your USB drive from your PC and connect it to the Humax.
If you go to the Recordings screen on your Humax you should find the Cricket programme has reappeared. However, it will be unplayable. The programme will also be listed by the DLNA server.
If you have access to a DLNA client program you can stream Cricket_20210615_1934.ts and save it on your PC.

Image15.gif

This "Cricket" file is now the decrypted HiDef Danger Mouse recording.
If you haven't got a DLNA client you can copy the Cricket programme from the USB drive to the internal disk in the Humax. This could take a long time.
- Recordings/Storage/{USB Device}/Cricket/+/Copy/Internal HDD/OK
{USB device} may show up as a second Internal HDD with no programmes listed.

IMG_2847.gif

When the transfer has finished you can eject the USB drive
- F/Media/Video/{USB device}/+/Eject

The programme is NOT playable on the Humax. Go back to your PC and use ftp to transfer the Cricket_20210615_1934.ts from the Humax to your PC a second time. Rename it if you wish. This will be playable on the PC.
If the HiDef programme now plays on your PC, delete the files from the USB drive, delete the Cricket programme from the Humax.

* Additional steps
If the short (StdDef/radio) programme has a folder with name ending .ts your best bet is to record another one instead until you get one that is a file.
If you find the HiDef programme you want to download has a folder with name ending .ts you will need to insert the USB drive into the rear port and save the recording to the USB drive. The recording will still be encrypted but should end up as a file rather than a folder. Eject the USB device from the Humax. Use the .ts file created by this save in place of the ftp copy in the above method. Delete all but the .ts files. Add the short programme files to the .recordings folder and rename the <HiDef file>.ts file as above. Then follow the rest of the procedure.
 
Last edited:
With the 5000T the majority of the .hjm changes as the recording proceeds and is currently unpredictable. There is a large difference between
the .hjm files for encrypted and decrypted programmes.
In encrypted files, small changes in the payload data produce large changes in the encrypted form. Therefore I propose the .hjm is encrypted.

So, in summary: you are replacing the .ts of a streamable StDef recording with the .ts of a non-streamable HiDef recording, which is sufficient to fool the DLNA system into streaming the HiDef .ts. Neat (and another own goal by Humax).
 
Last edited:
Therefore I propose the .hjm is encrypted.
It’s slightly more complicated. If you go back to the early conversations about the 4000T someone had discovered the first n bytes were the same for all .hjm files. I think there were then some that were the same for all StdDef and ditto HiDef and then a complete dog’s dinner. The “dinner” is encrypted or possibly compressed and encrypted. I suspect the .hjm file corresponds to a class or structure in some programming language and the members of the class are individually encrypted.
Edit: I'd go further. I suspect the .hjm is a JSON file describing a class/structure "hjm" in a programming language.
 
Last edited:
someone had discovered the first n bytes were the same for all .hjm files.
Sure, but encryption generally proceeds in blocks, so it is reasonable the first block or three are invariant if the data is invariant.
 
What's in the folder in such circumstances?
Impossible to tell, the contents of the folder are not accessible from ftp.
What causes that? Series recording perhaps?
I think, but I don't know for sure, it's the same as for the 2000T. On the 2000T, if you rewind the live viewing and press record the recording goes into a .ts folder in chunks. Somewhere I posted about how to dechunk a file (copy/b chunk.1+chunk.2+chunk.3 <filename>.ts). With the 5000T every instant recording
seems to record from when you first switched to the channel (if < 2 hours) - so I suspect all or some of these types of recordings are going into folders.
 
Sure, but encryption generally proceeds in blocks, so it is reasonable the first block or three are invariant if the data is invariant.
Good point! But if I assume (with no good reason) that the .hjm is some form of encrypted/compressed .hmt file then large parts of that - especially the filename - would remain the same. I see no evidence for that.
 
the contents of the folder are not accessible from ftp.
Have you tried poking at it with command line FTP, to see whether it generates an error code or whether it just shows an empty directory?
Windows GUI is remarkably stupid sometimes. Maybe it doesn't like the .ts extension in a similar way that it can't create folders starting with a '.' character.
 
Have you tried poking at it with command line FTP, to see whether it generates an error code or whether it just shows an empty directory?
"No such file or directory". WTF - I can see the damned thing!
My Unix/Linux knowledge is a bit rusty but it looks as though the directory is owned by 0 (root?) - but so is every file in the recordings area. All permissions except for group access are not set. Group has read and execute set (Octal 0050). A normal .ts file has owner 0, pemissions owner:RW, Group:R, Other:R.
 
"No such file or directory". WTF - I can see the damned thing!
That's just programmer stupidity where "can't access" automatically means "doesn't exist", and they seem to forget that access permissions factor in and can't be bothered to decode to the correct error message. See that lots in various things.
Group has read and execute set
Odd.
 
But if I assume (with no good reason) that the .hjm is some form of encrypted/compressed .hmt file then large parts of that - especially the filename - would remain the same. I see no evidence for that.
It would only take a difference in one variable-length data field to alter every block from there to the end of the file.
 
It would only take a difference in one variable-length data field to alter every block from there to the end of the file.
Woolly thinking on my part! I was thinking of an encrypted .hmt being converted to .hjm. In which case our knowledge suggests (probably only because the original person describing the file - raydon? - gave string lengths) fixed length “variables”. If hjm is a structure in a high level language then variable length terms are highly likely. I use them all the time . Doh!
I don’t have the time or inclination to try harder to decipher the hjm file. We’ll just have to make do!
 
Perhaps it's some sort of encrypted JSON, which could give the effects described, and is more likely given its vintage. Maybe that's what the j stands for.
 
I don’t have the time or inclination to try harder to decipher the hjm file. We’ll just have to make do!
Agreed, I think the method you've come up with is likely to be the best you can do (and it's a bonus that it works at all). If the .hjm is indeed encrypted, there is no progress that could be made until a means is found to decrypt it (tough job, little chance of success, too little benefit to be worthwhile).
 
Back
Top