• The forum software that supports hummy.tv will be upgraded to XenForo 2.3 on Wednesday the 20th of November 2024 starting at 7pm

    There will be some periods where the forum is unavailable, please bear with us. More details can be found in the upgrade thread.

crashing and green screen

thanks - it's probably around 200 to 250 recordings! I will try installing sidecar and see how I get on.
Shrink saves a few percent of a .ts file's space on the disk... but removes any possibility of sidecar reconstruction.
@Tik33
In post #115 you were attempting to shrink all the recordings in the "kids" folder. If you were successful in achieving that then you will need a different strategy to using sidecar for those.
 
You would, naturally, back up any existing sidecar files and delete them before running sidecar.
Yes, but backing up the hmt files is not that easy from the webif and the OP likes to have a step by step guide which is more than I'll try since I only have phone for access this week!

The copy and paste suggestion was a way to use sidecar to retrieve the programme title and using it for renaming without the need to remove the existing hmt files first.
 
hi everyone
back from holiday and giving this another go!
I have installed the sidecar package.
I wasn't sure what to do next so I did the following:

  1. I picked a file where the .ts file has been renamed with the description not the title.
  2. I used the opt+ function on the webif and went to 'sidecar files'
  3. Under 'show .ts info' I can see the following
Code:
/media/My Video/(1927) Fritz Lang's hugely influential d.ts
Duration 11459 seconds.
Format SD MPEG, 720 x 576i.
Video ID $05DD.
Audio ID $05DE, Type MPEG.
Audio Desc ID $05DF, Type MPEG.
Sub-titles ID $05FB.
PMT ID $05DC.
Prog ID $20C1.
Content Mgmt, Encrypt Content: NO.
Transport Stream ID $2005.
Original Network ID $233A.
Event ID $D26B.

Title: Metropolis
Description: (1927) Fritz Lang's hugely influential dystopian sci-fi classic, shown here in a restored version of the near-complete print found in Argentina in 2008. A futuristic city has a dark secret.  [S]
Genre: Movie.

4. I then updated the .hmt file but unfortunately it didn't change the title name.

Should I tick the box to create a new NTS file? or will this wreak havoc?

If I do get this working, is there a way to do this to multiple recordings or will I need to do this one by one?

thanks!
 
.nts isn't relevant to your problem. Did you remove the existing .hmt file first (rename it to something else)?
 
further to this - when I play the recording, and then press 'info' button - the real title comes up (but doesn't from the 'media' browser on the TV)
 
I renamed it manually - seems fine plays fine and shows up in media browser with the renamed title.

Is there anyway to do this automatically?
 
Is there anyway to do this automatically?
The easiest way would be if "queue for sidecar" was added to the sweeper action list, then the user could construct a rule to do it (our equivalent of macro programming).

However, if you are willing to isolate all the recordings you wish to process into a single folder (with nothing else in there), and remove all the .hmt files, it shouldn't be too difficult to write a bash script to run each one through sidecar.

If I were doing this on the Windows command line, it would go something like this:
Code:
for %%x in (*.ts) do sidecar %%x

...but if course you will be using Linux not Windows.
 
...
If I were doing this on the Windows command line, it would go something like this:
Code:
for %%x in (*.ts) do sidecar %%x

...but if course you will be using Linux not Windows.
Not entirely, because OP wants to programmatically rename recordings to match the Title rather than the Description, for which hmt is the correct command-line tool, but Sweeper should be sufficient: something like "if Recording Title doesn't contain %basename, then Rename Recording Files to %title" would work if the recordings are single movies (otherwise include %series, %episode in the new filename and change the test to a pattern match).

For a command-line solution, one has to consider the following points:
  • sidecar doesn't want and hmt doesn't need the .ts extension - the file argument in Windows cmd should be %%~pnx;
  • if sidecar should be relevant, you needed to tell it what to do: -h means make a new .hmt;
  • what if the desired new filename is already in use? what if something goes wrong halfway through renaming the 5 elements (4 files and one hmt field) of a recording?
 
Is there anyway to do this automatically?
Didn't feel like doing the things I really should be doing!

Using Diagnostics file editor create a new file /mod/bin/RestoreName and mark as executable, paste the following
Jim Code:
#!/mod/bin/jimsh
# Restore original filename and title provided recordidng has not been shrunk
source /mod/webif/lib/setup
require system.class ts.class
set file  $argv

set ts [ts fetch $file]
set bfile [file rootname $file]

if {[$ts flag "Shrunk"]} {
        puts "$file has been shrunk - tough luck"
        exit}
set titleln  [exec sidecar -i $bfile | grep Title]
set title [string range $titleln 7 end]

if {$title eq ""} {
        puts "$file has no title - tough luck"
        exit}
set stime [$ts get start]
set ftime [clock format $stime -format "_%Y%m%d_%H%M"]
set newfile "$title$ftime"
# Change special chars to underscore
set newfile [string  map {/ _ \\ _ : _ \" _ \' _ \| _ \; _ \n _ * _} $newfile]
puts "File >$file< Title >$title< Newfilename >$newfile.ts<"
$ts settitle $title
if {$bfile eq $newfile} {exit}
$ts renamegroup $file $newfile

From a command window, switch to the directory containing the video cd "/media/My Video/xxx"
and run
Code:
for fn in *.ts; do echo $fn; RestoreName $fn; done

No guarantees!
 
Not entirely, because OP wants to programmatically rename recordings to match the Title rather than the Description, for which hmt is the correct command-line tool, but Sweeper should be sufficient: something like "if Recording Title doesn't contain %basename, then Rename Recording Files to %title" would work if the recordings are single movies (otherwise include %series, %episode in the new filename and change the test to a pattern match).

For a command-line solution, one has to consider the following points:
  • sidecar doesn't want and hmt doesn't need the .ts extension - the file argument in Windows cmd should be %%~pnx;
  • if sidecar should be relevant, you needed to tell it what to do: -h means make a new .hmt;
  • what if the desired new filename is already in use? what if something goes wrong halfway through renaming the 5 elements (4 files and one hmt field) of a recording?
Err, no - I don't think so. The task is to give the media list title a sensible string, not the filename. The filename is irrelevant. The OP has already trialed sidecar as providing the desired result, it worked when the .hmt file was removed. I assume he clicked the sidecar option in the WebIF OPT+ menu.

I'll accept the point re file extensions, as I have not played around with it and don't know whether the .ts would be acceptable in the input parameter or not, but I was only illustrating (and the convolutions required to remove file extension from parameter passing are not in my immediate vocabulary - they didn't exist in MS-DOS).

MymsMan's solution feels like overkill to me, although it includes some checking etc. Bearing in mind para 1 (and the discourse in posts 165-169), it shouldn't be that hard.
 
Last edited:
be able to play the previous recordings from my old 1TB drive (ideally with the names of the movies/recordings - or I can go through each one and rename it I suppose?).
I don't think the OP ever said they didn't want correct file-names showing in the webif.
My exec fixes both the filename and title and doesn't lose the channel name/number (which happens if you rebuild the hmt) and once the exec is created is more straightforward to use.
 
Err, no - I don't think so. The task is to give the media list title a sensible string, ...
Yes, I was confused by the phrase "updated the .hmt file" in OP's quoted post whereas apparently a new .htm was being created from the EPG data in the .ts file, in which case Sweeper wouldn't be enough and @MymsMan's solution is just right.
 
Last edited:
My exec fixes both the filename and title and doesn't lose the channel name/number (which happens if you rebuild the hmt)...
Cool.
...and once the exec is created is more straightforward to use.
Yes, I agree and it would be useful to package up (and a waste of good work if it isn't).

However, what I meant by "overkill" is in comparison with a quick-and-dirty one-off-use command line that never sees the light of day again.
 
I hope @Tik33 gives the exec a try and it solves his problem
yes, thank you very much for that - I will definitely give it a try. I've been away so just trying to find time so that I can go through it slowly and make sure I get it right. I'm then going to try to sort this out once and for all!
in the meantime, I have installed the 2tb drive into the Humax and with your helpful guide, I have checked decryption and run those tests - it seems fine.

I then wanted to restore my 'backup' which was on my external HDD.
However, those backups all seem to have lost the .hmt files - and so I used Black Hole's very helpful guide and ran sidecar to create a dummy file, then ran decrypt, then I ran sidecar again.
that seems to have worked on the 2 files I have tried it on.
However, it seems to be a very manual, laborious and long process and it appears as though I can't do this other than 1 at a time.
If that is true, is there any way in which I can run the above steps on all of the files automatically? I installed 'sweeper' and then got stuck on how it works!

while i figure out the above, I have also connected the 1tb HDD to the new Humax via Sata & USB and am waiting for it to copy across. (i tried to connect it to my laptop and then to Humax via FTP, but it was transferring at 0.1 mb/s - and telling me I'd have to wait several hundred hours!)

Once that is done, I will then attempt your code and see what happens!

as it happens, I may need it on the restored files too - as they have come across as the below

3989

which is readable, but ever so slightly annoying! although it does seem to be that the title is ok:

Code:
/media/My Video/12 Years a Slave_20161102_2059.ts
Duration 10258 seconds.
Format SD MPEG, 720 x 576i.
Video ID $05DD.
Audio ID $05DE, Type MPEG.
Audio Desc ID $05DF, Type MPEG.
Sub-titles ID $05FB.
PMT ID $05DC.
Prog ID $20C1.
Content Mgmt, Encrypt Content: NO.
Transport Stream ID $2005.
Original Network ID $233A.
Event ID $D63F.

Title: 12 Years a Slave
Description: (2013) Black Cinema: Oscar-winning drama about slavery in 19th-century America. Starring Chiwetel Ejiofor and Michael Fassbender. Graphic violence/sex/nudity/racist language.  [AD,S]
Guidance: May contain content unsuitable for some viewers
Genre: Movie.

In summary
I'm a bit stuck on the restored files and whether I will need to go through each file individually and once resolved and the other files copied across, I'm hoping that I'll be able to run your code on all the files!

thanks again for all your help
 
Back
Top