Page 1 of 1

ZM v1.24.1 parses RTSP request with additional characters

Posted: Wed Apr 22, 2009 11:45 am
by hiilija
Hello.

I'm using Fedora 10 with freshly compiled ZM v1.24.1. Hardware in use is AVerTV MCE 116 Plus card (cx23416 based) into which via RCA Composite1 is connected König Sec-Cam31+.

VLC takes input and streames it locally out via RTSP. VLC works fine as tested with openRTSP:

Sending request: OPTIONS rtsp://192.168.x.x:8080/test.sdp RTSP/1.0
CSeq: 1
User-Agent: openRTSP (LIVE555 Streaming Media v2008.05.12)


Received OPTIONS response: RTSP/1.0 200 OK
Server: vlc 0.9.9a
Content-Length: 0
Cseq: 1
Public: DESCRIBE,SETUP,TEARDOWN,PLAY,PAUSE,GET_PARAMETER

-- and so on --


Now in ZM I have described a monitor:

Source Type: Remote
Remote Protocol: RTSP
Remote Method: RTP/RTPS
Remote Host Name: 192.168.x.x
Remote Host Port: 8080
Remote Host Path: /test.sdp
Remote Host SubPath : <blank>

From VLC logging I see that ZM is connecting to streaming server but the steaming server doesn't answer much.

From ZM debug log I see:


[NULL @ 0x102edb10] audio codec set to : mp2
[NULL @ 0x102edb10] audio samplerate set to : 90000
[NULL @ 0x102edb10] audio channels set to : 2
[NULL @ 0x102ee510] video codec set to : mpeg1video
[rtsp @ 0x102ea150]hello state=0
04/22/09 13:51:20.113343 zmc_m7[9639].INF-zm_debug.c/292 [New Debug Level = 4, New Debug Log = /tmp/zm_debug.log.09639]
04/22/09 13:51:20.115845 zmc_m7[9639].DB1-zm_monitor.cpp/2260 [Got 1 monitors]
04/22/09 13:51:20.117665 zmc_m7[9639].DB1-zm_thread.cpp/240 [Creating thread]
04/22/09 13:51:20.117934 zmc_m7[9639].DB2-zm_rtsp.cpp/187 [RTSP Local SSRC is 6b8b4567]
04/22/09 13:51:20.117979 zmc_m7[9639].DB1-zm_thread.cpp/276 [Starting thread]
04/22/09 13:51:20.120010 zmc_m7[9641].DB2-zm_thread.cpp/252 [Invoking thread]
04/22/09 13:51:20.133022 zmc_m7[9639].DB1-zm_thread.cpp/297 [Started thread 9641]
04/22/09 13:51:20.137296 zmc_m7[9639].DB1-zm_monitor.cpp/338 [monitor purpose=1]
04/22/09 13:51:20.137400 zmc_m7[9639].DB1-zm_monitor.cpp/345 [mem.size=12166312]
04/22/09 13:51:20.248942 zmc_m7[9639].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 352x288 - Rgb:ff0000, CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:75000, FB:3x
3, MnFP:50, MxFP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0, OF: 0]
04/22/09 13:51:20.283664 zmc_m7[9639].DB1-zm_monitor.cpp/458 [Monitor 1111 has function 2]
04/22/09 13:51:20.283764 zmc_m7[9639].DB1-zm_monitor.cpp/459 [Monitor 1111 LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
04/22/09 13:51:20.283791 zmc_m7[9639].DB1-zm_monitor.cpp/460 [Monitor 1111 IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
04/22/09 13:51:20.287313 zmc_m7[9639].DB1-zm_zone.cpp/889 [Got 1 zones for monitor 1111]
04/22/09 13:51:20.287437 zmc_m7[9639].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 351,0 351,287 0,287']
04/22/09 13:51:20.287469 zmc_m7[9639].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
04/22/09 13:51:20.287495 zmc_m7[9639].DB3-zm_zone.cpp/796 [Got coordinate 351,0 from polygon string]
04/22/09 13:51:20.287519 zmc_m7[9639].DB3-zm_zone.cpp/796 [Got coordinate 351,287 from polygon string]
04/22/09 13:51:20.287542 zmc_m7[9639].DB3-zm_zone.cpp/796 [Got coordinate 0,287 from polygon string]
04/22/09 13:51:20.287573 zmc_m7[9639].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
04/22/09 13:51:20.287644 zmc_m7[9639].DB1-zm_zone.cpp/50 [Initialised zone 7/All - 1 - 352x288 - Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:3041, MxAP:76032, FB:
3x3, MnFP:3041, MxFP:76032, MnBS:2027, MxBS:0, MnB:1, MxB:0, OF: 0]
04/22/09 13:51:20.318739 zmc_m7[9639].DB1-zm_monitor.cpp/2457 [Loaded monitor 7(1111), 1 zones]
04/22/09 13:51:20.318860 zmc_m7[9639].INF-zmc.cpp/186 [Starting Capture]
04/22/09 13:51:20.321168 zmc_m7[9639].DB2-zm_remote_camera_rtsp.cpp/112 [Waiting for sources]
04/22/09 13:51:20.357006 zmc_m7[9641].DB2-zm_rtsp.cpp/44 [Sending RTSP message: SETUP rtsp://192.168.x.x:8080/test.sdp2 RTSP/1.0
Transport: RTP/AVP/TCP;unicast
CSeq: 1

]
04/22/09 13:51:20.379019 zmc_m7[9641].DB2-zm_rtsp.cpp/70 [Received RTSP response: RTSP/1.0 404 Not found
Content-Length: 321
Content-Type: text/html

<xml>
<DOCTYPE>
<html>
<head>
<title>Not found</title>
</head>
<body>
<h1>404 Not found (/test.sdp2)</h1>
<hr>
<a>VideoLAN</a>
</body>
</html>
(393 bytes)]
04/22/09 13:51:20.379234 zmc_m7[9641].ERR-zm_rtsp.cpp/90 [Unexpected response code 404, text is 'Not found']
04/22/09 13:51:20.379743 zmc_m7[9641].DB2-zm_thread.cpp/263 [Exiting thread, status 0xffffffff]
04/22/09 13:51:25.323547 zmc_m7[9639].FAT-zm_remote_camera_rtsp.cpp/118 [No RTSP sources]


Out of the blue there is a number "2" at the end of the request so that original /test.sdp becomes /test.sdp2

All right, just to be sure I'll add to this monitor configuration:

Remote Host SubPath : /trackID=1 (is was <blank>)

I test with openRTSP, everything works for it:

...

Received PLAY response: RTSP/1.0 200 OK
Server: vlc 0.9.9a
Date: Wed, 22 Apr 2009 11:12:10 GMT
RTP-Info: rtsp://192.168.x.x:8080/test.sdp/trackID=0;seq=36382, rtsp://192.168.x.x:8080/test.sdp/trackID=1;seq=20610
Session: 728ff9f9140a92b3
Content-Length: 0
Cache-Control: no-cache
Cseq: 5

...


but when I have a look in ZM debug log what do I see:

[NULL @ 0x102edb10] audio codec set to : mp2
[NULL @ 0x102edb10] audio samplerate set to : 90000
[NULL @ 0x102edb10] audio channels set to : 2
[NULL @ 0x102ee510] video codec set to : mpeg1video
[rtsp @ 0x102ea150]hello state=0
04/22/09 14:13:17.127560 zmc_m7[9792].INF-zm_debug.c/292 [New Debug Level = 4, New Debug Log = /tmp/zm_debug.log.09792]
04/22/09 14:13:17.132027 zmc_m7[9792].DB1-zm_monitor.cpp/2260 [Got 1 monitors]
04/22/09 14:13:17.133827 zmc_m7[9792].DB1-zm_thread.cpp/240 [Creating thread]
04/22/09 14:13:17.134098 zmc_m7[9792].DB2-zm_rtsp.cpp/187 [RTSP Local SSRC is 6b8b4567]
04/22/09 14:13:17.134143 zmc_m7[9792].DB1-zm_thread.cpp/276 [Starting thread]
04/22/09 14:13:17.134635 zmc_m7[9794].DB2-zm_thread.cpp/252 [Invoking thread]
04/22/09 14:13:17.151928 zmc_m7[9792].DB1-zm_thread.cpp/297 [Started thread 9794]
04/22/09 14:13:17.156784 zmc_m7[9792].DB1-zm_monitor.cpp/338 [monitor purpose=1]
04/22/09 14:13:17.156887 zmc_m7[9792].DB1-zm_monitor.cpp/345 [mem.size=12166312]
04/22/09 14:13:17.295654 zmc_m7[9792].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 352x288 - Rgb:ff0000, CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:75000, FB:3x
3, MnFP:50, MxFP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0, OF: 0]
04/22/09 14:13:17.335789 zmc_m7[9792].DB1-zm_monitor.cpp/458 [Monitor 1111 has function 2]
04/22/09 14:13:17.335887 zmc_m7[9792].DB1-zm_monitor.cpp/459 [Monitor 1111 LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
04/22/09 14:13:17.335914 zmc_m7[9792].DB1-zm_monitor.cpp/460 [Monitor 1111 IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
04/22/09 14:13:17.337852 zmc_m7[9792].DB1-zm_zone.cpp/889 [Got 1 zones for monitor 1111]
04/22/09 14:13:17.337975 zmc_m7[9792].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 351,0 351,287 0,287']
04/22/09 14:13:17.338010 zmc_m7[9792].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
04/22/09 14:13:17.338036 zmc_m7[9792].DB3-zm_zone.cpp/796 [Got coordinate 351,0 from polygon string]
04/22/09 14:13:17.338061 zmc_m7[9792].DB3-zm_zone.cpp/796 [Got coordinate 351,287 from polygon string]
04/22/09 14:13:17.338084 zmc_m7[9792].DB3-zm_zone.cpp/796 [Got coordinate 0,287 from polygon string]
04/22/09 14:13:17.338122 zmc_m7[9792].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
04/22/09 14:13:17.338152 zmc_m7[9792].DB1-zm_zone.cpp/50 [Initialised zone 7/All - 1 - 352x288 - Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:3041, MxAP:76032, FB:
3x3, MnFP:3041, MxFP:76032, MnBS:2027, MxBS:0, MnB:1, MxB:0, OF: 0]
04/22/09 14:13:17.350861 zmc_m7[9792].DB1-zm_monitor.cpp/2457 [Loaded monitor 7(1111), 1 zones]
04/22/09 14:13:17.350973 zmc_m7[9792].INF-zmc.cpp/186 [Starting Capture]
04/22/09 14:13:17.351506 zmc_m7[9792].DB2-zm_remote_camera_rtsp.cpp/112 [Waiting for sources]
04/22/09 14:13:17.377050 zmc_m7[9794].DB2-zm_rtsp.cpp/44 [Sending RTSP message: SETUP rtsp://192.168.x.x:8080/test.sdp/trackID=12 RTSP/1.0
Transport: RTP/AVP/TCP;unicast
CSeq: 1

]
04/22/09 14:13:17.398890 zmc_m7[9794].DB2-zm_rtsp.cpp/70 [Received RTSP response: RTSP/1.0 404 Not found
Content-Length: 331
Content-Type: text/html

(72 bytes)]
04/22/09 14:13:17.399101 zmc_m7[9794].ERR-zm_rtsp.cpp/90 [Unexpected response code 404, text is 'Not found']
04/22/09 14:13:17.399568 zmc_m7[9794].DB2-zm_thread.cpp/263 [Exiting thread, status 0xffffffff]
04/22/09 14:13:22.353854 zmc_m7[9792].FAT-zm_remote_camera_rtsp.cpp/118 [No RTSP sources]
04/22/09 14:13:22.355365 zmc_m7[9792].INF-zm_signal.cpp/64 [Got signal 6 (Aborted), exiting and forcing backtrace]
04/22/09 14:13:22.356716 zmc_m7[9792].ERR-zm_signal.cpp/84 [Signal address is (nil), from 0x7f6416]
04/22/09 14:13:22.357834 zmc_m7[9792].ERR-zm_signal.cpp/122 [Backtrace: [0x7f6416]]
04/22/09 14:13:22.358350 zmc_m7[9792].ERR-zm_signal.cpp/122 [Backtrace: [0x7f6416]]
04/22/09 14:13:22.358760 zmc_m7[9792].ERR-zm_signal.cpp/122 [Backtrace: /lib/libc.so.6(gsignal+0x50) [0x13b460]]
04/22/09 14:13:22.359120 zmc_m7[9792].ERR-zm_signal.cpp/122 [Backtrace: /lib/libc.so.6(abort+0x188) [0x13ce28]]
04/22/09 14:13:22.360291 zmc_m7[9792].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x805586b]]
04/22/09 14:13:22.360747 zmc_m7[9792].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x807c204]]
04/22/09 14:13:22.361096 zmc_m7[9792].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x804c87e]]
04/22/09 14:13:22.361569 zmc_m7[9792].ERR-zm_signal.cpp/122 [Backtrace: /lib/libc.so.6(__libc_start_main+0xe5) [0x1266e5]]
04/22/09 14:13:22.363556 zmc_m7[9792].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x804c431]]
04/22/09 14:13:22.363981 zmc_m7[9792].INF-zm_signal.cpp/125 [Backtrace complete, please execute the following command for more information]


So again,

/trackID=1 became /trackID=12

At the end of the RTSP request is number "2" which I obviously don't want to be there.

Any comments how to get rid of that?

Thanks in advance.

Posted: Sun May 17, 2009 6:18 am
by belanger
In the subpath put /trackID= , nothing else. The number after the equal sign is added by ZM according to the response given to ZM by your camera.

Pierre B.