RTSP error

Forum for questions and support relating to the 1.24.x releases only.
Locked
bristoldave
Posts: 48
Joined: Thu Mar 05, 2009 9:42 pm

RTSP error

Post by bristoldave »

After Maygion released a new firmware for my IPCamera which supports RTSP streaming, I've tried getting it working in ZoneMinder but with no success.

I can view it fine in VLC by opening rtsp://admin:admin@192.168.2.103:80

However, with the following settings in ZM:

Remote Protocol: RTSP
Remote Method: RTP/Unicast
Remote Host Name: admin:admin@192.168.2.103
Remote Host Port: 80
Remote Host Path: (left blank)

I get these errors:

Code: Select all

12/30/09 00:16:44.112397 zmc_m6[5005].INF-zm_debug.c/296 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.05005]
12/30/09 00:16:44.112935 zmc_m6[5005].DB1-zm_monitor.cpp/2273 [Got 1 monitors]
12/30/09 00:16:44.114063 zmc_m6[5005].DB1-zm_thread.cpp/241 [Creating thread]
12/30/09 00:16:44.114160 zmc_m6[5005].DB2-zm_rtsp.cpp/187 [RTSP Local SSRC is 5ff8c86a]
12/30/09 00:16:44.114180 zmc_m6[5005].DB1-zm_thread.cpp/280 [Starting thread]
12/30/09 00:16:44.114341 zmc_m6[5006].DB2-zm_thread.cpp/253 [Invoking thread]
12/30/09 00:16:44.114640 zmc_m6[5005].DB1-zm_thread.cpp/301 [Started thread 5006]
12/30/09 00:16:44.115308 zmc_m6[5006].DB2-zm_rtsp.cpp/46 [Sending RTSP message: DESCRIBE rtsp://192.168.2.103:80/ RTSP/1.0
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: ZoneMinder/1.24.2
CSeq: 1

]
12/30/09 00:16:44.119863 zmc_m6[5005].DB1-zm_monitor.cpp/338 [monitor purpose=1]
12/30/09 00:16:44.119914 zmc_m6[5005].DB1-zm_monitor.cpp/345 [mem.size=36865192]
12/30/09 00:16:44.120007 zmc_m6[5005].DB1-zm_monitor.cpp/369 [Unable to map file /dev/shm/zm.mmap.6 (36865192 bytes) to locked memory, trying unlocked]
12/30/09 00:16:44.213896 zmc_m6[5005].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 640x480 - 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, OF: 0]
12/30/09 00:16:44.229434 zmc_m6[5005].DB1-zm_monitor.cpp/458 [Monitor Drive-Front has function 2]
12/30/09 00:16:44.229486 zmc_m6[5005].DB1-zm_monitor.cpp/459 [Monitor Drive-Front LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
12/30/09 00:16:44.229503 zmc_m6[5005].DB1-zm_monitor.cpp/460 [Monitor Drive-Front IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
12/30/09 00:16:44.229799 zmc_m6[5005].DB1-zm_zone.cpp/889 [Got 1 zones for monitor Drive-Front]
12/30/09 00:16:44.229843 zmc_m6[5005].DB5-zm_zone.cpp/918 [Parsing polygon 0,0 639,0 639,479 0,479]
12/30/09 00:16:44.229860 zmc_m6[5005].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 639,0 639,479 0,479']
12/30/09 00:16:44.229876 zmc_m6[5005].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
12/30/09 00:16:44.229892 zmc_m6[5005].DB3-zm_zone.cpp/796 [Got coordinate 639,0 from polygon string]
12/30/09 00:16:44.229909 zmc_m6[5005].DB3-zm_zone.cpp/796 [Got coordinate 639,479 from polygon string]
12/30/09 00:16:44.229925 zmc_m6[5005].DB3-zm_zone.cpp/796 [Got coordinate 0,479 from polygon string]
12/30/09 00:16:44.229947 zmc_m6[5005].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
12/30/09 00:16:44.229968 zmc_m6[5005].DB1-zm_zone.cpp/50 [Initialised zone 6/All - 1 - 640x480 - Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:9216, MxAP:230400, FB:3x3, MnFP:9216, MxFP:230400, MnBS:6144, MxBS:0, MnB:1, MxB:0, OF: 0]
12/30/09 00:16:44.244380 zmc_m6[5005].DB1-zm_monitor.cpp/2470 [Loaded monitor 6(Drive-Front), 1 zones]
12/30/09 00:16:44.244435 zmc_m6[5005].INF-zmc.cpp/188 [Starting Capture]
12/30/09 00:16:44.244710 zmc_m6[5005].DB2-zm_remote_camera_rtsp.cpp/112 [Waiting for sources]
12/30/09 00:16:45.115555 zmc_m6[5006].DB2-zm_rtsp.cpp/72 [Received RTSP response: RTSP/1.0 200 OK
CSeq: 1
Content-Base: maygion_rtsp_ipcamera
Content-type: application/sdp
Content-length: 322

v=0
s=MJPEG RTSP stream(www.maygion.com)
i=MJPEG RTSP stream(www.maygion.com)
t=0 0
a=tool:MJPEG RTSP stream(www.maygion.com)
a=control:*
a=range:ntp=0-
a=x-qt-text-nam:MJPEG RTSP stream(www.maygion.com)
a=x-qt-text-inf:MJPEG RTSP stream(www.maygion.com)
m=video 0 RTP/AVP 26
c=IN IP4 0.0.0.0
a=control:track1
 (439 bytes)]
12/30/09 00:16:45.115690 zmc_m6[5006].DB1-zm_rtsp.cpp/304 [Processing SDP 'v=0
s=MJPEG RTSP stream(www.maygion.com)
i=MJPEG RTSP stream(www.maygion.com)
t=0 0
a=tool:MJPEG RTSP stream(www.maygion.com)
a=control:*
a=range:ntp=0-
a=x-qt-text-nam:MJPEG RTSP stream(www.maygion.com)
a=x-qt-text-inf:MJPEG RTSP stream(www.maygion.com)
m=video 0 RTP/AVP 26
c=IN IP4 0.0.0.0
a=control:track1
']
12/30/09 00:16:45.115771 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'v=0']
12/30/09 00:16:45.115793 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 's=MJPEG RTSP stream(www.maygion.com)']
12/30/09 00:16:45.115911 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'i=MJPEG RTSP stream(www.maygion.com)']
12/30/09 00:16:45.115931 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 't=0 0']
12/30/09 00:16:45.115947 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'a=tool:MJPEG RTSP stream(www.maygion.com)']
12/30/09 00:16:45.115976 zmc_m6[5006].DB3-zm_sdp.cpp/259 [Ignoring general SDP attribute 'tool:MJPEG RTSP stream(www.maygion.com)']
12/30/09 00:16:45.115997 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'a=control:*']
12/30/09 00:16:45.116022 zmc_m6[5006].DB3-zm_sdp.cpp/259 [Ignoring general SDP attribute 'control:*']
12/30/09 00:16:45.116042 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'a=range:ntp=0-']
12/30/09 00:16:45.116067 zmc_m6[5006].DB3-zm_sdp.cpp/259 [Ignoring general SDP attribute 'range:ntp=0-']
12/30/09 00:16:45.116084 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'a=x-qt-text-nam:MJPEG RTSP stream(www.maygion.com)']
12/30/09 00:16:45.116106 zmc_m6[5006].DB3-zm_sdp.cpp/259 [Ignoring general SDP attribute 'x-qt-text-nam:MJPEG RTSP stream(www.maygion.com)']
12/30/09 00:16:45.116124 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'a=x-qt-text-inf:MJPEG RTSP stream(www.maygion.com)']
12/30/09 00:16:45.116147 zmc_m6[5006].DB3-zm_sdp.cpp/259 [Ignoring general SDP attribute 'x-qt-text-inf:MJPEG RTSP stream(www.maygion.com)']
12/30/09 00:16:45.116165 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'm=video 0 RTP/AVP 26']
12/30/09 00:16:45.116199 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'c=IN IP4 0.0.0.0']
12/30/09 00:16:45.116234 zmc_m6[5006].DB3-zm_sdp.cpp/126 [Processing SDP line 'a=control:track1']
12/30/09 00:16:45.116855 zmc_m6[5006].DB1-zm_sdp.cpp/305 [Looking for codec for video payload type 26 / ]
12/30/09 00:16:45.116879 zmc_m6[5006].DB1-zm_sdp.cpp/318 [Got static payload type 26, JPEG]
12/30/09 00:16:45.117079 zmc_m6[5006].DB2-zm_rtsp.cpp/139 [Assigned RTP port range is 40200-40499]
12/30/09 00:16:45.117147 zmc_m6[5006].DB2-zm_rtsp.cpp/46 [Sending RTSP message: SETUP rtsp://192.168.2.103:80//track1 RTSP/1.0
Transport: RTP/AVP;unicast;client_port=40200-40201
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: ZoneMinder/1.24.2
CSeq: 2

]
12/30/09 00:16:45.128937 zmc_m6[5006].DB2-zm_rtsp.cpp/72 [Received RTSP response: RTSP/1.0 200 OK
CSeq: 2
Session: 176
Transport: RTP/AVP;unicast;interleaved=0-1

 (86 bytes)]
12/30/09 00:16:45.129016 zmc_m6[5006].DB2-zm_rtsp.cpp/396 [Got RTSP session 176, timeout 0 secs]
12/30/09 00:16:45.129035 zmc_m6[5006].DB2-zm_rtsp.cpp/401 [Got RTSP transport RTP/AVP;unicast;interleaved=0-1]
12/30/09 00:16:45.129095 zmc_m6[5006].DB2-zm_rtsp.cpp/449 [RTSP Method is RTP/RTSP]
12/30/09 00:16:45.129130 zmc_m6[5006].DB2-zm_rtsp.cpp/450 [RTSP Distribution is unicast]
12/30/09 00:16:45.129148 zmc_m6[5006].DB2-zm_rtsp.cpp/451 [RTSP SSRC is 0]
12/30/09 00:16:45.129165 zmc_m6[5006].DB2-zm_rtsp.cpp/452 [RTSP Local Host is ]
12/30/09 00:16:45.129183 zmc_m6[5006].DB2-zm_rtsp.cpp/453 [RTSP Local Ports are 40200/40201]
12/30/09 00:16:45.129201 zmc_m6[5006].DB2-zm_rtsp.cpp/454 [RTSP Remote Ports are 0/0]
12/30/09 00:16:45.129217 zmc_m6[5006].DB2-zm_rtsp.cpp/455 [RTSP Remote Channels are 0/1]
12/30/09 00:16:45.129249 zmc_m6[5006].DB2-zm_rtsp.cpp/46 [Sending RTSP message: PLAY rtsp://192.168.2.103:80/ RTSP/1.0
Session: 176
Range: npt=0.000-
Authorization: Basic YWRtaW46YWRtaW4=
User-Agent: ZoneMinder/1.24.2
CSeq: 3

]
12/30/09 00:16:45.143886 zmc_m6[5006].DB2-zm_rtsp.cpp/72 [Received RTSP response: RTSP/1.0 200 OK
CSeq: 3
Session: 176

 (42 bytes)]
12/30/09 00:16:45.143939 zmc_m6[5006].FAT-zm_rtsp.cpp/471 [Unable to get RTP Info identifier from response 'RTSP/1.0 200 OK
CSeq: 3
Session: 176

']
I've tried the different Remote Methods with no success.

Also, if I try to set the Source Type to ffmpeg and the source path to rtsp://admin:admin@192.168.2.103:80 I get:

Code: Select all

12/30/09 00:42:54.859489 zms[6323].INF-zm_debug.c/296 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.06323]
12/30/09 00:42:54.859739 zms[6323].DB1-zms.cpp/98 [Query: mode=jpeg&monitor=6&scale=100&maxfps=15&buffer=1000&connkey=536821&rand=1262133774]
12/30/09 00:42:54.860153 zms[6323].DB1-zm_monitor.cpp/2273 [Got 1 monitors]
12/30/09 00:42:54.865606 zms[6323].DB1-zm_monitor.cpp/338 [monitor purpose=0]
12/30/09 00:42:54.865666 zms[6323].DB1-zm_monitor.cpp/345 [mem.size=36865192]
12/30/09 00:42:54.865764 zms[6323].DB1-zm_monitor.cpp/369 [Unable to map file /dev/shm/zm.mmap.6 (36865192 bytes) to locked memory, trying unlocked]
12/30/09 00:42:54.865959 zms[6323].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 640x480 - 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, OF: 0]
12/30/09 00:42:54.880972 zms[6323].DB1-zm_monitor.cpp/458 [Monitor Drive-Front has function 2]
12/30/09 00:42:54.881029 zms[6323].DB1-zm_monitor.cpp/459 [Monitor Drive-Front LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
12/30/09 00:42:54.881049 zms[6323].DB1-zm_monitor.cpp/460 [Monitor Drive-Front IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
12/30/09 00:42:54.881070 zms[6323].DB1-zm_monitor.cpp/2470 [Loaded monitor 6(Drive-Front), 0 zones]
12/30/09 00:42:54.881284 zms[6323].DB3-zm_stream.cpp/58 [FPS:0.00, MXFPS:15.00, BFPS:0.00, EFPS:0.00, FM:1]
12/30/09 00:42:54.881337 zms[6323].DB3-zm_stream.cpp/65 [aEFPS:0.00, aFM:1]
12/30/09 00:42:54.881474 zms[6323].DB2-zm_monitor.cpp/3385 [Checking swap image location]
12/30/09 00:42:54.881494 zms[6323].DB3-zm_monitor.cpp/3386 [Checking swap image path]
12/30/09 00:42:54.881557 zms[6323].DB3-zm_monitor.cpp/2879 [Swap path '/tmp/zmswap-m6/zmswap-q536821' missing, creating]
12/30/09 00:42:54.881702 zms[6323].DB2-zm_monitor.cpp/3407 [Assigning temporary buffer]
12/30/09 00:42:54.892692 zms[6323].DB2-zm_monitor.cpp/3410 [Assigned temporary buffer]
12/30/09 00:42:55.393049 zms[6323].ERR-zm_monitor.cpp/3590 [Terminating, last frame sent time 1262133774.892803 secs more than maximum of 10.000000]
12/30/09 00:42:55.393292 zms[6323].DB1-zm_monitor.cpp/3599 [Cleaning swap files from /tmp/zmswap-m6/zmswap-q536821]
12/30/09 00:42:55.393424 zms[6323].DB1-zm_monitor.cpp/3627 [Can't glob '/tmp/zmswap-m6/zmswap-q536821/*.*': 3]
If I try ffmpeg -i rtsp://admin:admin@192.168.2.103:80 /tmp/cam.avi on the command line, it just hangs with:

Code: Select all

FFmpeg version SVN-r20969, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  built on Dec 29 2009 23:39:58 with gcc 4.3.3
  configuration: --enable-gpl --enable-postproc --enable-pthreads
  libavutil     50. 7. 0 / 50. 7. 0
  libavcodec    52.45. 0 / 52.45. 0
  libavformat   52.44. 0 / 52.44. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 2 /  0. 7. 2
  libpostproc   51. 2. 0 / 51. 2. 0
until I ^C it.

Does anyone know what is causing this, and how to fix it?

Thanks
coke
Posts: 518
Joined: Wed Jan 30, 2008 5:53 pm
Location: St. Louis, MO, USA

Post by coke »

Hangs with, or is that avi file getting bigger and bigger? Try ffplay instead of ffmpeg, then you can see what it's seeing.
bristoldave
Posts: 48
Joined: Thu Mar 05, 2009 9:42 pm

Post by bristoldave »

coke wrote:Hangs with, or is that avi file getting bigger and bigger? Try ffplay instead of ffmpeg, then you can see what it's seeing.
It just hangs, the AVI file isn't even created. This server isn't running a GUI, but I'll try ffplay on my Ubuntu netbook. Thanks for the advice
hapi
Posts: 1
Joined: Fri Jan 15, 2010 4:35 pm

Same here 1.9 firmware

Post by hapi »

same here havent got it work even with 1.9 firmware
zmc_m3[25425]: FAT [Unable to get RTP Info identifier from response 'RTSP/1.0 200 OK^M CSeq: 3^M Session: 86^M ^M ']
bristoldave
Posts: 48
Joined: Thu Mar 05, 2009 9:42 pm

Post by bristoldave »

Yeah, I've still got the same problem with the 1.9 firmware.

Does the error suggest the camera isn't sending the response it should (or at least, the response that ZM is expecting)?
TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy »

1. Need to compile libx264 in ffmpeg:

FFmpeg version SVN-r19928, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-static --enable-shared --cc=x86_64-pc-linux-gnu-gcc --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --enable-libdc1394 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-x11grab --enable-pthreads --enable-libdirac --enable-libspeex --enable-libopenjpeg --disable-altivec --cpu=core2 --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --enable-avfilter-lavf --disable-stripping --enable-hardcoded-tables
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.35. 0 / 52.35. 0
libavformat 52.38. 0 / 52.38. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 0. 5. 0 / 0. 5. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 9 2009 18:30:34, gcc: 4.3.3

Make sure ffmpeg lists "--enable-libx264"
use the ffmpeg verbose switch "-v {number}" to provide more detals

2. Can you try removing authentication and retry ffmpeg? Perhaps is related to authentication.

3. I assume you've powered cycled the camera after you upgraded the firmware?
bristoldave
Posts: 48
Joined: Thu Mar 05, 2009 9:42 pm

Post by bristoldave »

TechGuy wrote:1. Need to compile libx264 in ffmpeg:
Wow, this may well be the answer to the ffmpeg problem, I haven't complied libx264 in it (will do this tonight)
TechGuy wrote:Can you try removing authentication and retry ffmpeg? Perhaps is related to authentication.
It may well be, but as far as I can tell there's no way of removing authentication for the RTSP stream on this camera :(
TechGuy wrote:3. I assume you've powered cycled the camera after you upgraded the firmware?
Yes, the firmware upgrade on the camera's HTTP interface does this automatically.

Thanks for your help!
TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy »

bristoldave wrote: Yes, the firmware upgrade on the camera's HTTP interface does this automatically.

Thanks for your help!
I would physically power cycle than assume it. Never hurts to to double check.
bristoldave
Posts: 48
Joined: Thu Mar 05, 2009 9:42 pm

Post by bristoldave »

OK, I've recompileed ffmpeg with --enable-libx264 but still having the same issue. I have power-cycled the camera TNA. I should also reiterate that it works in VLC.

Assuming it's not an authentication problem, are there any other options I'd need to compile ffmpeg with?
TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy »

bristoldave wrote:OK, I've recompileed ffmpeg with --enable-libx264 but still having the same issue. I have power-cycled the camera TNA. I should also reiterate that it works in VLC.

Assuming it's not an authentication problem, are there any other options I'd need to compile ffmpeg with?
verbose logging? Can you post the output?
bristoldave
Posts: 48
Joined: Thu Mar 05, 2009 9:42 pm

Post by bristoldave »

I'm getting very little output at all. If I type ffmpeg -loglevel debug -v 3 -i rtsp://admin:admin@192.168.2.103:80 /tmp/cam.avi I'm getting:

Code: Select all

FFmpeg version SVN-r21006, Copyright (c) 2000-2010 Fabrice Bellard, et al.
  built on Jan 20 2010 00:02:19 with gcc 4.3.3
  configuration: --enable-gpl --enable-shared --enable-pthreads --enable-libx264
  libavutil     50. 7. 0 / 50. 7. 0
  libavcodec    52.45. 0 / 52.45. 0
  libavformat   52.46. 0 / 52.46. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 2 /  0. 7. 2
[rtsp @ 0x97b2390]hello state=0
And then it just hangs until I ^C it.

If I try ffmpeg -loglevel debug -v 3 -i rtsp://192.168.2.103:80 -y -an /tmp/cam.avi (i.e. without the authentication), I get:

Code: Select all

FFmpeg version SVN-r21006, Copyright (c) 2000-2010 Fabrice Bellard, et al.
  built on Jan 20 2010 00:02:19 with gcc 4.3.3
  configuration: --enable-gpl --enable-shared --enable-pthreads --enable-libx264
  libavutil     50. 7. 0 / 50. 7. 0
  libavcodec    52.45. 0 / 52.45. 0
  libavformat   52.46. 0 / 52.46. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 2 /  0. 7. 2
rtsp://192.168.2.103:80/0: Error while parsing header
TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy »

I think its because the rtsp authentication code hasn't been included in the SVN releases yet. I thought I recall it was added, but perhaps its not yet included. The rtsp.c file in the ffmpeg source should have something like this in it to support authentication.
http://article.gmane.org/gmane.comp.vid ... entication

You may have apply the patch.

Since you can get VLC working, perhaps "CrazyPilot" use of VLC redirection will work for you:
http://www.zoneminder.com/forums/viewtopic.php?t=13718
bristoldave
Posts: 48
Joined: Thu Mar 05, 2009 9:42 pm

Post by bristoldave »

Looks like the version of ffmpeg I have does have the RTSP Auth code.

CrazyPilot's method looks interesting, I've installed and set up vlc-wrapper and when I try to connect to the port on the IP I've set up with my browser it prompts me to save the Octet stream which looks good, but ZM is still displaying a blank image!

I'm now getting the following errors:

Code: Select all

01/29/10 22:47:20.489164 zms[3469].INF-zm_debug.c/296 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.03469]
01/29/10 22:47:20.489434 zms[3469].DB1-zms.cpp/98 [Query: mode=jpeg&monitor=7&scale=100&maxfps=15&buffer=1000&connkey=267184&rand=1264805239]
01/29/10 22:47:20.490247 zms[3469].DB1-zm_monitor.cpp/2273 [Got 1 monitors]
01/29/10 22:47:20.495294 zms[3469].DB1-zm_monitor.cpp/338 [monitor purpose=0]
01/29/10 22:47:20.495343 zms[3469].DB1-zm_monitor.cpp/345 [mem.size=36865192]
01/29/10 22:47:20.495437 zms[3469].DB1-zm_monitor.cpp/369 [Unable to map file /dev/shm/zm.mmap.7 (36865192 bytes) to locked memory, trying unlocked]
01/29/10 22:47:20.495626 zms[3469].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 640x480 - 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, OF: 0]
01/29/10 22:47:20.512646 zms[3469].DB1-zm_monitor.cpp/458 [Monitor Drive-Front has function 2]
01/29/10 22:47:20.512706 zms[3469].DB1-zm_monitor.cpp/459 [Monitor Drive-Front LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
01/29/10 22:47:20.512723 zms[3469].DB1-zm_monitor.cpp/460 [Monitor Drive-Front IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
01/29/10 22:47:20.512740 zms[3469].DB1-zm_monitor.cpp/2470 [Loaded monitor 7(Drive-Front), 0 zones]
01/29/10 22:47:20.512939 zms[3469].DB3-zm_stream.cpp/58 [FPS:0.00, MXFPS:15.00, BFPS:0.00, EFPS:0.00, FM:1]
01/29/10 22:47:20.513000 zms[3469].DB3-zm_stream.cpp/65 [aEFPS:0.00, aFM:1]
01/29/10 22:47:20.513167 zms[3469].DB2-zm_monitor.cpp/3385 [Checking swap image location]
01/29/10 22:47:20.513186 zms[3469].DB3-zm_monitor.cpp/3386 [Checking swap image path]
01/29/10 22:47:20.513248 zms[3469].DB3-zm_monitor.cpp/2879 [Swap path '/tmp/zmswap-m7/zmswap-q267184' missing, creating]
01/29/10 22:47:20.513409 zms[3469].DB2-zm_monitor.cpp/3407 [Assigning temporary buffer]
01/29/10 22:47:20.524439 zms[3469].DB2-zm_monitor.cpp/3410 [Assigned temporary buffer]
01/29/10 22:47:21.024673 zms[3469].ERR-zm_monitor.cpp/3590 [Terminating, last frame sent time 1264805240.524548 secs more than maximum of 10.000000]
01/29/10 22:47:21.024940 zms[3469].DB1-zm_monitor.cpp/3599 [Cleaning swap files from /tmp/zmswap-m7/zmswap-q267184]
01/29/10 22:47:21.025075 zms[3469].DB1-zm_monitor.cpp/3627 [Can't glob '/tmp/zmswap-m7/zmswap-q267184/*.*': 3]
I'm really pulling my hair out now as I have no idea what this means.
bristoldave
Posts: 48
Joined: Thu Mar 05, 2009 9:42 pm

Post by bristoldave »

Update:

I'm also getting this error:

Code: Select all

01/29/10 22:48:45.029605 zmc_m7[3498].INF-zm_debug.c/296 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.03498]
01/29/10 22:48:45.030099 zmc_m7[3498].DB1-zm_monitor.cpp/2273 [Got 1 monitors]
01/29/10 22:48:45.038539 zmc_m7[3498].DB1-zm_monitor.cpp/338 [monitor purpose=1]
01/29/10 22:48:45.038609 zmc_m7[3498].DB1-zm_monitor.cpp/345 [mem.size=36865192]
01/29/10 22:48:45.038718 zmc_m7[3498].DB1-zm_monitor.cpp/369 [Unable to map file /dev/shm/zm.mmap.7 (36865192 bytes) to locked memory, trying unlocked]
01/29/10 22:48:45.131694 zmc_m7[3498].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 640x480 - 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, OF: 0]
01/29/10 22:48:45.152866 zmc_m7[3498].DB1-zm_monitor.cpp/458 [Monitor Drive-Front has function 2]
01/29/10 22:48:45.152911 zmc_m7[3498].DB1-zm_monitor.cpp/459 [Monitor Drive-Front LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
01/29/10 22:48:45.152927 zmc_m7[3498].DB1-zm_monitor.cpp/460 [Monitor Drive-Front IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
01/29/10 22:48:45.153235 zmc_m7[3498].DB1-zm_zone.cpp/889 [Got 1 zones for monitor Drive-Front]
01/29/10 22:48:45.153276 zmc_m7[3498].DB5-zm_zone.cpp/918 [Parsing polygon 0,0 639,0 639,479 0,479]
01/29/10 22:48:45.153292 zmc_m7[3498].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 639,0 639,479 0,479']
01/29/10 22:48:45.153308 zmc_m7[3498].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
01/29/10 22:48:45.153325 zmc_m7[3498].DB3-zm_zone.cpp/796 [Got coordinate 639,0 from polygon string]
01/29/10 22:48:45.153341 zmc_m7[3498].DB3-zm_zone.cpp/796 [Got coordinate 639,479 from polygon string]
01/29/10 22:48:45.153356 zmc_m7[3498].DB3-zm_zone.cpp/796 [Got coordinate 0,479 from polygon string]
01/29/10 22:48:45.153377 zmc_m7[3498].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
01/29/10 22:48:45.153397 zmc_m7[3498].DB1-zm_zone.cpp/50 [Initialised zone 10/All - 1 - 640x480 - Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:9216, MxAP:230400, FB:3x3, MnFP:9216, MxFP:230400, MnBS:6144, MxBS:0, MnB:1, MxB:0, OF: 0]
01/29/10 22:48:45.168032 zmc_m7[3498].DB1-zm_monitor.cpp/2470 [Loaded monitor 7(Drive-Front), 1 zones]
01/29/10 22:48:45.168096 zmc_m7[3498].INF-zmc.cpp/188 [Starting Capture]
01/29/10 22:48:45.168379 zmc_m7[3498].INF-zm_ffmpeg_camera.cpp/80 [Priming capture from http://192.168.2.104:9023]
01/29/10 22:50:25.486833 zmc_m7[3498].FAT-zm_ffmpeg_camera.cpp/84 [Unable to open input http://192.168.2.104:9023 due to: Operation now in progress]
which I notice you mentioned in another post Did you manage to sort it?
TechGuy
Posts: 47
Joined: Sun Oct 18, 2009 8:16 pm

Post by TechGuy »

I believe the "Operation now in progress" error is a permissions problem with shared memory . If you run zmc as root it works fine. I didn't want to run ZM as root, so instead I launch zmc using a bash script:

#!/bin/bash
while true; do
/usr/bin/zmc -m 1
done

The rest of ZM runs under the apache user context. The only issue is that I have an acti-camera which generates lots of errors, and causes ffmpeg to crash. the "do\while true" loop ensures that ffmpeg is restarted after the crash. I will try updating the camera firmware in the spring. The camera is installed outside and I need a ladder to get to it. Ladders and ice don't go together very well.

I looked at trying to modify the zmdc.pl to spawn just zmc as root. I don't know perl very well and I wasn't able to figure it out.
Locked