Motion - Bug Report 2005x 08x 05x 173526

BUG: Duplicate Images Output

I have motion-3.2.2_snap9. The bug seems to happen when motion is killed, and what seems to happen is that motion will create a duplicate of the last image saved for each thread and save it under a new filename. This seems to happen on all threads (2 composite cams and 1 usb). I have:'output_normal=best'. For example:
$ md5sum *.jpg
8e59728d4066c8f77879ccc13e9ed30f  1_20050805122646.jpg
8e59728d4066c8f77879ccc13e9ed30f  1_20050805122743.jpg

Test case


Motion version: 3.2.2_snap9
ffmpeg version: 0.4.9pre1
Shared libraries: curl, ffmpeg
Server OS: Slackware 10.1, Kernel 2.6.12-git8

-- AndrewHamilton - 05 Aug 2005

Follow up

Does it do it when you have output_normal = on or first?

No, it only seems to happen on output_normal = best.
-- AndrewHamilton - 06 Aug 2005

Fix record

Yes. There was a logical bug. When motion was killed a variable called makemovie was set and this forces an artificial end of event. And the code that saves a the best jpeg from an event did not check if there had actually been a new event.

This modification in motion.c fixed it

if (cnt->new_img==NEWIMG_BEST && cnt->preview_max) {
    cnt->preview_max = 0;

Fix included in motion-3.2.2

-- KennethLavrsen - 13 Aug 2005
Topic revision: r4 - 13 Aug 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.