Page 1 of 1

No Picture Recieved - TV Tuner Card

Posted: Wed Dec 01, 2004 6:00 am
by Rayxen
Alright, well i've done a completely clean install from Ross Melin's LiveCD and all seems to be working, well as much as I had it working when doing an install on a RH installation. I simply can't get a picture at all when adding the monitor to zm.

This is what I get when I dump the ouptut while running xawtv:

Code: Select all

[user bin]$ zmu -d 0 -q -v
Video Capabilities
  Name: BT878 video (Leadtek WinFast 20
  Type: 171
    Can capture
    Can tune
    Overlay onto frame buffer
    Can clip
    Scalable
  Video Channels: 4
  Audio Channels: 1
  Maximum Width: 924
  Maximum Height: 576
  Minimum Width: 48
  Minimum Height: 32
Window Attributes
  X Offset: 0
  Y Offset: 0
  Width: 384
  Height: 288
Picture Attributes
  Palette: 7 - YUV422 capture
  Colour Depth: 16
  Brightness: 32768
  Hue: 32768
  Colour :32768
  Contrast: 32768
  Whiteness: 0
Channel 0 Attributes
  Name: Television
  Channel: 0
  Flags: 3
    Channel has a tuner
    Channel has audio
  Type: 1 - TV
  Format: 0 - PAL
Channel 1 Attributes
  Name: Composite1
  Channel: 1
  Flags: 2
    Channel has audio
  Type: 2 - Camera
  Format: 0 - PAL
Channel 2 Attributes
  Name: S-Video
  Channel: 2
  Flags: 2
    Channel has audio
  Type: 2 - Camera
  Format: 0 - PAL
Channel 3 Attributes
  Name: Composite3
  Channel: 3
  Flags: 2
    Channel has audio
  Type: 2 - Camera
  Format: 0 - PAL
Now it's running on Device 0, Channel 1 (Composite 1) through an S-Video connection. I add a new monitor based on all of those settings and I simply can't get a picture to appear at all... I'm absolutely stumped as what to do. Can someone please give me some help here. ... if you need any info let me know, but all i've done is install the LiveCD, dump the above from xawtv and try and add a monitor with the following:

Device Number: 0
Device Channel: 1
Device Format: 0 (PAL)
Capture Palette: YUV422P
Width: 384
Height: 288

I've also tried the RGB colour palette as I think that's what I use when running applications in Windows. Any ideas? Thanks!

Posted: Wed Dec 01, 2004 6:04 am
by Rayxen
The Apache error log shows this:

Code: Select all

[Tue Nov 30 21:43:29 2004] [error] [client 127.0.0.1] Premature end of script headers: zms, referer: http://127.0.0.1/zm/index.php?view=watchfeed&mode=&mid=1&scale=100
[Tue Nov 30 21:44:06 2004] [error] [client 127.0.0.1] Premature end of script headers: zms, referer: http://127.0.0.1/zm/index.php?view=watchfeed&mode=&mid=1&scale=100
[Tue Nov 30 21:44:15 2004] [error] [client 127.0.0.1] Premature end of script headers: zms
[Tue Nov 30 21:44:19 2004] [error] [client 127.0.0.1] Premature end of script headers: zms, referer: http://127.0.0.1/zm/index.php?view=watchfeed&mode=&mid=1&scale=100
[Tue Nov 30 21:50:22 2004] [error] [client 127.0.0.1] Premature end of script headers: zms, referer: http://127.0.0.1/zm/index.php?view=watchfeed&mode=&mid=1&scale=100
[Tue Nov 30 21:51:01 2004] [error] [client 127.0.0.1] Premature end of script headers: zms, referer: http://127.0.0.1/zm/index.php?view=watchfeed&mode=&mid=1&scale=100
[Tue Nov 30 21:51:42 2004] [error] [client 127.0.0.1] Premature end of script headers: zms, referer: http://127.0.0.1/zm/index.php?view=watchfeed&mode=&mid=1&scale=100
[Tue Nov 30 21:59:43 2004] [error] [client 127.0.0.1] Premature end of script headers: zms, referer: http://127.0.0.1/zm/index.php?view=watchfeed&mode=&mid=1&scale=100
I dont' know what that means? Is it related at all?

Posted: Wed Dec 01, 2004 6:16 am
by Rayxen
More logs:

Code: Select all

[user tmp]$ cat zmdc.log
Server starting at 04/12/01 08:29:00
'zmfilter.pl' started at 04/12/01 08:29:03
'zmfilter.pl' starting at 04/12/01 08:29:03, pid = 3029
'zmaudit.pl -d 900 -y' started at 04/12/01 08:29:03
'zmaudit.pl -d 900 -y' starting at 04/12/01 08:29:03, pid = 3034
'zmwatch.pl' started at 04/12/01 08:29:04
'zmwatch.pl' starting at 04/12/01 08:29:04, pid = 3043
'zmupdate.pl -c' started at 04/12/01 08:29:04
'zmupdate.pl -c' starting at 04/12/01 08:29:04, pid = 3048
Can't find process with command of 'zmc -d 0'
Can't find process with command of 'zma -m 1'
Can't find process with command of 'zmc -d 0'
Can't find process with command of 'zma -m 1'
Can't find process with command of 'zmc -d 0'
Can't find process with command of 'zma -m 1'
Can't find process with command of 'zmc -d 0'
Can't find process with command of 'zma -m 1'
Can't find process with command of 'zmc -d 0'
Can't find process with command of 'zma -m 1'
Can't find process with command of 'zmc -d 0'
Can't find process with command of 'zma -m 1'
Can't find process with command of 'zmc -d 0'
Can't find process with command of 'zma -m 1'
Ahahhaha - found this in /var/log/messages

Code: Select all

Dec  1 17:03:31 videoserver zmu[5250]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
I remember seeing that in the FAQ - let's hope this is an easy fix!

Posted: Wed Dec 01, 2004 6:39 am
by Rayxen
Ok, well I increased my shared memory, now i'm getting the latter error message regarding the 'not initilization' (17:33)

Code: Select all

ec  1 17:03:54 videoserver zmu[5278]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
Dec  1 17:03:57 videoserver zmu[5282]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
Dec  1 17:04:01 videoserver zmu[5286]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
Dec  1 17:04:04 videoserver zmu[5290]: ERR [Can't shmget, probably not enough shared memory space free: Invalid argument]
Dec  1 17:33:09 camserver zmu[3484]: ERR [Shared memory not initialised by capture daemon]
Dec  1 17:33:12 camserver zmu[3490]: ERR [Shared memory not initialised by capture daemon]
So I seem to have degressed from not having enough memory, to not even initialising the memory... could this be because I don't have enough RAM?

Posted: Wed Dec 01, 2004 6:56 am
by Rayxen
Ok, well we can rule out a lack of RAM. I have just boosted it from 265MB to 768MB SDRAM...

Code: Select all

Dec  1 17:45:07 camserver kernel: Memory: 775744k/786368k available (1966k kernel code, 9872k reserved, 867k data, 268k init, 0k highmem, 0k BadRAM)

[user user]$ cat /proc/meminfo
MemTotal:       776488 kB
MemFree:        494356 kB
I am getting these errors in zmdc.log

Code: Select all

[user user]$ cat /tmp/zmdc.log
Server starting at 04/12/01 17:45:36
'zmfilter.pl' started at 04/12/01 17:45:40
'zmfilter.pl' starting at 04/12/01 17:45:40, pid = 3145
'zmaudit.pl -d 900 -y' starting at 04/12/01 17:45:40, pid = 3150
'zmaudit.pl -d 900 -y' started at 04/12/01 17:45:40
'zmwatch.pl' started at 04/12/01 17:45:40
'zmwatch.pl' starting at 04/12/01 17:45:40, pid = 3159
'zmupdate.pl -c' started at 04/12/01 17:45:41
'zmupdate.pl -c' starting at 04/12/01 17:45:41, pid = 3164
I'm stumped.... no idea what to do now.

Posted: Wed Dec 01, 2004 9:32 am
by Rayxen
I'm still getting the Apache errors in the second post... I'm not sure if this helps at all... probably not:

Code: Select all

[user httpd]$ wget -S h**p://127.0.0.1/zm/index.php?view=watchfeed&mode=still&mid=1&scale=100
--20:30:18--  h**p://127.0.0.1/zm/index.php?view=watchfeed
           => `index.php?view=watchfeed'
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... [1] 4740
[2] 4741
[3] 4742
[2]   Done                    mode=still
[3]   Done                    mid=1

 1 HTTP/1.1 200 OK
 2 Date: Wed, 01 Dec 2004 09:30:18 GMT
 3 Server: Apache-AdvancedExtranetServer/2.0.48 (Mandrake Linux/6.6.100mdk) PHP/4.3.4
 4 X-Powered-By: PHP/4.3.4
 5 Expires: Mon, 26 Jul 1997 05:00:00 GMT
 6 Last-Modified: Wed, 01 Dec 2004 09:30:18 GMT
 7 Cache-Control: no-store, no-cache, must-revalidate
 8 Cache-Control: post-check=0, pre-check=0
 9 Pragma: no-cache
10 Connection: close
11 Content-Type: text/html
index.php?view=watchfeed: Permission denied

Cannot write to `index.php?view=watchfeed' (Permission denied).
Does anyone have a suggestion? I don't care if you're just guessing... I need to try something! :) Thanks.

Posted: Wed Dec 01, 2004 1:53 pm
by zoneminder
When using wget make sure you quote your url otherwise you will get what you got in your post, which is wget fetching up to the & and then what's after it being interpreted as other commands, variously backgrounded.

From your descriptions above I'm not convinced that the capture or analysis daemons are actually running. What mode is your monitor set to? If you do a ps can you see any zmc processes?

Phil,

Posted: Wed Dec 01, 2004 9:23 pm
by Rayxen
Sorry, I meant to update you with that information. It was indeed not running. When I started running zmc manually I had more success, I got either a blue screen (for RGB/YUV) or a grey screen for greyscale (jpeg mode). When attempting to stream mpeg, it started to connect, which it didn't do at all previously, but I still couldn't get any video.

The way I started zmc was with the command:

Code: Select all

zmc -m 1 &
I also tried running it as apache with:

Code: Select all

su -c "zmc -m 1 &" apache
But I don't think that made any difference...I tried starting zmc using the device 0 command, but it errored on me. I'm still getting the headers error in the Apache log even when zmc is running. Here's a quick overview:

1. When running "zmc -m 1" as apache and trying to view a video stream, everything appears to work except I dont' get a stream, it buffers for ages and then gives me a blank grey box. messages log:

Code: Select all

Dec  2 08:24:11 camserver zmfix[3466]: INF [Debug Level = 0, Debug Log = ]
Dec  2 08:24:39 camserver zmc-m1[3505]: INF [Debug Level = 0, Debug Log = ]
Dec  2 08:24:39 camserver zmc-m1[3505]: INF [Starting Capture]
Dec  2 08:26:39 camserver zmc-m1[3505]: INF [Bedroom: 1000 - Capturing at 8.33 fps]
Dec  2 08:28:39 camserver zmc-m1[3505]: INF [Bedroom: 2000 - Capturing at 8.33 fps]
Dec  2 08:30:38 camserver zmc-m1[3505]: INF [Bedroom: 3000 - Capturing at 8.40 fps]
Dec  2 08:32:38 camserver zmc-m1[3505]: INF [Bedroom: 4000 - Capturing at 8.33 fps]
2. When running "zmc -d 0" the process doesn't stay open and just dissapears. With the following error in messages:

Code: Select all

Dec  2 08:25:16 camserver zmc-d0[3511]: INF [Debug Level = 0, Debug Log = ]
Dec  2 08:25:16 camserver zmc-d0[3511]: ERR [No monitors found]
Despite the fact that monitor 1 (as above) is linked to device 0. So I'm not sure what I'm doing wrong there. I've tried running it after the above -m1 command and before, both return the same error in messages

3. When viewing still images while zmc -m1 is running I get a blank blue screen, the date/time is updating correctly, but just a blue screen (RGB) or a grey screen (greyscale) and the following in messages:

Code: Select all

Dec  2 08:37:00 camserver zms[3743]: INF [Debug Level = 0, Debug Log = ]
Dec  2 08:37:01 camserver zms[3748]: INF [Debug Level = 0, Debug Log = ]
Dec  2 08:37:06 camserver zms[3761]: INF [Debug Level = 0, Debug Log = ]
Dec  2 08:37:11 camserver zms[3767]: INF [Debug Level = 0, Debug Log = ]
Which is actually zms ... and there's no sight of zmc at the stage. I'm not sure if that's correct or not?

4. The Apache logs on the other hand, are completely empty (of errors) while zmc is running, so I'm glad that problem has been fixed up. We're making progress.

5. Here's the output of wget with quotes:

Code: Select all

[/home/user]# wget -S "http://127.0.0.1/zm/index.php?view=watchfeed&mode=still&mid=1&scale=100"
--08:40:53--  http://127.0.0.1/zm/index.php?view=watchfeed&mode=still&mid=1&scale=100
           => `index.php?view=watchfeed&mode=still&mid=1&scale=100'
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.1 200 OK
 2 Date: Wed, 01 Dec 2004 21:40:53 GMT
 3 Server: Apache-AdvancedExtranetServer/2.0.48 (Mandrake Linux/6.6.100mdk) PHP/4.3.4
 4 X-Powered-By: PHP/4.3.4
 5 Expires: Mon, 26 Jul 1997 05:00:00 GMT
 6 Last-Modified: Wed, 01 Dec 2004 21:40:53 GMT
 7 Cache-Control: no-store, no-cache, must-revalidate
 8 Cache-Control: post-check=0, pre-check=0
 9 Pragma: no-cache
10 Connection: close
11 Content-Type: text/html

    [ <=>                                                                        ] 672           --.--K/s

08:40:53 (6.41 MB/s) - `index.php?view=watchfeed&mode=still&mid=1&scale=100' saved [672]
And lastly, to answer your question about the monitor mode, I have just left it set to none to try and see if I can get some kind of output first. This is what is suggested in the readme. Thanks for your help.

Posted: Wed Dec 01, 2004 9:56 pm
by Rayxen
Alrighty, well I've read over what each of the processes does and so furth and am getting a better understanding of it all. I checked the zmdc.log and it said:

Code: Select all

Can't find process with command of 'zmc -d 0'
Can't find process with command of 'zma -m 1'
Can't find process with command of 'zmc -d 0'
Can't find process with command of 'zma -m 1'
Ok, so it wanted the analysis daemon running as well, so I started that up as apache - no problems there. I then tried zmc again, no luck - changed the function to monitor mode and tried running zmc again. Success!! So now I've got the following processes running:

Code: Select all

[/home/user]# ps aux | grep zm
apache    3106  0.0  0.7  7188 5444 ?        S    08:20   0:00 /usr/bin/perl -wT /usr/local/bin/zmdc.pl status
apache    3130  0.0  1.5 13936 12184 ?       S    08:21   0:00 /usr/bin/perl -wT /usr/local/bin/zmfilter.pl
apache    3138  0.0  0.5  6112 4412 ?        S    08:21   0:00 /usr/bin/perl -wT /usr/local/bin/zmaudit.pl -d 900 -y
apache    3148  0.0  0.6  6736 4896 ?        S    08:21   0:00 /usr/bin/perl -wT /usr/local/bin/zmwatch.pl
apache    3153  0.0  0.7  7924 6112 ?        S    08:21   0:00 /usr/bin/perl -w /usr/local/bin/zmupdate.pl -c
apache    3505  3.8  6.8 139360 53304 pts0   S    08:24   0:52 zmc -m 1
apache    3944  0.0  0.5 122716 4272 pts0    S    08:45   0:00 zma -m 1
apache    3968  9.8  6.8 139360 53284 ?      S    08:46   0:01 /usr/local/bin/zmc -d 0
apache    3983 13.2  6.8 139360 53284 pts0   S    08:47   0:00 zmc -d 0
root      3987  0.0  0.0  1940  656 pts0     S    08:47   0:00 grep zm
Now I get the following when trying video: a blue screen, with the time - nothing else; the following messages:

Code: Select all

Dec  2 08:50:19 camserver zma-m1[3944]: WAR [Approaching buffer overrun, consider increasing ring buffer size]
Dec  2 08:50:19 camserver zma-m1[3944]: INF [Bedroom: 109000 - Processing at 500.00 fps]
Dec  2 08:50:21 camserver zma-m1[3944]: INF [Bedroom: 110000 - Processing at 500.00 fps]
Dec  2 08:50:22 camserver zma-m1[3944]: INF [Bedroom: 111000 - Processing at 1000.00 fps]
Dec  2 08:50:22 camserver zma-m1[3944]: WAR [Approaching buffer overrun, consider increasing ring buffer size]
Dec  2 08:50:22 camserver zmc-d0[3983]: INF [Bedroom: 2000 - Capturing at 10.00 fps]
Dec  2 08:50:24 camserver zma-m1[3944]: INF [Bedroom: 112000 - Processing at 500.00 fps]
Dec  2 08:50:26 camserver zma-m1[3944]: INF [Bedroom: 113000 - Processing at 500.00 fps]
Dec  2 08:50:28 camserver zma-m1[3944]: INF [Bedroom: 114000 - Processing at 500.00 fps]
Um... 500fps?? what! I have it set to max 25fps. And the report interval at 1000. When trying to view stills, I get the blank blue screen still, and the following in messages:

Code: Select all

Dec  2 08:52:58 camserver zma-m1[3944]: INF [Bedroom: 195000 - Processing at 500.00 fps]
Dec  2 08:52:58 camserver zma-m1[3944]: WAR [Approaching buffer overrun, consider increasing ring buffer size]
Dec  2 08:52:59 camserver zma-m1[3944]: INF [Bedroom: 196000 - Processing at 1000.00 fps]
Dec  2 08:53:01 camserver zms[4236]: INF [Debug Level = 0, Debug Log = ]
Dec  2 08:53:01 camserver zma-m1[3944]: INF [Bedroom: 197000 - Processing at 500.00 fps]
So the analysis daemon is going crazy... I dropped the reporting interval to 25 but it's still processing at 500fps. I'm not sure how to change that?

Either way, the problem of not getting a stream or still pictures is still there. There are no apache errors, but I do get the following in zmdc.log:

Code: Select all

zmc -d 0' started at 04/12/02 08:46:55
'zmc -d 0' starting at 04/12/02 08:46:55, pid = 3968
Can't find process with command of 'zma -m 1'
'zmc -d 0' stopping at 04/12/02 08:53:33
'zmc -d 0' died at 04/12/02 08:53:33
'zmc -d 0' started at 04/12/02 08:53:33
'zmc -d 0' starting at 04/12/02 08:53:33, pid = 4280
Can't find process with command of 'zma -m 1'
Hopefully you have some ideas. Thanks again for your help!! I really appreciate it.

Posted: Wed Dec 01, 2004 10:04 pm
by Rayxen
Ok, you're not going to believe this. When I added more RAM, I must have slightly bumped the cable out - whooopss! So since I've been getting the blue screen, it's been working. I realised this because I just fired up xawtv to make sure it was all still working, and well I got the blue screen!

Duuuuhhh!!! Well that's a lesson to everyone (especially me!).

Now streaming still has a very slight problem, it fires up the stream ok (ffmpeg) for about 1 or 2 secs, and then goes back to the grey box that you see when it's loading/buffering - it even has the progress bar down the bottom. I'll keep fiddling to see if I have some success. But i'm happy now that i'm at least getting a pictures.

It's been a long process, i'm still not sure why zma/zmc are not loading at startup... if you have any ideas that would be great. But i'm happy just to write a script to load them for now. Cheers.