• 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.

Independent Crop

DaveQ

Member
I have now decided to crop all recordings, but detectads has already run on them. How do I make this happen?
 
It all depends on what options you used when running detectads initially.

If you have bookmarks at the beginning and end of ad breaks then you can run crop against them but if you only have bookmarks at the end of ad breaks you would need to rerun detectads again with the crop option which depending on the numbers of recordings involved could take a very long time.

There is currently no option to run an independent crop on a batch of recordings - you would need to use the webif option on each recording in turn unless you are prepared to write a shell script to automate the process.

We can give better advice if you can give us more information on numbers and which detectads options were used.
 
What's needed is to clear the flag which prevents detectads running again, and that's in the .hmt file. Maybe sweeper can be programmed to do it?
 
Original options were beginning and end. I have manually cropped a few, but there are a couple of hundred. Nb (Maybe should be a separate thread) I managed to crop one or 2 files manually several times, making them progressively smaller, before I noticed. Could be the bookmarks werent properly updated on cropping? And/Or the 'you can crop this' flag not getting disabled?
 
Original options were beginning and end. I have manually cropped a few, but there are a couple of hundred. Nb (Maybe should be a separate thread) I managed to crop one or 2 files manually several times, making them progressively smaller, before I noticed. Could be the bookmarks werent properly updated on cropping? And/Or the 'you can crop this' flag not getting disabled?
There is no 'you can crop this' flag - if there are bookmarks present it will attempt to use them whether or not it makes sense to do so,

The bookmarks that are, optionally, set following a crop are to let you skip quickly to the crop points to check the cropping- they are not intended for use in cropping the file again.
When using the webif you get a neat visual display of what will be kept & what will be cut, If the amount to be cut looks excessive don't do it and turn off "Save new bookmarks? " to avoid future confusion.

I have a wishlist item to add a 'queue for crop' option which would make batch processing easier but it is quite a way down the todo list in the meantime hopefully one of the shell script experts will come up with a (relatively) simple command line method for automating the process
 
As a test, I have set a sweeper rule to queue for detectads on a small folder, which have all been already detectadded. But it will take ages to verify, as its currently trying to shrink, decrypt & mpg everything!
 
Sweeper rule:
# Queue for DetectAds (add/remove/modify conditions as needed)
recurse 1 bookmarks {> 0} !textmatch %channel~~BBC* !queue detectads flag Addetection action {queue detectads}
NB Probably not hundreds of files, maybe 100. Most are BBC.
 
For *.hmt in [My Video/..] do { hmt -detectads %1 }
Resetting the detectads flag can also be done in sweeper

But rerunning detectads shouldn't be needed since the bookmarks already exist it should just need running nicesplice in a for loop
However I am struggling with the syntax so was hoping someone with better bash knowledge would post a working example
 
However I am struggling with the syntax so was hoping someone with better bash knowledge would post a working example
Eventually got there
Code:
cd "My Video/series folder"
mkdir crop
for f in *.ts; do echo $f; bf=$(basename "$f" .ts);  nicesplice -cutBookMarks -in "$bf" -out "crop/$bf" ; done
I recommend doing one folder at a time
Abduco protects against losing connection to your terminal session
wasn't working in abduco
 
Last edited:
...
wasn't working in abduco
In what way?
I believe you have to start a session (named "cropper", say) like this
Code:
abduco -c cropper sh
And then type in the commands as you posted, except that you need the full path for the cd because the session is started in the root directory.
 
Yup, for isn't a separate command, just an element of shell syntax, so you have to have a shell running to execute it.
 
I have used Unix in the distant past (with Putty if I recall), but never with the Humax. How do I start a shell?

Just tried Command line again, and its working now. no longer err 503. Will pursue the commands suggested
 
The crop script worked a treat, thanks. And much quicker than re-doing detectads.

Hi @DaveQ,

I'm looking for a script too which will work through a folder of files and crop the file where there are 6 or more bookmarks in the file. Can you help me understand the process of using the script you used and the dependants (I've not got detectads installed but do have nicesplice. I've set the bookmarks manually).

I got lost at the point of shell and putty in the above threads so hoping you can help!

I want to use this in the folder /media/My Video/Folder1

Thanks

Rodp
 
Forget putty, but you do need to start a shell to run these commands. I've forgotten now how to start that up (I had to eventually replace the T2 with a 5000, so no more fun playing that way), but I am sure almost anyone on this forum can help you with that.
 
Back
Top