.nts files

RichT

New Member
I have a 1TB HD attached to my HDR Fox T2. Somehow in moving files a batch of .nts files have been lost. Now the recordings won't play: "Unknown error. Is there any way to add a dummy .nts or other way to play them on the humax? The .ts files will play on a computer.
 

MontysEvilTwin

Well-Known Member
They will play if you delete the corresponding 'hmt' files (or move them to a different directory) but without ff or rewind: you can still skip forwards and backwards.
If you have the custom firmware there is an executable called sidecar which can recreate 'nts' (and 'hmt') files. There is also a standalone version of sidecar for Linux which can be run (much more quickly) on a PC.
EDIT:
There is also a version of sidecar for Windows: see here.
 
Last edited:

Black Hole

May contain traces of nut
They will play if you delete the corresponding 'hmt' files
...provided the .ts has been decrypted, which is not a given if it is HiDef - see Things Every... (click) section 5. However:
The .ts files will play on a computer.
...confirms they are decrypted.

As MontysEvilTwin says, with the custom firmware installed you can rebuild missing sidecar files through the WebIF: Browse Media Files >> Opt+ >> Sidecar Files.
 
Last edited:
OP
R

RichT

New Member
Thanks. Very helpful! I have the custom firmware (very useful) and have just installed Sidecar. But there are 20 1hour episodes missing .nts files, so reinstating one at a time will be a pain! I have Telnet access: is there any Linux command I can use to batch process?

I think removing the .hmt files will be easier!

Thanks for the help.
 

MymsMan

Ad detector
sidecar can be run from the command prompt so if all of the recordings are in a single directory so it should be fairly easy to run a script which would loop through all the recordings and run sidecar -n if the .nts file is missing.

Hopefully someone more proficient at BASH script will provide the magic incantation

edit:
I think this would do the trick
Code:
for f in *.ts; do file=${f%.ts}; echo $file; if [ ! -f "$file.nts" ]; then sidecar -n "$file" ;fi ; done
 
Last edited:

Black Hole

May contain traces of nut
On a very simple level (ie my level!) it's easy enough: use the WebIF >> Diagnostics >> File Editor to write a file comprising all the commands you would put individually on the command line (each one a separate line), prefixed by the magic incantation #!/bin/sh* (on a line on its own, at the start of the file). Save it with a sensible name, and use the editor button to make executable.

If you then run the script inside an abduco session, you will be able to leave it running in the background.

abduco

A problem with running a long process from a Telnet session or the webshell package (a command terminal available as a web page - access via WebIF >> Diagnostics >> Command Line) is that the session inconveniently drops out and terminates any active processes if you take the focus away to do something else. Then you have to reconnect and restart the youtube-dl command, which then has to do its initial thinking before the download resumes...

The command abduco is already available to support other long processes such as fix-disk, and can be used here to create a protected command session which carries on regardless of the terminal session dropping out. So, before launching the main download, use the following to create a protected session:
Code:
# abduco -A yt
This creates a protected session called "yt" (call it what you like), and the next command prompt is within that session. Then start your youtube-dl process as described above. You can now "do other stuff" and the session will carry on regardless - to break out of the session and do other things on the command line, use Ctrl+\.

To come back later, use the same abduco line again. This time, as there already exists a session called "yt", the command connects to it rather than starting a new one.

To close the session (from within the session), type "exit".

To inspect open abduco sessions, type "abduco" (with no other parameters).
* Edit: originally read #!/bin/bash, but that only works if you have bash installed (not necessary).
 
Last edited:

/df

Active Member
...
I think this would do the trick
Code:
for f in *.ts; do file=${f%.ts}; echo $file; if [ ! -f "$file.nts" ]; then sidecar -n "$file" ;fi ; done
In case the file names have spaces, this needs to be quoted as well: ... file="${f%.ts}"; ....
 

/df

Active Member
It doesn't, but you're right. POSIX says that the right-hand side of a variable assignment undergoes "tilde expansion, parameter expansion,
command substitution, arithmetic expansion, and quote removal" but not field splitting. So double-quotes shouldn't be relevant when assigning an expanded value to a variable.
 

Black Hole

May contain traces of nut
Is that a one-line command which doesn't need scripting? If so, it can still be run in an abduco session.

Does having the .ts's on a USB drive alter anything?
 
OP
R

RichT

New Member
As pointed out, Telnet has problems. I use RISC OS, where writing a script is only a few keystrokes. Dropping the script into a Telnet window, a few lines at a time, is simple and works.

But as has also been said, the script should be on the server. But then how do I run it? The custom software doesn't have bash listed. Is there some other similar program?
 

MymsMan

Ad detector
But as has also been said, the script should be on the server. But then how do I run it? The custom software doesn't have bash listed. Is there some other similar program?
Bash is available but it is listed as advanced package which isn't displayed by default (see button on top right of packages page)

I often forget what I have installed over the years, I am not sure how the script I posted would work under the default Ash shell
 

Black Hole

May contain traces of nut
As pointed out, Telnet has problems. I use RISC OS, where writing a script is only a few keystrokes. Dropping the script into a Telnet window, a few lines at a time, is simple and works.

But as has also been said, the script should be on the server. But then how do I run it? The custom software doesn't have bash listed. Is there some other similar program?
Install webshell. That gives you command line access through WebIF >> Diagnostics. No need to install bash if that command line works as is, but you might as well. All you have to do then is open a webshell session, create an abduco session, and fire off the command.

You could do the same through Telnet, I don't know why you think it has problems that abduco can't cure.
 

/df

Active Member
It certainly should work, whether with /bin/sh or the slightly different /mod/bin/busybox/sh that gets installed (and used as sh by default) with the busybox repo package.

In Webshell, you'll get the same choice of shells, ie /bin/sh unless the busybox package is installed. or bash if the bash package is installed and you type bash or have arranged to make it root's default shell.
 
Last edited:
OP
R

RichT

New Member
Sorted. Thanks for all the help. I looked through /bin and found a file sh. I thought that might be a Shell program. So I did cd to the directory concerned where also my shell script was and did sh Spool (the script name). It worked.The script was processed and the files now play properly complete with ad detection and info!

Very easy - when you know how!

I looked online for help on abduco - its incomprehensible, I have no idea what it is or does!
 

Black Hole

May contain traces of nut
did sh Spool
...or you could have added #!/bin/sh at the start of your script in the manner I described.

I looked online for help on abduco - its incomprehensible, I have no idea what it is or does!
:dunno:

The information you needed is quoted in, and linked from, my post (#6), but for some reason you would rather google. Granted it was in the context of running a youtube-dl command, but the principle and instructions apply when appropriately (and obviously) adapted.

abduco

A problem with running a long process from a Telnet session or the webshell package (a command terminal available as a web page - access via WebIF >> Diagnostics >> Command Line) is that the session inconveniently drops out and terminates any active processes if you take the focus away to do something else. Then you have to reconnect and restart the youtube-dl [substitute whatever you want here] command, which then has to do its initial thinking before the download resumes...

The command abduco is already available to support other long processes such as fix-disk, and can be used here to create a protected command session which carries on regardless of the terminal session dropping out. So, before launching the main download, use the following to create a protected session:
Code:
# abduco -A yt
This creates a protected session called "yt" (call it what you like), and the next command prompt is within that session. Then start your youtube-dl [substitute whatever you want here] process as described above. You can now "do other stuff" and the session will carry on regardless - to break out of the session and do other things on the command line, use Ctrl+\.

To come back later, use the same abduco line again. This time, as there already exists a session called "yt", the command connects to it rather than starting a new one.

To close the session (from within the session), type "exit".

To inspect open abduco sessions, type "abduco" (with no other parameters).
 
Last edited:
OP
R

RichT

New Member
Sorry. No slight intended. It's a long story - but you asked...

B preference I use RISC OS on an ARMX6 (Wandboard quad). Although RISC OS is still being developed it is a minority platform. We don't have a browser that supports javascript. To use any forum I go to an old Mac laptop.

In '96 forums didn't exist - we used mailing lists (I have run several and two are still active). I also have forums in general (though this one is an exception). I once tried running a forum - it is a huge effort compared with a mailing list, so even more reason to dislike forums in general.

I don't use Google: duckduckgo and Qwant are more to my taste!

Although RISC OS is limited, what it does it does more efficiently than any other platform. I have been using is since the days when it was the BBC operating system. I started on the www in 1996 and ran our business (4qd co uk - now sold) entirely from RISC OS, having written all the software for it myself. I could write a lot more but if you want more it's probably on my www site(s) - www torrens org (dots removed as forum doesn't allow links - another point agains forums!).
 

Black Hole

May contain traces of nut
(NB: post prepared without using post tools as far as possible - see below)

"dots removed as forum doesn't allow links - another point agains forums!"

No it's not, you're just new around here. If new posters were allowed to post links without a probationary period we would be spammed out of existence. See https://hummy.tv/forum/threads/newbies-guide-to-the-hummy-tv-forum.6114/.

"I don't use Google"

I said "google" (with a small g) - ie "perform an Internet search", just like you can hoover with a Dyson.

"We don't have a browser that supports javascript. To use any forum I go to an old Mac laptop."

So, basically you are saying you have crippled your ability to benefit from what we have to offer here because you have not kept up with the evolution of the Internet. Fair enough, your choice, but that means doing things the hard way.

I guess you can't see any of the quoted passages within posts either, so the replies to your queries (and practically the whole forum) have not made much sense. No matter, you seem to have got there the hard way. I wonder how well WebIF works for you?!! Again, I think you might be cutting your nose off to spite your face.

To show you some of what you missed, my quoted section taken out of quotes:

abduco

A problem with running a long process from a Telnet session or the webshell package (a command terminal available as a web page - access via WebIF >> Diagnostics >> Command Line) is that the session inconveniently drops out and terminates any active processes if you take the focus away to do something else. Then you have to reconnect and restart the youtube-dl [substitute whatever you want here] command, which then has to do its initial thinking before the download resumes...

The command abduco is already available to support other long processes such as fix-disk, and can be used here to create a protected command session which carries on regardless of the terminal session dropping out. So, before launching the main download, use the following to create a protected session:

# abduco -A yt

This creates a protected session called "yt" (call it what you like), and the next command prompt is within that session. Then start your youtube-dl [substitute whatever you want here] process as described above. You can now "do other stuff" and the session will carry on regardless - to break out of the session and do other things on the command line, use Ctrl+\.

To come back later, use the same abduco line again. This time, as there already exists a session called "yt", the command connects to it rather than starting a new one.

To close the session (from within the session), type "exit".

To inspect open abduco sessions, type "abduco" (with no other parameters).
 
Last edited:
Top