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!
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