Page 3 of 5

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 7:28 pm
by zoneminder
Hmm, can you post a longer stretch of debug if you have it?

I think the HT is the beginning of 'HTTP/1.0 200 OK' which is the first line that should be sent.

This is the output I get from the camera I have found, firmware 2.31 again.

Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Connected to host, socket = 18]
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Request sent]
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Expecting 94 bytes]
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Read 94 bytes]
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB4 [Captured header (80 bytes): 'HTTP/1.0 200 OK^M Content-Type: multipart/x-mixed-replace;boundary=myboundary^M ^M ']
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Got status '200' (OK), http version 1.0]
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Got content type 'multipart/x-mixed-replace' ]
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Got content boundary 'myboundary']
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Unable to extract subheader from stream, retrying]
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Expecting 1380 bytes]
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Read 1380 bytes]
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB4 [Captured subheader (42 bytes):'--myboundary^M Content-Type: image/jpeg^M ^M ']
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Got subcontent type 'image/jpeg']
Mar 19 19:17:29 shuttle52 zmc-m14[4104]: DB3 [Expecting 2760 bytes]
Mar 19 19:17:30 shuttle52 zmc-m14[4104]: DB3 [Read 2760 bytes]
Mar 19 19:17:30 shuttle52 zmc-m14[4104]: DB3 [Expecting 19320 bytes]
Mar 19 19:17:31 shuttle52 zmc-m14[4104]: DB3 [Read 8192 bytes]
Mar 19 19:17:31 shuttle52 zmc-m14[4104]: DB3 [Read 8192 bytes]
Mar 19 19:17:31 shuttle52 zmc-m14[4104]: DB3 [Read 2936 bytes]
Mar 19 19:17:31 shuttle52 zmc-m14[4104]: DB3 [Got end of image, content-length = 12928]
Mar 19 19:17:31 shuttle52 zmc-m14[4104]: DB3 [Returning 12928 (23432) bytes of captured content]
Mar 19 19:17:32 shuttle52 zmc-m14[4104]: DB4 [Captured subheader (46 bytes):'^M ^M --myboundary^M Content-Type: image/jpeg^M ^M ']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got subcontent type 'image/jpeg']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Expecting 78218 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Read 8192 bytes]
Mar 19 19:17:34 shuttle52 last message repeated 8 times
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Read 4490 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got end of image, content-length = 12849]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Returning 12849 (88676) bytes of captured content]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB4 [Captured subheader (46 bytes):'^M ^M --myboundary^M Content-Type: image/jpeg^M ^M ']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got subcontent type 'image/jpeg']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Expecting 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Read 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got end of image, content-length = 12873]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Returning 12873 (77161) bytes of captured content]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB4 [Captured subheader (46 bytes):'^M ^M --myboundary^M Content-Type: image/jpeg^M ^M ']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got subcontent type 'image/jpeg']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Expecting 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Read 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got end of image, content-length = 12930]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Returning 12930 (65622) bytes of captured content]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB4 [Captured subheader (46 bytes):'^M ^M --myboundary^M Content-Type: image/jpeg^M ^M ']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got subcontent type 'image/jpeg']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Expecting 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Read 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got end of image, content-length = 12877]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Returning 12877 (54026) bytes of captured content]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB4 [Captured subheader (46 bytes):'^M ^M --myboundary^M Content-Type: image/jpeg^M ^M ']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got subcontent type 'image/jpeg']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Expecting 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Read 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got end of image, content-length = 12944]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Returning 12944 (42483) bytes of captured content]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB4 [Captured subheader (46 bytes):'^M ^M --myboundary^M Content-Type: image/jpeg^M ^M ']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got subcontent type 'image/jpeg']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Expecting 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Read 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got end of image, content-length = 12915]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Returning 12915 (30873) bytes of captured content]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB4 [Captured subheader (46 bytes):'^M ^M --myboundary^M Content-Type: image/jpeg^M ^M ']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Got subcontent type 'image/jpeg']
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Expecting 1380 bytes]
Mar 19 19:17:34 shuttle52 zmc-m14[4104]: DB3 [Read 1380 bytes]

Phil,

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 7:33 pm
by cybr0t
Hrmm.. ok, it looks like my cam isn't sending the right content type:

Mar 19 14:32:26 bdc zmc: DB1 [Initialising Debug]
Mar 19 14:32:26 bdc zmc-m1[21188]: INF [Debug Level = 9, Debug Log = ]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [Got 1 monitors]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB2 [Request: GET /axis-cgi/mjpg/video.cgi?resolutio
n=640x480 HTTP/1.1 User-Agent: /1.19.1 Host: netcam1.<fqdn>.com Connection: Keep-Alive
]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [monitor purpose=1]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [shm.size=448]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [Initialised zone 0/All - 1 - 0x0 - Rgb:ff0000,
CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:75000, FB:3x3, MnFP:50, MxFP:50000, MnBS:10, MxBS:
0, MnB:0, MxB:0]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [Monitor Netcam1 has function 2]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [Monitor Netcam1 LBF = '%%s - %y/%m/%d %H:%M:%S'
, LBX = 0, LBY = 0]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [Monitor Netcam1 IBC = 100, WUC = 25, pEC = 10,
PEC = 10, FRI = 1000, RBP = 10]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [Got 1 zones for monitor Netcam1]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [Initialised zone 1/All - 1 - 42949672x42949672
- Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:5634997, MxAP:12025909, FB:3x3, MnFP:5634997,
MxFP:12025909, MnBS:18073222, MxBS:0, MnB:1, MxB:0]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB1 [Loaded monitor 1(Netcam1), 1 zones]
Mar 19 14:32:26 bdc zmc-m1[21188]: INF [Starting Capture]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Connected to host, socket = 5]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Request sent]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Expecting 94 bytes]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Read 94 bytes]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB4 [Captured header (80 bytes): 'HTTP/1.0 200 OK^M
Content-Type: multipart/x-mixed-replace;boundary=myboundary^M ^M ']
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Got status '200' (OK), http version 1.0]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Got content type 'multipart/x-mixed-replace' ]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Got content boundary 'myboundary']
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Unable to extract subheader from stream, retryi
ng]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Expecting 1460 bytes]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Read 1460 bytes]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Unable to extract subheader from stream, retryi
ng]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Expecting 1460 bytes]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Read 1460 bytes]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Unable to extract subheader from stream, retryi
ng]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Expecting 1460 bytes]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Read 1460 bytes]
Mar 19 14:32:26 bdc zmc-m1[21188]: DB3 [Unable to extract subheader from stream, retryi
ng]

Perhaps there's some setting in the cam itself I've got wrong?

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 7:43 pm
by zoneminder
Can you do a wget -s on this url? It will probably sit there fetching, just let it go for a few seconds and kill it. If you just 'vi' the saved file and cut and paste the first few lines it might help. Here is mine.

HTTP/1.0 200 OK
Content-Type: multipart/x-mixed-replace;boundary=myboundary

--myboundary^M
Content-Type: image/jpeg^M
^M
ÿØÿþ^@(h ^@^@^@^@^@@~L[Â^A@Zú%nr~@~@^B^@^B^D^@^@^@S^B/d^A^Q^O%

Phil,

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 7:55 pm
by cybr0t
--myboundary^M
Content-Type: image/jpeg^M
^M
ÿØÿþ^@(h ^@^@^@^@^@@~L[¸Y@ZõÁno~@~@^@^@^@^A^@^@^@_^@^_d^A^Q^O3.^U^XÿÛ^@C^@^R^L^M^P^M^K^R^P^N^P^T^S^R^U^[,^]^[^X^X^[6') ,@9DC?9>=GPfWGKaM=>YyZaimrsrEU}~F|o~EfprnÿÛ^@C^A^S^T^T^[^W^[4^]^]4nI>InnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnÿÀ^@^Q^H^@ð^A@^C^A!^@^B^Q^A^C^Q^AÿÄ^@^_^@^@^A^E^A^A^A^A^A^A^@^@^@^@^@^@^@^@^A^B^C^D^E^F^G^H
^KÿÄ^@µ^P^@^B^A^C^C^B^D^C^E^E^D^D^@^@^A}^A^B^C^@^D^Q^E^R!1A^F^SQa^G"q^T2~A~Q¡^H#B±Á^URÑð$3br~B

Looks like it's sending things right but not being interpretted correctly..

-- Cy

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 8:16 pm
by zoneminder
I assume you had the first two lines as well? The HTTP line and first header? Also that you had the later of the teo versions of 1.19.1 (I don't think anyone downloaded the first one).

This is very odd, your stream looks the same as mine but your binary can't read it. I'll mail you the address of the other camera I found, I wonder if you could try that one and see if you get anything different.

Phil,

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 8:20 pm
by cybr0t
Odd.. still doesn't work.. I'm going to try recompiling from scratch, see if that helps.

-- Cy

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 8:48 pm
by cybr0t
Hrmm.. still no go I'm afraid

I've got the right tarball right?

# md5sum zm-1.19.1.tar.gz
95f471adea075ea12aa681730b771b37 zm-1.19.1.tar.gz

-- Cy

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 8:55 pm
by zoneminder
Yes, that's the right version. Did you try the URL I mailed you?

Phil,

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 8:58 pm
by cybr0t
Yeah I did, I get the same error "Unable to extract subheader from stream, retrying"

-- Cy

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 9:18 pm
by zoneminder
That's even interesting'er.

So my binary works with that URL and yours doesn't. That would seem to imply an issue with the build or perhaps more likely, the regular expression libraries. Which distro are you on?

Phil,

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 9:20 pm
by cybr0t
That's what I was thinking.. it wouldn't be the first time..

RedHat 9 presently

-- Cy

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 9:54 pm
by zoneminder
Ack, I'm on RH9 too. So what could be different?

Can you do a

<i>rpm -qa | grep pcre</i>

and list what comes out.

Phil,

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 9:57 pm
by cybr0t
pcre-3.9-10
pcre-devel-3.9-10

-- Cy

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 10:08 pm
by zoneminder
Same here. Oh well. I'm going to sleep on this. I'll try and get back with some other suggestions tomorrow. Maybe I'll send you a test program to try.

Phil,

Re: Empty input file on 1.19.0

Posted: Fri Mar 19, 2004 10:13 pm
by cybr0t
Thanks again for all your help, I really do appreciate it.

In the meantime I'm going to see if I can't make it go on a couple random suse/debian/slack boxes I've got scattered about, I'll post any interesting results.

-- Cy