Page 2 of 3

Posted: Tue Feb 17, 2009 9:11 pm
by zoneminder
It looks ok but possibly it is objecting to maybe the Bandwidth header. I have removed that locally and it will be tonoights svn but perhaps in the meantime you could sniff the vlc communications with WireShark as I don't have a Vivotek and want to be sure what it will accept and reject.

Posted: Wed Feb 18, 2009 2:28 am
by kylejohnson
zoneminder wrote:It looks ok but possibly it is objecting to maybe the Bandwidth header. I have removed that locally and it will be tonoights svn but perhaps in the meantime you could sniff the vlc communications with WireShark as I don't have a Vivotek and want to be sure what it will accept and reject.
I posted a link to the wireshark vlc <- camera dump a few posts back.
You can find it at http://www.fixertec.net/cam.dump

I have another Vivotek lying around that I meant to RMA a while back. If I can get it working, consider it a donation.

Posted: Wed Feb 18, 2009 2:35 am
by kylejohnson
PM me your address. I have a present waiting for you!

Posted: Wed Feb 18, 2009 10:14 am
by zoneminder
PM sent :)

I have had a look at the WS dump, which I missed first time around. The one thing that jumps out is the TrackID is missing. Can you try and edit the monitor settings and put /trackID= in the Remote Host sub path and see what difference that makes.

Posted: Wed Feb 18, 2009 1:45 pm
by kylejohnson
Well hot damn.
Setting /trackID= in the sub path makes a lot of progress - zoneminder is able to successfully connect to the camera, etc.
Now it looks like I am missing a codec.

Code: Select all

02/18/09 08:41:46.377083 zmc_m1[30203].DB1-zm_monitor.cpp/2457 [Loaded monitor 1(New), 1 zones]
02/18/09 08:41:46.377170 zmc_m1[30203].INF-zmc.cpp/186 [Starting Capture]
02/18/09 08:41:46.377572 zmc_m1[30203].DB2-zm_remote_camera_rtsp.cpp/112 [Waiting for sources]
02/18/09 08:41:46.377603 zmc_m1[30203].DB2-zm_remote_camera_rtsp.cpp/120 [Got sources]
02/18/09 08:41:46.377657 zmc_m1[30203].FAT-zm_remote_camera_rtsp.cpp/141 [Unable to locate codec 0 decoder]
02/18/09 08:41:46.377853 zmc_m1[30203].INF-zm_signal.cpp/60 [Got signal 6 (Aborted), crashing]
02/18/09 08:41:46.378100 zmc_m1[30203].ERR-zm_signal.cpp/71 [Signal address is (nil), from 0xb7f2c424]
02/18/09 08:41:46.378692 zmc_m1[30203].ERR-zm_signal.cpp/98 [Backtrace: [0xb7f2c424]]
02/18/09 08:41:46.378832 zmc_m1[30203].ERR-zm_signal.cpp/98 [Backtrace: [0xb7f2c424]]
02/18/09 08:41:46.379034 zmc_m1[30203].ERR-zm_signal.cpp/98 [Backtrace: /lib/tls/i686/cmov/libc.so.6(gsignal+0x50) [0xb7408880]]
02/18/09 08:41:46.379157 zmc_m1[30203].ERR-zm_signal.cpp/98 [Backtrace: /lib/tls/i686/cmov/libc.so.6(abort+0x188) [0xb740a248]]
02/18/09 08:41:46.379272 zmc_m1[30203].ERR-zm_signal.cpp/98 [Backtrace: /usr/local/bin/zmc [0x80561c9]]
02/18/09 08:41:46.379478 zmc_m1[30203].ERR-zm_signal.cpp/98 [Backtrace: /usr/local/bin/zmc [0x807f509]]
02/18/09 08:41:46.379594 zmc_m1[30203].ERR-zm_signal.cpp/98 [Backtrace: /usr/local/bin/zmc [0x804d023]]
02/18/09 08:41:46.379707 zmc_m1[30203].ERR-zm_signal.cpp/98 [Backtrace: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb73f3685]]
02/18/09 08:41:46.379822 zmc_m1[30203].ERR-zm_signal.cpp/98 [Backtrace: /usr/local/bin/zmc [0x804cbb1]]
02/18/09 08:41:46.380028 zmc_m1[30203].INF-zm_signal.cpp/99 [Backtrace complete]

Posted: Wed Feb 18, 2009 2:49 pm
by zoneminder
Have you tried using it with ffplay to see if that works. The codec etc are gotten from the ffmpeg libraries so it would be interesting to know if ffplay handles it.

Posted: Wed Feb 18, 2009 3:31 pm
by kylejohnson
zoneminder wrote:Have you tried using it with ffplay to see if that works. The codec etc are gotten from the ffmpeg libraries so it would be interesting to know if ffplay handles it.
That is kind of what I figured (that it got the codec from ffmpeg).
If I do a

Code: Select all

kjohnson@cosmos:~$ ffmpeg -i rtsp://192.168.9.14:7070/live.sdp -f mpeg /var/www/www.fixertec.net/live.sdp
and then open www.fixertec.net/live.sdp in totem, I am able to view a live stream of the camera. So I assume that ffmpeg is handling the rtsp OK?

I am using the newest build of ffmpeg from svn (as of last night), and the newest build of zoneminder from svn (as of this morning).

One thing that I noticed while compiling ZM was that I had to manually copy all of the includes (/usr/local/include/libavcodec/, /usr/local/include/libavformat/, etc) to /usr/local/ffmpeg/ for zoneminder to find them during ./configure?

Posted: Wed Feb 18, 2009 4:33 pm
by zoneminder
Configure should find them wherever they are so I would be careful about doing that. You should not need to specify a --with-ffmpeg path if they are in either of those locations.

Posted: Wed Feb 18, 2009 4:35 pm
by zoneminder
Also, if it's not too much trouble perhaps you could try and get a WS capture of the ffplay interaction (and maybe the ZM one as well).

Posted: Wed Feb 18, 2009 6:45 pm
by kylejohnson
zoneminder wrote:Configure should find them wherever they are so I would be careful about doing that. You should not need to specify a --with-ffmpeg path if they are in either of those locations.
What caught my eye was this:

Code: Select all

checking libavutil/avutil.h usability... yes
checking libavutil/avutil.h presence... yes
checking for libavutil/avutil.h... yes
checking ffmpeg/avutil.h usability... no
checking ffmpeg/avutil.h presence... no
checking for ffmpeg/avutil.h... no
checking libavcodec/avcodec.h usability... yes
checking libavcodec/avcodec.h presence... yes
checking for libavcodec/avcodec.h... yes
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
checking libavformat/avformat.h usability... yes
checking libavformat/avformat.h presence... yes
checking for libavformat/avformat.h... yes
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
checking libswscale/swscale.h usability... yes
checking libswscale/swscale.h presence... yes
checking for libswscale/swscale.h... yes
checking ffmpeg/swscale.h usability... no
checking ffmpeg/swscale.h presence... no
checking for ffmpeg/swscale.h... no
When I coped the files with the "... no" to to /usr/local/include/ffmpeg, everything in ./configure came back with "checking .... yes"

Posted: Wed Feb 18, 2009 7:05 pm
by zoneminder
What it's doing is fine. It's looking in all the places it knows ffmpeg headers files have been lately. So long as it finds one set then it should be ok.

Posted: Thu Feb 19, 2009 1:29 am
by kylejohnson
zoneminder wrote:Also, if it's not too much trouble perhaps you could try and get a WS capture of the ffplay interaction (and maybe the ZM one as well).
Desktop using ffplay installed from ubuntu package:

Code: Select all

kyle@kjohnson-desktop:~$ ffplay rtsp://192.168.9.14:7070/live.sdp
FFplay version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2003-2008 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
  libavutil version: 49.6.0
  libavcodec version: 51.50.0
  libavformat version: 52.7.0
  libavdevice version: 52.0.0
  built on Oct  3 2008 22:40:31, gcc: 4.3.2
http://www.fixertec.net/ffplay.dump

Server using tshark:

Code: Select all

sudo tshark -F libpcap host 192.168.9.14
http://www.fixertec.net/tshark.dump


I hope this helps.

Posted: Tue Mar 03, 2009 3:01 pm
by kylejohnson
OK, I seem to have some progress.
ZM is giving me a different error now, so I think I have everything with ffmpeg resolved.

Code: Select all

[NULL @ 0xf50b640] video codec set to : mpeg4
[NULL @ 0xf50c070] audio codec set to : aac
[NULL @ 0xf50c070] audio samplerate set to : 44100
[NULL @ 0xf50c070] audio channels set to : 2
[rtsp @ 0xf508ee0]hello state=0
03/03/09 04:05:45.099454 zmc_m1[21446].INF-zm_debug.c/292 [New Debug Level = 7, New Debug Log = /tmp/zm_debug.log.21446]
03/03/09 04:05:45.100256 zmc_m1[21446].DB1-zm_monitor.cpp/2260 [Got 1 monitors]
03/03/09 04:05:45.101195 zmc_m1[21446].DB1-zm_thread.cpp/240 [Creating thread]
03/03/09 04:05:45.101360 zmc_m1[21446].DB2-zm_rtsp.cpp/187 [RTSP Local SSRC is 6b8b4567]
03/03/09 04:05:45.101385 zmc_m1[21446].DB1-zm_thread.cpp/276 [Starting thread]
03/03/09 04:05:45.101684 zmc_m1[21447].DB2-zm_thread.cpp/252 [Invoking thread]
03/03/09 04:05:45.102178 zmc_m1[21446].DB1-zm_thread.cpp/297 [Started thread 21447]
03/03/09 04:05:45.109570 zmc_m1[21446].DB1-zm_monitor.cpp/338 [monitor purpose=1]
03/03/09 04:05:45.109674 zmc_m1[21446].DB1-zm_monitor.cpp/345 [mem.size=36865192]
03/03/09 04:05:45.148075 zmc_m1[21447].DB2-zm_rtsp.cpp/137 [Assigned RTP port range is 40200-40499]
03/03/09 04:05:45.148259 zmc_m1[21447].DB2-zm_rtsp.cpp/44 [Sending RTSP message: SETUP rtsp://192.168.10.10:7070/live.sdp/trackID=1 RTSP/1.0^M
Transport: RTP/AVP;unicast;client_port=40200-40201^M
CSeq: 1^M
^M
]
03/03/09 04:05:45.163281 zmc_m1[21447].DB2-zm_rtsp.cpp/70 [Received RTSP response: RTSP/1.0 200 OK^M
CSeq: 1^M
Date: Wed, 7 Jun 2000 16:48:44 GMT^M
Session: 55790214;timeout=80^M
Server: PVSS^M
Transport: RTP/AVP;unicast;client_port=40200-40201;server_port=5558-5559^M
^M
 (182 bytes)]
03/03/09 04:05:45.163583 zmc_m1[21447].DB2-zm_rtsp.cpp/373 [Got RTSP session 55790214, timeout 80 secs]
03/03/09 04:05:45.163711 zmc_m1[21447].DB2-zm_rtsp.cpp/378 [Got RTSP transport RTP/AVP;unicast;client_port=40200-40201;server_port=5558-5559]
03/03/09 04:05:45.163771 zmc_m1[21447].DB2-zm_rtsp.cpp/426 [RTSP Method is RTP/UNICAST]
03/03/09 04:05:45.163792 zmc_m1[21447].DB2-zm_rtsp.cpp/427 [RTSP Distribution is unicast]
03/03/09 04:05:45.163810 zmc_m1[21447].DB2-zm_rtsp.cpp/428 [RTSP SSRC is 0]
03/03/09 04:05:45.163828 zmc_m1[21447].DB2-zm_rtsp.cpp/429 [RTSP Local Host is ]
03/03/09 04:05:45.163846 zmc_m1[21447].DB2-zm_rtsp.cpp/430 [RTSP Local Ports are 40200/40201]
03/03/09 04:05:45.163863 zmc_m1[21447].DB2-zm_rtsp.cpp/431 [RTSP Remote Ports are 5558/5559]
03/03/09 04:05:45.163880 zmc_m1[21447].DB2-zm_rtsp.cpp/432 [RTSP Remote Channels are 0/0]
03/03/09 04:05:45.163913 zmc_m1[21447].DB2-zm_rtsp.cpp/44 [Sending RTSP message: PLAY rtsp://192.168.10.10:7070/live.sdp/trackID=1 RTSP/1.0^M
Session: 55790214^M
CSeq: 2^M
^M
]
03/03/09 04:05:45.181009 zmc_m1[21447].DB2-zm_rtsp.cpp/70 [Received RTSP response: RTSP/1.0 200 OK^M
CSeq: 2^M
Date: Wed, 7 Jun 2000 16:48:44 GMT^M
Session: 55790214;timeout=80^M
Server: PVSS^M
RTP-Info: url=rtsp://192.168.10.10:7070/live.sdp/trackID=1/trackID=1;seq=0;rtptime=0^M
Range: npt=0-^M
RTCP-Interval: 250^M
^M
 (229 bytes)]
03/03/09 04:05:45.181310 zmc_m1[21447].DB2-zm_rtsp.cpp/450 [Got RTP Info url=rtsp://192.168.10.10:7070/live.sdp/trackID=1/trackID=1;seq=0;rtptime=0]
03/03/09 04:05:45.181370 zmc_m1[21447].DB2-zm_rtsp.cpp/469 [RTSP Seq is 0]
03/03/09 04:05:45.181390 zmc_m1[21447].DB2-zm_rtsp.cpp/470 [RTSP Rtptime is 0]
03/03/09 04:05:45.181469 zmc_m1[21447].DB3-zm_rtp_source.cpp/43 [RTP CName = zm-1@cosmos.fixertec.net]
03/03/09 04:05:45.181490 zmc_m1[21447].DB3-zm_rtp_source.cpp/68 [Initialising sequence]
03/03/09 04:05:45.181521 zmc_m1[21447].DB1-zm_thread.cpp/240 [Creating thread]
03/03/09 04:05:45.181544 zmc_m1[21447].DB1-zm_thread.cpp/240 [Creating thread]
03/03/09 04:05:45.181563 zmc_m1[21447].DB1-zm_thread.cpp/276 [Starting thread]
03/03/09 04:05:45.181817 zmc_m1[21448].DB2-zm_thread.cpp/252 [Invoking thread]
03/03/09 04:05:45.198569 zmc_m1[21448].DB2-zm_rtp_data.cpp/66 [Starting data thread 0 on port 40200]
03/03/09 04:05:45.198727 zmc_m1[21448].DB3-zm_rtp_data.cpp/76 [Bound to :40200]
03/03/09 04:05:45.198922 zmc_m1[21447].DB1-zm_thread.cpp/297 [Started thread 21448]
03/03/09 04:05:45.198961 zmc_m1[21447].DB1-zm_thread.cpp/276 [Starting thread]
03/03/09 04:05:45.199126 zmc_m1[21449].DB2-zm_thread.cpp/252 [Invoking thread]
03/03/09 04:05:45.210238 zmc_m1[21449].DB2-zm_rtp_ctrl.cpp/252 [Starting control thread 0 on port 40201]
03/03/09 04:05:45.210406 zmc_m1[21449].DB3-zm_rtp_ctrl.cpp/270 [Bound to :40201]
03/03/09 04:05:45.210796 zmc_m1[21449].DB3-zm_rtp_ctrl.cpp/274 [Connected to 192.168.10.10:5559]
03/03/09 04:05:45.210860 zmc_m1[21447].DB1-zm_thread.cpp/297 [Started thread 21449]
03/03/09 04:05:45.233648 zmc_m1[21446].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]
03/03/09 04:05:45.257825 zmc_m1[21446].DB1-zm_monitor.cpp/458 [Monitor Front_Porch has function 2]
03/03/09 04:05:45.257992 zmc_m1[21446].DB1-zm_monitor.cpp/459 [Monitor Front_Porch LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
03/03/09 04:05:45.258012 zmc_m1[21446].DB1-zm_monitor.cpp/460 [Monitor Front_Porch IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
03/03/09 04:05:45.258507 zmc_m1[21446].DB1-zm_zone.cpp/889 [Got 1 zones for monitor Front_Porch]
03/03/09 04:05:45.258551 zmc_m1[21446].DB5-zm_zone.cpp/918 [Parsing polygon 0,0 639,0 639,479 0,479]
03/03/09 04:05:45.258571 zmc_m1[21446].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 639,0 639,479 0,479']
03/03/09 04:05:45.258592 zmc_m1[21446].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
03/03/09 04:05:45.258611 zmc_m1[21446].DB3-zm_zone.cpp/796 [Got coordinate 639,0 from polygon string]
03/03/09 04:05:45.258629 zmc_m1[21446].DB3-zm_zone.cpp/796 [Got coordinate 639,479 from polygon string]
03/03/09 04:05:45.258648 zmc_m1[21446].DB3-zm_zone.cpp/796 [Got coordinate 0,479 from polygon string]
03/03/09 04:05:45.258671 zmc_m1[21446].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
03/03/09 04:05:45.258693 zmc_m1[21446].DB1-zm_zone.cpp/50 [Initialised zone 1/All - 1 - 640x480 - Rgb:ff0000, CM:3, MnAT:20, MxAT:0, MnAP:24576, MxAP:0, FB:3x3, MnFP:18432, MxFP:0, MnBS:15360, MxBS:0, MnB:1, MxB:0, OF: 0]
03/03/09 04:05:45.283177 zmc_m1[21446].DB1-zm_monitor.cpp/2457 [Loaded monitor 1(Front_Porch), 1 zones]
03/03/09 04:05:45.283364 zmc_m1[21446].INF-zmc.cpp/186 [Starting Capture]
03/03/09 04:05:45.283656 zmc_m1[21446].DB2-zm_remote_camera_rtsp.cpp/112 [Waiting for sources]
03/03/09 04:05:45.283688 zmc_m1[21446].DB2-zm_remote_camera_rtsp.cpp/120 [Got sources]
03/03/09 04:05:45.289200 zmc_m1[21446].DB3-zm_rtp_source.cpp/312 [Getting frame]
03/03/09 04:05:48.198282 zmc_m1[21448].DB1-zm_comms.cpp/685 [Select timed out]
03/03/09 04:05:48.198364 zmc_m1[21448].ERR-zm_rtp_data.cpp/89 [RTP timed out]
03/03/09 04:05:48.198637 zmc_m1[21448].DB2-zm_thread.cpp/263 [Exiting thread, status (nil)]
03/03/09 04:05:48.212008 zmc_m1[21447].DB2-zm_rtsp.cpp/44 [Sending RTSP message: TEARDOWN rtsp://192.168.10.10:7070/live.sdp RTSP/1.0^M
Session: 55790214^M
CSeq: 3^M
^M
]
03/03/09 04:05:48.289423 zmc_m1[21446].ERR-zmc.cpp/258 [Failed to capture image from monitor 1 (0/1)]
03/03/09 04:05:48.289839 zmc_m1[21446].DB1-zm_thread.cpp/302 [Joining thread 21447]
03/03/09 04:05:48.538162 zmc_m1[21447].DB2-zm_rtsp.cpp/70 [Received RTSP response: RTSP/1.0 200 OK^M
CSeq: 3^M
Session: 55790214^M
^M
 (47 bytes)]
03/03/09 04:05:48.538297 zmc_m1[21447].DB1-zm_thread.cpp/302 [Joining thread 21448]
03/03/09 04:05:48.538338 zmc_m1[21447].DB1-zm_thread.cpp/314 [Thread 21448 exited, status (nil)]
03/03/09 04:05:48.538359 zmc_m1[21447].DB1-zm_thread.cpp/326 [Joined thread 21448]
03/03/09 04:05:48.538377 zmc_m1[21447].DB1-zm_thread.cpp/302 [Joining thread 21449]
03/03/09 04:05:55.208290 zmc_m1[21449].DB1-zm_comms.cpp/685 [Select timed out]
03/03/09 04:05:55.208400 zmc_m1[21449].DB2-zm_thread.cpp/263 [Exiting thread, status (nil)]
03/03/09 04:05:55.208503 zmc_m1[21447].DB1-zm_thread.cpp/314 [Thread 21449 exited, status (nil)]
03/03/09 04:05:55.208540 zmc_m1[21447].DB1-zm_thread.cpp/326 [Joined thread 21449]
03/03/09 04:05:55.208607 zmc_m1[21447].DB1-zm_thread.cpp/245 [Destroying thread 21449]
03/03/09 04:05:55.208627 zmc_m1[21447].DB1-zm_thread.cpp/245 [Destroying thread 21448]
03/03/09 04:05:55.208655 zmc_m1[21447].DB2-zm_thread.cpp/263 [Exiting thread, status (nil)]
03/03/09 04:05:55.208798 zmc_m1[21446].DB1-zm_thread.cpp/314 [Thread 21447 exited, status (nil)]
03/03/09 04:05:55.208924 zmc_m1[21446].DB1-zm_thread.cpp/326 [Joined thread 21447]
03/03/09 04:05:55.208994 zmc_m1[21446].DB1-zm_thread.cpp/245 [Destroying thread 21447]


Posted: Tue Mar 03, 2009 3:07 pm
by kylejohnson
It works!
I had it in Unicast mode. After trying RTP/RTSP, it works.
Getting some other errors now, but I have video, so I will toy around and report.

Posted: Tue Mar 03, 2009 3:31 pm
by kylejohnson
Everything seems to be working, relating to zoneminder 1.24 and the Vivotek cameras. I will post any relevant details pertaining to this camera in the wiki. Thanks for the help everyone.

http://www.zoneminder.com/wiki/index.php/Vivotek