JeanMarc
22nd July 2009, 04:18
Hi,
I am experimenting with webcams and free software Dorgem for home monitoring applications. The motion detection capability of Dorgem is (not surprisingly) not nearly as good as what could be achieved with Avisynth (I think!). The webcam captures way too many frames, as the smallest change from frame to frame is considered "motion". I want to be able to go back to the avi file created from the webcam output, and eliminate all the frames that don't have significant motion in them, in effect deciding what motion criteria should be applied.
I have seen a lot of clever scripts out there to detect/estimate motion, but I am looking for something basic, that could do something like:
If YDifferenceToNext() < 3,
then DeleteFrame
else do nothing
Obviously, Avisynth doesn't support this kind of syntax :(
I have been looking at ScriptClip and ConditionalFilter without finding anything obvious, but I don't have a huge experience with Avisynth syntax and filters, and I am probably missing something.
Unfortunately, the following doesn't work:
clip = AviSource("c:\file.avi")
ScriptClip(clip, "DeleteFrame(YDifferenceFromPrevious/3.0)")
I guess because the argument of DeleteFrame is not a clip.
This is a problem that many people may have encountered. So if anyone has any idea on the subject, please help!
Thanks.
I am experimenting with webcams and free software Dorgem for home monitoring applications. The motion detection capability of Dorgem is (not surprisingly) not nearly as good as what could be achieved with Avisynth (I think!). The webcam captures way too many frames, as the smallest change from frame to frame is considered "motion". I want to be able to go back to the avi file created from the webcam output, and eliminate all the frames that don't have significant motion in them, in effect deciding what motion criteria should be applied.
I have seen a lot of clever scripts out there to detect/estimate motion, but I am looking for something basic, that could do something like:
If YDifferenceToNext() < 3,
then DeleteFrame
else do nothing
Obviously, Avisynth doesn't support this kind of syntax :(
I have been looking at ScriptClip and ConditionalFilter without finding anything obvious, but I don't have a huge experience with Avisynth syntax and filters, and I am probably missing something.
Unfortunately, the following doesn't work:
clip = AviSource("c:\file.avi")
ScriptClip(clip, "DeleteFrame(YDifferenceFromPrevious/3.0)")
I guess because the argument of DeleteFrame is not a clip.
This is a problem that many people may have encountered. So if anyone has any idea on the subject, please help!
Thanks.