interlacing - any new thoughts

Support and queries relating to all previous versions of ZoneMinder
Locked
kevin_robson
Posts: 247
Joined: Sun Jan 16, 2005 11:26 am

interlacing - any new thoughts

Post by kevin_robson »

I'd love to run my camera at 640*480 but cannot due to the interlacing I get through my 4 port 848 card.

I've seen various thoughts and ideas discussed over the years over how it could be solved and I've had another search through the forums to see if there is any more up to date info, but there doesn't appear to be. I've not seen any active discussion for a couple of years.

Is there any new way of achieveing this, either by capturing without the interlacing, or cleaning up the images/video afterwards?

If not, are there any specific cards that wouldn't give interlacing? I'd prefer not to use IP cameras as they seem pretty pricey.

Any other ideas or options?
Thanks
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

Interlacing is part of the analog design standard. The "fix" for it is a new standard. That is digital. So you hack around it (ugly, fails a lot, is CPU intensive) or you actually fix it. (New stuff, expensive) And no discussion will change those facts.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i rememeber bttv having an option for combfilter=1
this was utterly useless but now we have updated zm (or will do) do work with version 2 will this help at all?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

You can't do much about interlacing with analog cameras. They were built for standard-def TV's and standard-def TV's use interlaced video.

I myself use 640x480 with analog cameras since they do provide more detail than 320x240. I an object isn't moving you get the full 640x480 detail.

You can record at 640x480 with interlaced cameras and then do de-interlacing on events you want to pickup any details that the interlacing is messing up. You can use the Gimp or Photoshop to deinterlance individual frames. There are many video tools that deinterlace video, (avidemux is a free one that runs of Linux and OSX) you can use them to deinterlace video export of events. FFmpeg has a deinterlace flag, I've never been able to get ffmpeg to deinterlace video exports or video streaming.
kevin_robson
Posts: 247
Joined: Sun Jan 16, 2005 11:26 am

Post by kevin_robson »

Thanks guys.
Tim,
Does gimp do this succesfully or does it still not look great? Does it take a while or is it quick? If gimp can do it quickly I wonder if there is a command line tool that could be used to run through the events directory after an event, or whetehr the CPU usage would be too much.

James. Might be worth a try. I'm waiting for the latest version to be formally released before upgrading, but if anyone has a test machine and feels like playing with this in the meanwhile I'd be interested to hear the results.

Thanks all.
timcraig
Posts: 195
Joined: Mon Dec 10, 2007 5:53 pm
Location: San Jose, CA

Post by timcraig »

Deinterlacing an image makes it look a little more blocker but you can make out the details of a moving image much better. In my opinion, a deinterlaced 640x480 image is less blocky than a 320x240 image.
boatman
Posts: 8
Joined: Sun Oct 05, 2008 11:03 pm

Post by boatman »

Mplayer has some good options for playing interlaced video. I found that the command -vf pp=lb displays the video with interlacing cleaned up nicely.
Example:
mplayer some_interlaced_video.avi -vf pp=lb

Using Mencoder, one can re-encode the video while deinterlacing it. More details can be found here at the Mplayer site.
kevin_robson
Posts: 247
Joined: Sun Jan 16, 2005 11:26 am

Post by kevin_robson »

Thanks all. I'm going to have a look at all this once I get a test install set up.
boatman
Posts: 8
Joined: Sun Oct 05, 2008 11:03 pm

Post by boatman »

I recently discovered that mplayer's cubic interpolating deinterlacer (ci) filter works better that the linear blend deinterlacer (lb) filter. There is also a temporal noise reducer (tn) that works well. I get very nice results when combining the ci and tn filters.

mplayer some_interlaced_video.avi -vf pp=ci/tn
Locked