Synch problem with second camera

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
ptast
Posts: 27
Joined: Fri Nov 24, 2006 2:41 am
Location: Vasa Finland 21E 63N

Synch problem with second camera

Post by ptast »

I got a 4 port X Guard capture card http://www.grandtec.com/xguard.htm
I have 2 cams currently connected http://www.ptast.com/media/
One cam (Front) is captured OK but the second one (Backyard) is out of synch.

Here's how it should look (in the dark)
Image

And here how it is now
Image

Code: Select all

11/29/06 00:16:19.128505 zmc_dvideo[4042].DB1-zm_monitor.cpp/329 [Monitor Backyard-IR has function 2]
11/29/06 00:16:19.128570 zmc_dvideo[4042].DB1-zm_monitor.cpp/330 [Monitor Backyard-IR LBF = '%y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
11/29/06 00:16:19.128614 zmc_dvideo[4042].DB1-zm_monitor.cpp/331 [Monitor Backyard-IR IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 1, FM = 0]
11/29/06 00:16:19.129599 zmc_dvideo[4042].DB1-zm_zone.cpp/849 [Got 0 zones for monitor Backyard-IR]
11/29/06 00:16:19.129708 zmc_dvideo[4042].DB1-zm_monitor.cpp/1619 [Loaded monitor 1(Backyard-IR), 0 zones]
11/29/06 00:16:19.129751 zmc_dvideo[4042].INF-zmc.cpp/183 [Starting Capture]
11/29/06 00:16:57.151480 zmc_dvideo[4042].INF-zm_signal.cpp/54 [Got signal (Terminated), exiting]
11/29/06 00:16:57.151900 zmc_dvideo[4042].ERR-zm_local_camera.cpp/615 [Sync failure for frame 5 buffer 5(1): Interrupted system call]
How do I resolve this issue?

You can view my setting at http://213.250.83.82/zm/
username: guest
password: zmguest
User avatar
ptast
Posts: 27
Joined: Fri Nov 24, 2006 2:41 am
Location: Vasa Finland 21E 63N

Post by ptast »

OK, I added a test code snippet to zm_local_camera.cpp

Code: Select all

#if 1
            errors = 0;
            while(errors < maxerrors) 
               if ( ioctl( m_videohandle, VIDIOCSYNC, &m_sync_frame ) < 0 )
                   errors++;
               else 
                   break;

            if(errors >= maxerrors) {
                Error(( "Sync failure for frame %d buffer %d(%d): %s", m_sync_frame, m_cap_frame_active, captures_per_frame, strerror(errno) ));
                Error(( "Fatal sync failure! Abandoning..." ));
                return( -1 );
            }
            else if(errors != 0) 
                Error(( "Recovered after sync failure %d", errors ));

#else
            if ( ioctl( m_videohandle, VIDIOCSYNC, &m_sync_frame ) < 0 )
            {
             
                Error(( "Sync failure for frame %d buffer %d(%d): %s", m_sync_frame, m_cap_frame_active, captures_per_frame, strerror(errno) ));
                return( -1 );
            }
#endif
It did recover fast from the synch problem, did 5 test and it recovered after 2 loops every time...

Code: Select all

11/29/06 04:53:37.810471 zmc_dvideo[14390].INF-zmc.cpp/185 [Starting Capture]
11/29/06 04:53:37.811064 zmc_dvideo[14390].INF-zmc.cpp/186 [Warning! Hack version in use!]
11/29/06 04:55:50.727759 zmc_dvideo[14390].INF-zm_monitor.cpp/2519 [Backyard-IR: 1000 - Capturing at 7.52 fps]
11/29/06 04:57:02.965861 zmc_dvideo[14390].INF-zm_signal.cpp/54 [Got signal (Terminated), exiting]
11/29/06 04:57:02.966156 zmc_dvideo[14390].ERR-zm_local_camera.cpp/631 [Recovered after sync failure 1]
hmm...what GUI do you use for c++?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Most likely you have a single chip card and your using different settings on two ports of the same card. Unfortunately, the bttv drivers do not like that type of setup so your settings (image size and palette) must match for all cameras using that one chip.

Regards,
Corey
User avatar
ptast
Posts: 27
Joined: Fri Nov 24, 2006 2:41 am
Location: Vasa Finland 21E 63N

Post by ptast »

Hi cordel,

Yep that is my case, one is NTSEC and the other is PAL.
That was bad news, for now....

Many thanks for the reply!
Locked