mirror of
https://github.com/motioneye-project/motioneye.git
synced 2026-03-02 22:57:06 -05:00
Thumbnail offset hardcoded weirdly? #2396
Labels
No labels
Android app
Arch Linux
CI/CD
CSS
FreeBSD
HTML/HTTP
Home Assistant addon
JavaScript
Python
Raspberry Pi
Stale No Activity 60 Days
bug
code format
dependencies
dev branch
docker
documentation
duplicate
enhancement
feature
help wanted
i18n/l10n
invalid
legacy motionEye
meta
motion
motionEyeOS
notourproblem
python update
question
question
security
troubleshooting
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/motioneye#2396
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @suvis1 on GitHub (May 19, 2023).
Hi!
Ive been having issues that Motioneye generates thumbnails that are not representative of the actual detection event. I checked the code and found out theres a a minimum offset, and also a weirdly doubled offset for precapture?
For example if i have a camera with framerate of 10, and precapture of 40 frames before a detection, we end up with the thumbnail being generated 8 seconds from the video, eventhough the detection is after the 40 precapture frames, meaning the thumbnails 4 seconds late.
I managed to get alot better thumbnails when i changed the offs value to just be offs +=1 so the thumbnails are taken 1 second after detection.
This seems to be done deliberately so maybe im missing the point of this? is there any reason for it to do this?
github.com/motioneye-project/motioneye@03882a1899/motioneye/mediafiles.py (L349-L363)@MichaIng commented on GitHub (May 21, 2023):
Many thanks for your report. Good find, I have no idea where this 4 seconds minimum + doubled offset is coming from. It was last touched here, before which it was 4 seconds maximum offset:
github.com/motioneye-project/motioneye@b14bbb5@ccrisan do you know what this is for? Generally I'd just remove any min/max and the
* 2to just use the user setting as is.@ccrisan commented on GitHub (May 22, 2023):
I think it was kind of empirical at that moment. But yeah, using the user setting as is would probably be the best idea here.
@suvis1 commented on GitHub (May 22, 2023):
I feel like some delay is still warranted, since for example a thumbnail taken from the moment of detection only shows a very small part of a detection like this:
I blurred it for privacy, but you can still see that only the head of the person is in the thumbnail on the driveway, adding 1 second more generally gives a lot better results!
@Semmu commented on GitHub (Jan 29, 2026):
I have recently also dig into this code and IMHO the best solution would be to create the thumbnail from the exact middle of the video, I think that would be more informative than the beginning of the motion detection/event.