Change ffmpeg motion detection control to cover the whole range supported by ffmpeg #14445
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change ffmpeg motion sensibility control
This shouldn't be merged as-is
In the current ipcamera binding the item controlling ffmpeg scene detection sensibility is a slider going from 1 to 100, which is divided by 5000 and used with https://ffmpeg.org/ffmpeg-filters.html#select_002c-aselect. So the maximum scene detection probability we can use is
100/5000 = 0.02
This is causing an issue with my camera where even a static scene is regularly detected as a new scene by ffmpeg with a probability of 0.02~0.03. I would like to use 0.1 as the threshold (i.e.
-an -vf select='gte(scene\,0.1)',metadata=print -f null -
) but this isn't possible with the current divider of 5000.In this pull request I've changed this divider to be 100 to allow the item to cover the whole range of ffmpeg scene detection probability, but :
I don't know what the ideal value should be for the divider, but 5000 seems to high. @Skinah how did you choose this value ? The examples in ffmpeg doc https://ffmpeg.org/ffmpeg-filters.html#Examples-160 uses a threshold of 0.45 so I don't think my threshold of 0.1 is crazy.