Motion - Best Preview Shot

BestPreviewShot Patch

Introduction

Major improvement of the preview shots feature (output_normal=first). You can now select to save the best picture of an event (maximum number of changed pixels).

Description of Patch

This patch introduces a new value for output_normal: 'best'. While 'first' still saves the first picture of an event as a preview shot, 'best' will wait until an event is over and then save the picture that had the most pixels changed. You should now see much better results, because the 'main act' should more likely be captured. The old 'first' option is still available.

About filenames: preview-shots are by default named after jpeg_filename. If you want motion to name the preview-shots exactly the same as as the movies (with different extension of course:-), just set jpeg_filename to 'preview'.

Note: 'best' option needs some memory and also some more CPU compared to 'first'.

The 'locate' feature has also got a new functionality: Set 'locate preview' and motion will only draw the locate frame on your preview shots and not on the movies.

Installation of Patch

Copy the patch into a clean motion-3.2.1_snap2 directory and unzip it.

Apply the patch:

patch -p1 < best_preview.diff
./configure
make

have fun!

Discussion and Comments


This seems like a very nice feature. I just patched Motion to try it out, and I have one question. Why is the avi/mpg filename used rather than the jpeg filename? For me this is an issue because I put pictures in my webserver directory, but I keep videos separate. Thanks for the great new feature Joerg!

-- AndrewHamilton - 27 Feb 2005

The idea was to have a jpeg that belongs to the movie. I use them to show a preview that links to the actual movie. Both files are not created at the same time - the jpeg is only created after the event is over, while the movie is created at the beginning of an event. If I'd use the jpeg-filename, both files had a different name, making it harder to recognise a relation between both.

I don't want to add another config option for that, but maybe we can do a trick simmilar to what is implemented for the snapshot images. I'll think about that.

-- JoergWeber - 28 Feb 2005

Good news! I have added a bit more flexibilty in the choice of the filenames. Just check above description.

-- JoergWeber - 01 Mar 2005

Is it possible to have both first and best shot? -- So that when the first shot is created, an email is sent with the picture to let know of an event that happened, and then a follow up best image is sent showing the event after it happened.

-- RomanGaufman - 10 Jul 2007

At the moment this is not supported.

-- KennethLavrsen - 10 Jul 2007

-- JoergWeber - 01 Mar 2005
Topic revision: r12 - 10 Jul 2007, 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.