[all info inside] Having trouble monitoring...

Forum for questions and support relating to the 1.24.x releases only.
talntid
Posts: 17
Joined: Sat Feb 20, 2010 12:10 am

[all info inside] Having trouble monitoring...

Post by talntid »

I am having trouble getting ZM to monitor a live feed.
You can see the live feed here: http://test:test@actinc.dyndns.org/GetData.cgi?CH=1

I am on 1.24.1

I have tried HTTP, regex, etc... lots of stuff to no avail.

I have even tried FFMPEG, and here is the command line I use to download data from it on the terminal, so you can see ffmpeg is capable of doing it...:) Also if you change CH=1 to 2, 3 or 4, it will show the different cameras accordingly.

ffmpeg -y -t 50 -f mjpeg -r 15 -s 640x480 -vcodec mjpeg -i 'http://test:test@actinc.dyndns.org/GetD ... 1&Size=cif' -vcodec copy ./test.avi


I have tried changing resolution size, etc, etc... If you can get it working in your own ZM and confirm it is possible, that would be best, and I would be happy to pay for your time, if you so desire. I would just like to get this working. Any ideas? :) Thanks!!
talntid
Posts: 17
Joined: Sat Feb 20, 2010 12:10 am

Post by talntid »

30 views, no responses. :( no ideas?
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post by mastertheknife »

Seems the live feed doesn't use the standard format because i can't view it with my web browser (Opera 10)
talntid
Posts: 17
Joined: Sat Feb 20, 2010 12:10 am

Post by talntid »

even so... ffmpeg can see it, so zoneminder should also be able to I would think?
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post by mastertheknife »

ZoneMinder is sensitive when it comes to mjpeg, and many cameras stream broken mjpeg.
ffmpeg is probably less sensitive or knows how to deal with such.

Maybe someone that knows about the format can capture your stream and analyze whats wrong and then patch ZM accordingly.

EDIT: Have you tried upgrading to 1.24.2?
talntid
Posts: 17
Joined: Sat Feb 20, 2010 12:10 am

Post by talntid »

I sure hope so :-)


I would be happy to pay for their time.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post by mastertheknife »

I did some capturing and searching and it seems your camera streaming format is broken.

Feb 21 00:08:37 p1400 zmc_m3[28814]: ERR [Found unsupported content type 'image/jpeg;size=352x256']

Content type should be just image/jpeg, without the size part, but lets tell zoneminder to accept your camera's way.

In file zm_remote_camera_http.cpp find this line (It appears twice in ZM 1.24.2, edit in both places):

Code: Select all

					if ( !strcasecmp( content_type, "image/jpeg" ) || !strcasecmp( content_type, "image/jpg" ) )
Change to:

Code: Select all

					if ( !strcasecmp( content_type, "image/jpeg" ) || !strcasecmp( content_type, "image/jpg" ) || !strcasecmp( content_type, "image/jpeg;size=352x256" ) )
Recompile and it should hopefully work.
talntid
Posts: 17
Joined: Sat Feb 20, 2010 12:10 am

Post by talntid »

Thanks for your response!

What will I use for settings afterwards, just normal HTTP stream?
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post by mastertheknife »

Yeah..

Source Type: Remote

Remote Protocol: HTTP
Remote Method: Simple\Regexp (I think regex is faster, try both)
Remote Host Name: test:test@actinc.dyndns.org
Remote Port: 80
Remote Host Path: /GetData.cgi?CH=1
Color: not sure..
Capture height and width: try 352x256 (widthXheight) because thats what your camera tried to report to ZM although thats not 4:3 so im not sure, try going to the camera's setup page and copy from there.
talntid
Posts: 17
Joined: Sat Feb 20, 2010 12:10 am

Post by talntid »

ok, thanks.

currently working on installing from source - i had used a debian package ;)
talntid
Posts: 17
Joined: Sat Feb 20, 2010 12:10 am

Post by talntid »

so to clarify, were you 100% successful in viewing the stream via zoneminder?
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post by mastertheknife »

No i haven't tested, i simply captured few packets and looked at the source to see what generated the error.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post by mastertheknife »

I just compiled and tested and it seems there is more work to change to make ZM work with it.

Feb 21 00:53:39 p1400 zmc_m3[2689]: WAR [Corrupt JPEG data: 2 extraneous bytes before marker 0xd0]
Feb 21 00:53:39 p1400 zmc_m3[2689]: ERR [Captured image does not match expected size, check width, height and colour depth]
Feb 21 00:53:39 p1400 zmc_m3[2689]: ERR [Failed to capture image from monitor 3 (0/1)]
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Post by mastertheknife »

Setting it to 352x256 and 24bit color got it to work, although system log is being flooded with this:

Feb 21 00:56:04 p1400 zmc_m3[2775]: WAR [Corrupt JPEG data: 1 extraneous bytes before marker 0xd0]
Feb 21 00:56:05 p1400 zmc_m3[2775]: WAR [Corrupt JPEG data: 3 extraneous bytes before marker 0xd0]
Feb 21 00:56:05 p1400 zmc_m3[2775]: WAR [Corrupt JPEG data: 3 extraneous bytes before marker 0xd0]
Feb 21 00:56:05 p1400 zmc_m3[2775]: WAR [Corrupt JPEG data: 3 extraneous bytes before marker 0xd0]
Feb 21 00:56:05 p1400 zmc_m3[2775]: WAR [Corrupt JPEG data: 1 extraneous bytes before marker 0xd0]
Feb 21 00:56:05 p1400 zmc_m3[2775]: WAR [Corrupt JPEG data: 3 extraneous bytes before marker 0xd0]
talntid
Posts: 17
Joined: Sat Feb 20, 2010 12:10 am

Post by talntid »

compiling now...
Locked