Motion - Motionffmpeg Deinterlace

Deinterlace video input

Description of Patch

Motion will deinterlace frame before put them to file

Installation of Patch

Download the patch file. If it is packed as a gz or tar.gz unpack it first. Then copy it to the motion source directory and issue the command (assuming the patch file is called filename_of_patch_file.diff)

patch < filename_of_patch_file.diff

Then re-build Motion and test the patch.

Change History of Patch

  • 1.0 Initial revision

TO-DO

  • Add config option to enable/disable deinterlace

Download

To try the new feature download the latest Motion snapshot.

  • Download motion-20051215-051001 daily snap .
  • Please apply this patch

Example of deinterlacing (using deint3 patch)

  • Before deinterlacing:
inter.jpg

  • After deinterlacing:
deinter.jpg

Discussion and Comments


Wow, I did a very similar thing yesterday, using ffmpeg also. With this patch though, won't timestamps be distorted? Here is what I did, attached as deint-motion-20051215-051001.diff.

-- AndrewHamilton - 15 Dec 2005

There is a memory leak somewhere in my patch. I will hunt it down as soon as possible.

-- AndrewHamilton - 22 Dec 2005

I think I have fixed the memory leak. Performance when using deinterlacing on two cameras at 4 fps each at 640x480 uses about 3-4% cpu on my Athlon XP 2500+.

-- AndrewHamilton - 22 Dec 2005

I just looked at the patch itself.

If Motion is compiled without ffmpeg it seems some #ifdefs are missing in motion.c where the deinterlace function is called.

-- KennethLavrsen - 22 Dec 2005

Yes, you are right Kenneth. Here is a new patch.

-- AndrewHamilton - 22 Dec 2005

I have integrated the patch. It will be available in 3.2.5_snap1. Thank you both for the patch.

-- KennethLavrsen - 29 Dec 2005
Topic attachments
I Attachment Action Size Date Who Comment
deint-motion-20051215-051001.patchpatch deint-motion-20051215-051001.patch manage 2 K 15 Dec 2005 - 21:24 AndrewHamilton Deinterlace Patch
deint2-motion-20051215-051001.patchpatch deint2-motion-20051215-051001.patch manage 3 K 22 Dec 2005 - 08:14 AndrewHamilton Fix Mem Leak
deint3-motion-20051215-051001.patchpatch deint3-motion-20051215-051001.patch manage 3 K 22 Dec 2005 - 18:36 AndrewHamilton Include #ifdefs
deinter.jpgjpg deinter.jpg manage 41 K 29 Dec 2005 - 16:03 TWikiGuest deinterlaced output
inter.jpgjpg inter.jpg manage 51 K 29 Dec 2005 - 16:02 TWikiGuest interlaced output
motion-20051215-051001-ffmpeg.diffdiff motion-20051215-051001-ffmpeg.diff manage 531 bytes 15 Dec 2005 - 10:29 AlexeyBelyaev Patch
Topic revision: r8 - 15 Mar 2006, KennethLavrsen
Copyright © 1999-2017 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.