convertfiles 1.0-4: Unable to get status from .hmt file. Cannot continue.

Jon123

New Member
Hello Forum,

Firstly a massive thank you to @raydon and all the numerous contributors to the CF, it's brilliant.

I actually installed the CF back in 2012 and was delighted to have access to the box for retrieving my SD recordings, I then took my eye off the ball for a few years only to revisit again now, so you can imagine my excitement after installing CF 4.1.3 and all the new features.

So onto my question, everything has installed well and I have CH4 HD viewable in freesat mode. I have nowster's patch (nice one!) and with the convertfiles plug-in set to AUTO on boot I can then stream via Mediatomb to a TV in another room (Sony KDL-42W706B) without running the convertfiles the TV will not playback the stream.

However, What I have found (apologies if this has already been discussed) is that the convertfiles fails CH4 HD recordings, (I manually set CH4 HD recording from webif.)

e.g.
convert-ts.log...
Preparing to convert "/media/Video/Amy_20200611_2200.ts".
Unable to get status from .hmt file. Cannot continue.


after some poking around I found it was due to the empty synopsis field in the .hmt file, and to my delight there was a already a tool to fix it (thanks to @adrianf36 and @MofTot for the hmt tool) so I can set any string in the synopsis field and now convertfiles can successfully convert the file.

ssh to box..
Foxsat1/mnt/hd3/Video# hmt -p Amy_20200611_2200.hmt | cut -f2

Foxsat1/mnt/hd3/Video#
Foxsat1/mnt/hd3/Video# hmt +setsynopsis="singer-songwriter Amy Winehouse" Amy_20200611_2200.hmt
Foxsat1/mnt/hd3/Video# hmt -p Amy_20200611_2200.hmt | cut -f2
singer-songwriter Amy Winehouse


convertfiles now works ok !

I see that @Nathan back in 2018 #44 had also experienced this problem. So before I embark on creating a dodgey little script (maybe hook into the convertfiles script) to search and check for empty synopsis field and then populate with a dummy string or even a saved copy of the actual synopsis, would anyone consider fixing this slightly more elegantly ? I know it's a very small thing and the manual work around is dead easy thanks to the hmt tool (Was this why the +setsynopsis option was created ?)

Here's hoping I've posted this in the right place and not repeated something everyone already new....

Thanks and Regards, Jon.
 
Last edited:

Black Hole

May contain traces of nut
Was this why the +setsynopsis option was created ?
No. If you look at the help for the hmt command (just type "hmt" with no parameters), you will see it provides the tools to inspect and alter everything in the .hmt file - not just the synopsis text.
 

MofTot

Member
So before I embark on creating a dodgey little script (maybe hook into the convertfiles script) to search and check for empty synopsis field and then populate with a dummy string or even a saved copy of the actual synopsis, would anyone consider fixing this slightly more elegantly ? I know it's a very small thing and the manual work around is dead easy thanks to the hmt tool (Was this why the +setsynopsis option was created ?)
I added the +setsynopsis option to hmt (well, technically, ported it from the HDR Fox-T2 CFW) in order to handle non-Freesat channel recordings better.

If you install the rs package (Remote Scheduling) and schedule Channel 4 HD (and other non-Freesat channel) recordings via the Remote Scheduling Portal instead of WebIf, rs will automatically populate the .hmt file with the correct synopsis at some point after the recording has finished.

If you want to force this .hmt synopsis population before rs automatically does so, you can call the following from your shell script:
Code:
rs_process now -pr
This does nothing if rs_process already runs (only one instance of rs_process will run at any given time), so you need to ensure that you call it at some point where this isn't already the case. rs_process typically runs every 10 minutes, ie <hour>:00, <hour>:10, <hour>:20 ... <hour>:50. But is sleeps a random number of seconds after starting in order not to swamp the RS Portal with requests at the same time. Also, be aware that rs_process stops immediately if any recording is taking place if you run with the default rs configuration in order not to disrupt the recording (the Foxat-HDR HW is quite weak).

Hope this helps.
 

Black Hole

May contain traces of nut
I added the +setsynopsis option to hmt (well, technically, ported it from the HDR Fox-T2 CFW) in order to handle non-Freesat channel recordings better.
Sorry, I didn't realise this isn't the same hmt executable just with Foxsat tweaks.
 

MofTot

Member
Sorry, I didn't realise this isn't the same hmt executable just with Foxsat tweaks.
No problem, the underlying components and mechanisms are quite different between the two platforms (Foxsat-HDR and HDR Fox-T2), despite being quite similar on the surface.
 
OP
J

Jon123

New Member
Thanks for the super quick response, I have just downloaded the remote scheduling package and registered with the Portal. Just working my way through the comprehensive wiki it all looks very impressive. I'll have a play with it over the next few days.
 
OP
J

Jon123

New Member
Hello,

So I'm all set up with the rs Portal and it's very impressive, you folks have been busy. Thanks for directing me to it, I didn't realise the extent of what lay behind the modestly listed 'rs' package in the Available packages.
I'll certainly be using this from now on. As you rightly said, it solves my missing synopsis issue allowing convertfiles to run successfully and now I don't even need to get off my backside to go downstairs and turn the box on to schedule a recording! unless of course I actually get round to watching any of this stuff...

I've configured a 'Wake-up Power On/Off Window' (06:00-07:30) and an additional 'Schedule->Manual Watch reservation' although will probably turn off the watch reservation and use the rs portal 'Schedule Reboot' option if required.
I did implement a little tweak to avoid the race condition of rs_process and convertfiles startup at boot:
  • Turned convertfiles plug-in setting to Run mode=OFF
  • Copied the convertfiles startup script from init.d to bin, renamed and edited it to remove the delay and run when Run Mode=OFF, so I've got a cmd line option for the recursive convertfiles (and it won't run if I accidentally turn Run Mode to AUTO again in the future when I've forgotten all this).
  • Set up a cron job at 06:30 to run the new recursive convertfiles_cmd (allowing 30 mins for rs_process to do it's magic.)
It seems to work quite nicely so far, a recording from the night before is ready to be streamed after the morning Wake-up window.

Thanks again,
Jon.
 

MofTot

Member
It seems to work quite nicely so far, a recording from the night before is ready to be streamed after the morning Wake-up window.
Pleased to hear you got it working. If you would prefer to have the file converted sooner, right after the .hmt synopsis has been fixed, you could edit /opt/bin/rsrecmon.sh to start the conversion right after the call to
Code:
hmt +setsynopsis="$synopsis" "$basename.hmt"
which obviously you would have to redo if/when the rs package is updated at some point in the future, unless I choose to extend this part with a hook facility.

I assume you only need to call convertfiles to swap the audio streams such that your TV will play the non-AD audio stream? If so, have you had a look at streaming apps you can install on your TV (or on a media stick/box plugged into the TV) in order to avoid the conversion altogether? Or are there settings on your TV/media player through which you could force playback of the right audio stream? Some apps are clever enough to pick the audio stream with the best quality and since the AD stream is typically in MPEG-2 and the non-AD stream typically in AC3, the non-AD stream is selected.

Personally, I use Infuse Pro 4.3.7 on an Apple TV 4 for this purpose and it works well (with a few quirks), but I'm aware that newer versions of this app don't work well with Freesat/Freeview recordings (lots of green artifacts, totally unviewable).
 
OP
J

Jon123

New Member
Thanks for the pointer to rsrecmon.sh, I'll take a look out of interest, but will probably leave this alone in case there is an update.
The SONY Smart TV that doesn't play back the unconverted recordings is about 6 years old now and is a non-Android model and has very few apps of interest. It has a pre-installed media player app which does have some options (including Audio track selection) once playback has started but the unconverted recording fails immediately without playing anything, so perhaps it is due to the other problem that convertfiles fixes regarding the PAT and the invalid Program ID's - which I've just learnt about in the excellent documentation.
 
Top