WyattBlue / auto-editor

Auto-Editor: Efficient media analysis and rendering
https://auto-editor.com
The Unlicense
2.88k stars 420 forks source link

Minimum Length Exclusion #413

Closed crftbt closed 9 months ago

crftbt commented 9 months ago

Requesting an option to only include edits that are within a minimum duration (exg 0.5s or 1s minimum duration).

This would be to reduce choppiness where edits are very short in duration.

WyattBlue commented 9 months ago

That's what minclip does. Read the --help docs

crftbt commented 9 months ago

That's what minclip does. Read the --help docs

Which version is that in? Does not appear to exist in the latest version of auto-editor (23.51.1).

$ ./bin/auto-editor --help |grep -i min $ ./bin/auto-editor --help |grep -i clip $ ./bin/auto-editor --version 23w51a (23.51.1) $ ./bin/pip install --upgrade auto-editor Requirement already satisfied: auto-editor in ./lib/python3.11/site-packages (23.51.1) Requirement already satisfied: numpy>=1.22.0 in ./lib/python3.11/site-packages (from auto-editor) (1.26.2) Requirement already satisfied: pillow==10.1.0 in ./lib/python3.11/site-packages (from auto-editor) (10.1.0) Requirement already satisfied: pyav==12.0.0 in ./lib/python3.11/site-packages (from auto-editor) (12.0.0) Requirement already satisfied: ae-ffmpeg==1.1.* in ./lib/python3.11/site-packages (from auto-editor) (1.1.2) $

WyattBlue commented 9 months ago

Docs are in auto-editor --edit --help

crftbt commented 9 months ago

After testing minclip, it appears that increasing that value increases all clips to at least that value.

Increasing the minclip value appears to increase the overall duration of the output file. Instead of removing clips under the minclip value (reducing the total duration).

For example, unless I'm mistaken it appears that minclip=5 will take a clip that is 1ms and extend the duration to make it 5ms.

This was with --edit audio:threshold=2%,minclip=5

The origin of the post is asking about filtering clips that do not meet a minimum duration. Example if minduration=5ms and there is an edited clip in the timeline that is only 1ms, the 1ms clip is not included in the final output.

crftbt commented 9 months ago

Pull Request submitted to help clarify options listed in auto-editor --edit --help.