DomesdayDuplicator icon indicating copy to clipboard operation
DomesdayDuplicator copied to clipboard

Feature request: Auto-stop on low amplitude threshold (after a configurable delay)

Open JonasCz opened this issue 1 year ago • 2 comments

I'm a complete C++ noob, so I think have no chance of implementing this well myself, but just in case someone would like to take this on:

I'd love to see an automatic stop feature, triggered when the amplitude measurement drops below a certain threshold for a configurable amount of time.

My usecase is VHS captures, for which the amplitude drops to a very low level when the on-tape recording ends. This would help to avoid creating needlessly big files.

Thanks for creating this amazing project!

JonasCz avatar Dec 28 '22 11:12 JonasCz

Yes, this is a feature I'd been thinking about as well - the current master now has support for live amplitude measurement, so it shouldn't be too hard to do this. It just needs a little state machine - start, wait for the amplitude to go above a threshold, then if it drops below that threshold for more than N seconds, stop capturing and truncate the output file back to the point where the level fell.

(I wrote this script a while ago to do the same thing after the fact, and it seems to work well...)

atsampson avatar Dec 28 '22 12:12 atsampson

Thanks, that works really well! And it's fast too.

I didn't know that it's possible to truncate ("shorten") a file in-place without a copy operation, learn something new every day :-)

JonasCz avatar Dec 28 '22 19:12 JonasCz