Broken image in monitor watch & events via index

Support and queries relating to all previous versions of ZoneMinder
Locked
donatmote
Posts: 31
Joined: Mon Jan 24, 2005 6:06 pm
Location: Sarasota, FL US

Broken image in monitor watch & events via index

Post by donatmote »

I still can't get an image when I click on the monitor name since I upgraded from 1.21.0 -> 1.21.2 and now -> 1.21.3. I do invert the image, so I thought the 1.21.3 release might fix the problem, but no luck. I also tried not inverting the image, but that just gave me upsidedown images.

Images are being acquired. If I bring up a table listing of events, I can click on a thumbnail and get a proper display.

I'm running Debian Etch-gcc4 on AMD64 dual processor. Everything was working before the 1.21.2 upgrade. I'm getting no clues in the apache logs.

When I try to run zms from the command line I get: "Unable to authenticate user." I tried su-ing to the apache userid, with the same result. Perhaps there is documentation somewhere that would describe the command line arguements for zms?

After reading the forum, I tried changing from hashed to plain, but that broke other things without fixing the problem, so I changed back.

I would greatly appreciate any help in debugging this. Is there other information I can include that would be helpful? Thanks.

Don
Don Hayward
Mote Marine Laboratory
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Hi Don,
Have you tried right clicking the broken image and viewing it's properties to make sure it's trying the correct path?
I recall at some point I had to change mine from cgi-bin/zms to /cgi-bin/zms
Regards,
Cordel
donatmote
Posts: 31
Joined: Mon Jan 24, 2005 6:06 pm
Location: Sarasota, FL US

Post by donatmote »

Thanks Cordel.

Yes, I tried that -- I get no response -- no properties window, nothing.
Puzzling.

Don
Don Hayward
Mote Marine Laboratory
donatmote
Posts: 31
Joined: Mon Jan 24, 2005 6:06 pm
Location: Sarasota, FL US

Post by donatmote »

Still trying to nail this. Found the following in zmvideo.log and wondered if it might shed some light. Note particularly:

[mpeg1video @ 0x733970]MPEG1/2 doesnt support 5/1 fps

Any ideas?

Creating video file Event-20900.mpg for event 20900
/usr/bin/ffmpeg -y -hq -intra -r 1.99 -s 352x240 -i %03d-capture.jpg Event-20900.mpg > mpeg.log
ffmpeg version 0.4.9-pre1, build 4747, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --build x86_64-linux --enable-gpl --enable-pp --enable-zlib --enable-vorbis --enable-a52 --enable-dts --disable-debug --disable-mmx --prefix=/usr
built on May 13 2005 19:39:37, gcc: 4.0.0 (Debian 4.0.0-1)
Input #0, image2, from '%03d-capture.jpg':
Duration: 00:00:01.0, start: 0.000000, bitrate: N/A
Stream #0.0: Video: mjpeg, 352x240, 1.99 fps
Output #0, mpeg, to 'Event-20900.mpg':
Stream #0.0: Video: mpeg1video (hq), 352x240, 5.00 fps, q=2-31, 200 kb/s
Stream mapping:
Stream #0.0 -> #0.0
[mpeg1video @ 0x733970]MPEG1/2 doesnt support 5/1 fps
Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Error: 1 at /usr/local/bin/zmvideo.pl line 274.

Thanks.

Don

System: Debian Sarge AMD64
Don Hayward
Mote Marine Laboratory
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Hi Don,
That error is from clicking create video and I don't think it has anything to do with the actual streaming. The newer versions of ffmpeg will give that error if strict is not set. I have built a machine where I would see that error and could not create video (with out strict set) but I could stream mpeg. Did you upgrade ffmpeg and not rebuild ZM on the new libraries maybe?
Regards,
Cordel
donatmote
Posts: 31
Joined: Mon Jan 24, 2005 6:06 pm
Location: Sarasota, FL US

Post by donatmote »

Hi Cordel,

Thanks -- you were right -- that had nothing to do with my primary problem.

In that regard, I found this url in an old apache access log and tried it:

http://zoneminder.mote.org/cgi-bin/zm/z ... &maxfps=15

It worked -- I have updating images on my browser. So zms is working.

I can see zm_html_view_watchfeed being called, but the url for zms never shows up. Is there a way to trace php execution to determine where the processessing is failing? I've always used mod_perl and this is a little opaque to me.

Thanks again.

Don
Don Hayward
Mote Marine Laboratory
donatmote
Posts: 31
Joined: Mon Jan 24, 2005 6:06 pm
Location: Sarasota, FL US

Post by donatmote »

Hi All,

So the placement of an echo statement showed that the token:

$_SERVER['HTTP_HOST'] has a linefeed at the end of it that's breaking up the URL for the zms call. Now I'm looking for where this is generated. Hints are welcome.

Don
Don Hayward
Mote Marine Laboratory
donatmote
Posts: 31
Joined: Mon Jan 24, 2005 6:06 pm
Location: Sarasota, FL US

Post by donatmote »

Hi All again,

This is what I found:

zmconfig.pl will not accept a path beginning with '/' (it asks for a relative path). I had entered
' /cgi-bin/zm/zms' (note the leading space). So the zms url was being built with an included space.

Now the $_SERVER['HTTP_HOST'] token was being returned with no trailing '/' so without my leading '/' the url looked like "...orgcgi-bin..".

So I added the '/' to the line in zm_funcs.php where the url is built:

$stream_src = "http://".$_SERVER['HTTP_HOST']."/".ZM_PATH_ZMS;

And now I have a display in my monitor watch.

If I can just get authenticated logins working.............

Don

System: Debian Etch AMD64
Don Hayward
Mote Marine Laboratory
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Good show Don,
Thank you for the find, time, and the post. So the only question remaining is why does it do this in Debian?
As this currently works with Fedora/RH.
I might see if I can go through the code and make the paths more structured so they follow the same rules. As of now some you need to put the leading forward slash and some you do not. No big deal if you know it's there but a pain for newbies that don't know/understand.
Regards,
Cordel
Locked