Zoneminder and FFMPEG RTSP authentication error
Posted: Tue Mar 17, 2009 5:58 am
Hi everyone,
I'm working on getting Zoneminder working in RTSP mode with a Sanyo HD4000 IP camera. My problems currently stem from a bad RTSP implementation in the Sanyo camera. I'm working with a contact there to try and get it fixed, but in the meantime, I'd like to work around the issue if I can.
I'm running on Ubuntu 8.10, and I've compiled the latest SVN versions of FFMPEG and ZM as per the excellent Ubuntu 8.10 Vanilla 32bit (with FFmpeg SVN, ZoneMinder SVN, jscalendar-1.0, cambozola-0.7) guide in the wiki.
Since installing it, I've patched FFMPEG to not send a format string to the camera that breaks the implementation. Since getting that working, ffmpeg will play from the camera correctly, and save into a file.
However, when I capture the packets, I can see that the standalone ffmpeg tool tries the DESCRIBE method, has it rejected as 401 - Authorization Required and then goes straight on to the OPTIONS method, with authorization. A wireshark example is included here:
----------------
No. Time Source Destination Protocol Info
781574 17403.549081 192.168.10.85 192.168.10.89 RTSP DESCRIBE rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0
Frame 781574 (166 bytes on wire, 166 bytes captured)
Ethernet II, Src: AsustekC_6e:0a:26 (00:22:15:6e:0a:26), Dst: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c)
Internet Protocol, Src: 192.168.10.85 (192.168.10.85), Dst: 192.168.10.89 (192.168.10.89)
Transmission Control Protocol, Src Port: 47560 (47560), Dst Port: rtsp (554), Seq: 1, Ack: 1, Len: 112
Real Time Streaming Protocol
Request: DESCRIBE rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0\r\n
Method: DESCRIBE
URL: rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1
Accept: application/sdp\r\n
CSeq: 1\r\n
\r\n
No. Time Source Destination Protocol Info
781576 17403.563115 192.168.10.89 192.168.10.85 RTSP Reply: RTSP/1.0 401 Unauthorized
Frame 781576 (142 bytes on wire, 142 bytes captured)
Ethernet II, Src: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c), Dst: AsustekC_6e:0a:26 (00:22:15:6e:0a:26)
Internet Protocol, Src: 192.168.10.89 (192.168.10.89), Dst: 192.168.10.85 (192.168.10.85)
Transmission Control Protocol, Src Port: rtsp (554), Dst Port: 47560 (47560), Seq: 1, Ack: 113, Len: 88
Real Time Streaming Protocol
Response: RTSP/1.0 401 Unauthorized\r\n
Status: 401
CSeq: 1\r\n
WWW-Authenticate: Basic realm="You need RTSP ID"\r\n
\r\n
No. Time Source Destination Protocol Info
781672 17438.595209 192.168.10.85 192.168.10.89 RTSP OPTIONS rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0
Frame 781672 (179 bytes on wire, 179 bytes captured)
Ethernet II, Src: AsustekC_6e:0a:26 (00:22:15:6e:0a:26), Dst: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c)
Internet Protocol, Src: 192.168.10.85 (192.168.10.85), Dst: 192.168.10.89 (192.168.10.89)
Transmission Control Protocol, Src Port: 47565 (47565), Dst Port: rtsp (554), Seq: 1, Ack: 1, Len: 125
Real Time Streaming Protocol
Request: OPTIONS rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0\r\n
Method: OPTIONS
URL: rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1
CSeq: 1\r\n
Authorization: Basic YWRtaW46YWRtaW4=\r\n
\r\n
No. Time Source Destination Protocol Info
781674 17438.603734 192.168.10.89 192.168.10.85 RTSP Reply: RTSP/1.0 200 OK
Frame 781674 (123 bytes on wire, 123 bytes captured)
Ethernet II, Src: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c), Dst: AsustekC_6e:0a:26 (00:22:15:6e:0a:26)
Internet Protocol, Src: 192.168.10.89 (192.168.10.89), Dst: 192.168.10.85 (192.168.10.85)
Transmission Control Protocol, Src Port: rtsp (554), Dst Port: 47565 (47565), Seq: 1, Ack: 126, Len: 69
Real Time Streaming Protocol
Response: RTSP/1.0 200 OK\r\n
Status: 200
CSeq: 1\r\n
Public: DESCRIBE, SETUP, PLAY, TEARDOWN\r\n
\r\n
----------------
However, when I add the config to ZM, and zmc runs to handle the capture, I only see the first DESCRIBE method, and in the logs I get 'Unable to open Input xxx'.
Wireshark log:
----------------
No. Time Source Destination Protocol Info
783161 17448.618071 192.168.10.85 192.168.10.89 RTSP DESCRIBE rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0
Frame 783161 (166 bytes on wire, 166 bytes captured)
Ethernet II, Src: AsustekC_6e:0a:26 (00:22:15:6e:0a:26), Dst: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c)
Internet Protocol, Src: 192.168.10.85 (192.168.10.85), Dst: 192.168.10.89 (192.168.10.89)
Transmission Control Protocol, Src Port: 47567 (47567), Dst Port: rtsp (554), Seq: 1, Ack: 1, Len: 112
Real Time Streaming Protocol
Request: DESCRIBE rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0\r\n
Method: DESCRIBE
URL: rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1
Accept: application/sdp\r\n
CSeq: 1\r\n
\r\n
No. Time Source Destination Protocol Info
783163 17448.620479 192.168.10.89 192.168.10.85 RTSP Reply: RTSP/1.0 401 Unauthorized
Frame 783163 (142 bytes on wire, 142 bytes captured)
Ethernet II, Src: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c), Dst: AsustekC_6e:0a:26 (00:22:15:6e:0a:26)
Internet Protocol, Src: 192.168.10.89 (192.168.10.89), Dst: 192.168.10.85 (192.168.10.85)
Transmission Control Protocol, Src Port: rtsp (554), Dst Port: 47567 (47567), Seq: 1, Ack: 113, Len: 88
Real Time Streaming Protocol
Response: RTSP/1.0 401 Unauthorized\r\n
Status: 401
CSeq: 1\r\n
WWW-Authenticate: Basic realm="You need RTSP ID"\r\n
\r\n
----------------
ZM Debug log:
----------------
03/17/09 16:45:11.100847 zmc_m4[12762].INF-zm_debug.c/292 [New Debug Level = 7, New Debug Log = /tmp/zm.log]
03/17/09 16:45:11.101065 zmc_m4[12762].DB1-zm_monitor.cpp/2260 [Got 1 monitors]
03/17/09 16:45:11.101397 zmc_m4[12762].DB1-zm_thread.cpp/240 [Creating thread]
03/17/09 16:45:11.101429 zmc_m4[12762].DB2-zm_rtsp.cpp/176 [Protocol is:rtsp]
03/17/09 16:45:11.101447 zmc_m4[12762].DB2-zm_rtsp.cpp/177 [Host is:192.168.10.89]
03/17/09 16:45:11.101460 zmc_m4[12762].DB2-zm_rtsp.cpp/178 [Path is:/VideoInput/1/h264/1]
03/17/09 16:45:11.101473 zmc_m4[12762].DB2-zm_rtsp.cpp/179 [SubPath is:?trackid=1]
03/17/09 16:45:11.101486 zmc_m4[12762].DB2-zm_rtsp.cpp/180 [Auth is:admin:admin]
03/17/09 16:45:11.101541 zmc_m4[12762].DB2-zm_rtsp.cpp/194 [RTSP Local SSRC is 6b8b4567]
03/17/09 16:45:11.101559 zmc_m4[12762].DB1-zm_thread.cpp/276 [Starting thread]
03/17/09 16:45:11.101670 zmc_m4[12763].DB2-zm_thread.cpp/252 [Invoking thread]
03/17/09 16:45:11.101858 zmc_m4[12762].DB1-zm_thread.cpp/297 [Started thread 12763]
03/17/09 16:45:11.107601 zmc_m4[12762].DB1-zm_monitor.cpp/338 [monitor purpose=1]
03/17/09 16:45:11.107639 zmc_m4[12762].DB1-zm_monitor.cpp/345 [mem.size=62209192]
03/17/09 16:45:11.113770 zmc_m4[12763].ERR-zm_rtsp.cpp/313 [Unable to open input 'rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1']
03/17/09 16:45:11.113845 zmc_m4[12763].DB2-zm_thread.cpp/263 [Exiting thread, status 0xffffffff]
03/17/09 16:45:11.193126 zmc_m4[12762].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 960x540 - 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]
03/17/09 16:45:11.207592 zmc_m4[12762].DB1-zm_monitor.cpp/458 [Monitor Sanyo has function 5]
03/17/09 16:45:11.207622 zmc_m4[12762].DB1-zm_monitor.cpp/459 [Monitor Sanyo LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
03/17/09 16:45:11.207629 zmc_m4[12762].DB1-zm_monitor.cpp/460 [Monitor Sanyo IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
03/17/09 16:45:11.207748 zmc_m4[12762].DB1-zm_zone.cpp/889 [Got 1 zones for monitor Sanyo]
03/17/09 16:45:11.207760 zmc_m4[12762].DB5-zm_zone.cpp/918 [Parsing polygon 0,0 959,0 959,539 0,539]
03/17/09 16:45:11.207767 zmc_m4[12762].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 959,0 959,539 0,539']
03/17/09 16:45:11.207775 zmc_m4[12762].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
03/17/09 16:45:11.207782 zmc_m4[12762].DB3-zm_zone.cpp/796 [Got coordinate 959,0 from polygon string]
03/17/09 16:45:11.207789 zmc_m4[12762].DB3-zm_zone.cpp/796 [Got coordinate 959,539 from polygon string]
03/17/09 16:45:11.207795 zmc_m4[12762].DB3-zm_zone.cpp/796 [Got coordinate 0,539 from polygon string]
03/17/09 16:45:11.207804 zmc_m4[12762].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
03/17/09 16:45:11.207813 zmc_m4[12762].DB1-zm_zone.cpp/50 [Initialised zone 4/All - 1 - 960x540 - Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:15552, MxAP:388800, FB:3x3, MnFP:15552, MxFP:388800, MnBS:10368, MxBS:0, MnB:1, MxB:0, OF: 0]
03/17/09 16:45:11.215678 zmc_m4[12762].DB1-zm_monitor.cpp/2457 [Loaded monitor 4(Sanyo), 1 zones]
03/17/09 16:45:11.215706 zmc_m4[12762].INF-zmc.cpp/186 [Starting Capture]
03/17/09 16:45:11.215807 zmc_m4[12762].DB2-zm_remote_camera_rtsp.cpp/112 [Waiting for sources]
03/17/09 16:45:16.216697 zmc_m4[12762].FAT-zm_remote_camera_rtsp.cpp/118 [No RTSP sources]
03/17/09 16:45:16.216955 zmc_m4[12762].INF-zm_signal.cpp/64 [Got signal 6 (Aborted), exiting and forcing backtrace]
03/17/09 16:45:16.217136 zmc_m4[12762].ERR-zm_signal.cpp/84 [Signal address is (nil), from 0xb7f5d430]
03/17/09 16:45:16.217512 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: [0xb7f5d430]]
03/17/09 16:45:16.217593 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: [0xb7f5d430]]
03/17/09 16:45:16.217695 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /lib/tls/i686/cmov/libc.so.6(gsignal+0x50) [0xb72ec8a0]]
03/17/09 16:45:16.217778 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb72ee268]]
03/17/09 16:45:16.217851 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x80562cd]]
03/17/09 16:45:16.217922 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x807fa04]]
03/17/09 16:45:16.217993 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x804d093]]
03/17/09 16:45:16.218064 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb72d7685]]
03/17/09 16:45:16.218137 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x804cc21]]
03/17/09 16:45:16.218208 zmc_m4[12762].INF-zm_signal.cpp/125 [Backtrace complete, please execute the following command for more information]
03/17/09 16:45:16.218287 zmc_m4[12762].INF-zm_signal.cpp/126 [addr2line -e /usr/local/bin/zmc 0xb7f5d430 0xb7f5d430 0xb72ec8a0 0xb72ee268 0x80562cd 0x807fa04 0x804d093 0xb72d7685 0x804cc21]
----------------
The camera's implementation seems to be broken in that it requires basic auth for everything, even the DESCRIBE method. I was just wondering if anyone with better knowledge of ZM and/or FFMPEG code could help.
As far as I can tell from reading the FFMPEG code, it seems that the issue is with the av_open_input_file function - it's getting a 401 and not parsing the username:password string out from the URL, but instead returning an error.
Thanks very much for any help,
Nick Young
I'm working on getting Zoneminder working in RTSP mode with a Sanyo HD4000 IP camera. My problems currently stem from a bad RTSP implementation in the Sanyo camera. I'm working with a contact there to try and get it fixed, but in the meantime, I'd like to work around the issue if I can.
I'm running on Ubuntu 8.10, and I've compiled the latest SVN versions of FFMPEG and ZM as per the excellent Ubuntu 8.10 Vanilla 32bit (with FFmpeg SVN, ZoneMinder SVN, jscalendar-1.0, cambozola-0.7) guide in the wiki.
Since installing it, I've patched FFMPEG to not send a format string to the camera that breaks the implementation. Since getting that working, ffmpeg will play from the camera correctly, and save into a file.
However, when I capture the packets, I can see that the standalone ffmpeg tool tries the DESCRIBE method, has it rejected as 401 - Authorization Required and then goes straight on to the OPTIONS method, with authorization. A wireshark example is included here:
----------------
No. Time Source Destination Protocol Info
781574 17403.549081 192.168.10.85 192.168.10.89 RTSP DESCRIBE rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0
Frame 781574 (166 bytes on wire, 166 bytes captured)
Ethernet II, Src: AsustekC_6e:0a:26 (00:22:15:6e:0a:26), Dst: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c)
Internet Protocol, Src: 192.168.10.85 (192.168.10.85), Dst: 192.168.10.89 (192.168.10.89)
Transmission Control Protocol, Src Port: 47560 (47560), Dst Port: rtsp (554), Seq: 1, Ack: 1, Len: 112
Real Time Streaming Protocol
Request: DESCRIBE rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0\r\n
Method: DESCRIBE
URL: rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1
Accept: application/sdp\r\n
CSeq: 1\r\n
\r\n
No. Time Source Destination Protocol Info
781576 17403.563115 192.168.10.89 192.168.10.85 RTSP Reply: RTSP/1.0 401 Unauthorized
Frame 781576 (142 bytes on wire, 142 bytes captured)
Ethernet II, Src: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c), Dst: AsustekC_6e:0a:26 (00:22:15:6e:0a:26)
Internet Protocol, Src: 192.168.10.89 (192.168.10.89), Dst: 192.168.10.85 (192.168.10.85)
Transmission Control Protocol, Src Port: rtsp (554), Dst Port: 47560 (47560), Seq: 1, Ack: 113, Len: 88
Real Time Streaming Protocol
Response: RTSP/1.0 401 Unauthorized\r\n
Status: 401
CSeq: 1\r\n
WWW-Authenticate: Basic realm="You need RTSP ID"\r\n
\r\n
No. Time Source Destination Protocol Info
781672 17438.595209 192.168.10.85 192.168.10.89 RTSP OPTIONS rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0
Frame 781672 (179 bytes on wire, 179 bytes captured)
Ethernet II, Src: AsustekC_6e:0a:26 (00:22:15:6e:0a:26), Dst: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c)
Internet Protocol, Src: 192.168.10.85 (192.168.10.85), Dst: 192.168.10.89 (192.168.10.89)
Transmission Control Protocol, Src Port: 47565 (47565), Dst Port: rtsp (554), Seq: 1, Ack: 1, Len: 125
Real Time Streaming Protocol
Request: OPTIONS rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0\r\n
Method: OPTIONS
URL: rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1
CSeq: 1\r\n
Authorization: Basic YWRtaW46YWRtaW4=\r\n
\r\n
No. Time Source Destination Protocol Info
781674 17438.603734 192.168.10.89 192.168.10.85 RTSP Reply: RTSP/1.0 200 OK
Frame 781674 (123 bytes on wire, 123 bytes captured)
Ethernet II, Src: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c), Dst: AsustekC_6e:0a:26 (00:22:15:6e:0a:26)
Internet Protocol, Src: 192.168.10.89 (192.168.10.89), Dst: 192.168.10.85 (192.168.10.85)
Transmission Control Protocol, Src Port: rtsp (554), Dst Port: 47565 (47565), Seq: 1, Ack: 126, Len: 69
Real Time Streaming Protocol
Response: RTSP/1.0 200 OK\r\n
Status: 200
CSeq: 1\r\n
Public: DESCRIBE, SETUP, PLAY, TEARDOWN\r\n
\r\n
----------------
However, when I add the config to ZM, and zmc runs to handle the capture, I only see the first DESCRIBE method, and in the logs I get 'Unable to open Input xxx'.
Wireshark log:
----------------
No. Time Source Destination Protocol Info
783161 17448.618071 192.168.10.85 192.168.10.89 RTSP DESCRIBE rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0
Frame 783161 (166 bytes on wire, 166 bytes captured)
Ethernet II, Src: AsustekC_6e:0a:26 (00:22:15:6e:0a:26), Dst: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c)
Internet Protocol, Src: 192.168.10.85 (192.168.10.85), Dst: 192.168.10.89 (192.168.10.89)
Transmission Control Protocol, Src Port: 47567 (47567), Dst Port: rtsp (554), Seq: 1, Ack: 1, Len: 112
Real Time Streaming Protocol
Request: DESCRIBE rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1 RTSP/1.0\r\n
Method: DESCRIBE
URL: rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1
Accept: application/sdp\r\n
CSeq: 1\r\n
\r\n
No. Time Source Destination Protocol Info
783163 17448.620479 192.168.10.89 192.168.10.85 RTSP Reply: RTSP/1.0 401 Unauthorized
Frame 783163 (142 bytes on wire, 142 bytes captured)
Ethernet II, Src: SanyoEle_88:1e:6c (08:00:7b:88:1e:6c), Dst: AsustekC_6e:0a:26 (00:22:15:6e:0a:26)
Internet Protocol, Src: 192.168.10.89 (192.168.10.89), Dst: 192.168.10.85 (192.168.10.85)
Transmission Control Protocol, Src Port: rtsp (554), Dst Port: 47567 (47567), Seq: 1, Ack: 113, Len: 88
Real Time Streaming Protocol
Response: RTSP/1.0 401 Unauthorized\r\n
Status: 401
CSeq: 1\r\n
WWW-Authenticate: Basic realm="You need RTSP ID"\r\n
\r\n
----------------
ZM Debug log:
----------------
03/17/09 16:45:11.100847 zmc_m4[12762].INF-zm_debug.c/292 [New Debug Level = 7, New Debug Log = /tmp/zm.log]
03/17/09 16:45:11.101065 zmc_m4[12762].DB1-zm_monitor.cpp/2260 [Got 1 monitors]
03/17/09 16:45:11.101397 zmc_m4[12762].DB1-zm_thread.cpp/240 [Creating thread]
03/17/09 16:45:11.101429 zmc_m4[12762].DB2-zm_rtsp.cpp/176 [Protocol is:rtsp]
03/17/09 16:45:11.101447 zmc_m4[12762].DB2-zm_rtsp.cpp/177 [Host is:192.168.10.89]
03/17/09 16:45:11.101460 zmc_m4[12762].DB2-zm_rtsp.cpp/178 [Path is:/VideoInput/1/h264/1]
03/17/09 16:45:11.101473 zmc_m4[12762].DB2-zm_rtsp.cpp/179 [SubPath is:?trackid=1]
03/17/09 16:45:11.101486 zmc_m4[12762].DB2-zm_rtsp.cpp/180 [Auth is:admin:admin]
03/17/09 16:45:11.101541 zmc_m4[12762].DB2-zm_rtsp.cpp/194 [RTSP Local SSRC is 6b8b4567]
03/17/09 16:45:11.101559 zmc_m4[12762].DB1-zm_thread.cpp/276 [Starting thread]
03/17/09 16:45:11.101670 zmc_m4[12763].DB2-zm_thread.cpp/252 [Invoking thread]
03/17/09 16:45:11.101858 zmc_m4[12762].DB1-zm_thread.cpp/297 [Started thread 12763]
03/17/09 16:45:11.107601 zmc_m4[12762].DB1-zm_monitor.cpp/338 [monitor purpose=1]
03/17/09 16:45:11.107639 zmc_m4[12762].DB1-zm_monitor.cpp/345 [mem.size=62209192]
03/17/09 16:45:11.113770 zmc_m4[12763].ERR-zm_rtsp.cpp/313 [Unable to open input 'rtsp://admin:admin@192.168.10.89:554/VideoInput/1/h264/1']
03/17/09 16:45:11.113845 zmc_m4[12763].DB2-zm_thread.cpp/263 [Exiting thread, status 0xffffffff]
03/17/09 16:45:11.193126 zmc_m4[12762].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 960x540 - 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]
03/17/09 16:45:11.207592 zmc_m4[12762].DB1-zm_monitor.cpp/458 [Monitor Sanyo has function 5]
03/17/09 16:45:11.207622 zmc_m4[12762].DB1-zm_monitor.cpp/459 [Monitor Sanyo LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
03/17/09 16:45:11.207629 zmc_m4[12762].DB1-zm_monitor.cpp/460 [Monitor Sanyo IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
03/17/09 16:45:11.207748 zmc_m4[12762].DB1-zm_zone.cpp/889 [Got 1 zones for monitor Sanyo]
03/17/09 16:45:11.207760 zmc_m4[12762].DB5-zm_zone.cpp/918 [Parsing polygon 0,0 959,0 959,539 0,539]
03/17/09 16:45:11.207767 zmc_m4[12762].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 959,0 959,539 0,539']
03/17/09 16:45:11.207775 zmc_m4[12762].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
03/17/09 16:45:11.207782 zmc_m4[12762].DB3-zm_zone.cpp/796 [Got coordinate 959,0 from polygon string]
03/17/09 16:45:11.207789 zmc_m4[12762].DB3-zm_zone.cpp/796 [Got coordinate 959,539 from polygon string]
03/17/09 16:45:11.207795 zmc_m4[12762].DB3-zm_zone.cpp/796 [Got coordinate 0,539 from polygon string]
03/17/09 16:45:11.207804 zmc_m4[12762].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
03/17/09 16:45:11.207813 zmc_m4[12762].DB1-zm_zone.cpp/50 [Initialised zone 4/All - 1 - 960x540 - Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:15552, MxAP:388800, FB:3x3, MnFP:15552, MxFP:388800, MnBS:10368, MxBS:0, MnB:1, MxB:0, OF: 0]
03/17/09 16:45:11.215678 zmc_m4[12762].DB1-zm_monitor.cpp/2457 [Loaded monitor 4(Sanyo), 1 zones]
03/17/09 16:45:11.215706 zmc_m4[12762].INF-zmc.cpp/186 [Starting Capture]
03/17/09 16:45:11.215807 zmc_m4[12762].DB2-zm_remote_camera_rtsp.cpp/112 [Waiting for sources]
03/17/09 16:45:16.216697 zmc_m4[12762].FAT-zm_remote_camera_rtsp.cpp/118 [No RTSP sources]
03/17/09 16:45:16.216955 zmc_m4[12762].INF-zm_signal.cpp/64 [Got signal 6 (Aborted), exiting and forcing backtrace]
03/17/09 16:45:16.217136 zmc_m4[12762].ERR-zm_signal.cpp/84 [Signal address is (nil), from 0xb7f5d430]
03/17/09 16:45:16.217512 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: [0xb7f5d430]]
03/17/09 16:45:16.217593 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: [0xb7f5d430]]
03/17/09 16:45:16.217695 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /lib/tls/i686/cmov/libc.so.6(gsignal+0x50) [0xb72ec8a0]]
03/17/09 16:45:16.217778 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb72ee268]]
03/17/09 16:45:16.217851 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x80562cd]]
03/17/09 16:45:16.217922 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x807fa04]]
03/17/09 16:45:16.217993 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x804d093]]
03/17/09 16:45:16.218064 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb72d7685]]
03/17/09 16:45:16.218137 zmc_m4[12762].ERR-zm_signal.cpp/122 [Backtrace: /usr/local/bin/zmc [0x804cc21]]
03/17/09 16:45:16.218208 zmc_m4[12762].INF-zm_signal.cpp/125 [Backtrace complete, please execute the following command for more information]
03/17/09 16:45:16.218287 zmc_m4[12762].INF-zm_signal.cpp/126 [addr2line -e /usr/local/bin/zmc 0xb7f5d430 0xb7f5d430 0xb72ec8a0 0xb72ee268 0x80562cd 0x807fa04 0x804d093 0xb72d7685 0x804cc21]
----------------
The camera's implementation seems to be broken in that it requires basic auth for everything, even the DESCRIBE method. I was just wondering if anyone with better knowledge of ZM and/or FFMPEG code could help.
As far as I can tell from reading the FFMPEG code, it seems that the issue is with the av_open_input_file function - it's getting a 401 and not parsing the username:password string out from the URL, but instead returning an error.
Thanks very much for any help,
Nick Young