Agasio A632W Set Up

Forum for questions and support relating to the 1.24.x releases only.
Locked
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Agasio A632W Set Up

Post by marty505 »

I really wanted to post questions about setting up this camera but when I tried I got the message "Your post looks too spamy for a new user, please remove off-site URLs." So I changed all the IP's to xxx.xxx.xx.xxx and looked the whole post over for URLs (there were none). No joy. So, what's the trick?

Marty
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Re: Agasio A632W Set Up

Post by marty505 »

I can view the RTSP stream (1280 X 720) from this camera using Totem or VLC (VLC is better) but no joy with FFmpeg. I strongly suspect that ZoneMinder won't work until I can see the stream in FFmpeg. Anybody here have any success with RTSP and FFmpeg?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Re: Agasio A632W Set Up

Post by cordel »

You might want to check and see if ffmpeg was built with librtmp. I believe if memory serves me correct, VLC has live555 built in to negotiate RTSP. ffmpeg my need to be extended to support the adobe version though I can't be sure without testing the camera myself.

What error returns if you try to use ffmpeg from the command line to capture to a file?

Code: Select all

ffmpeg -i rtsp://192.168.0.7:554/ -y -vcodec copy record.mp4
Is there any information that VLC shows about the stream that might be useful like the codec used in the container?
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Re: Agasio A632W Set Up

Post by marty505 »

Thanks for the reply! I tried the command (substituting the camera IP) and the message is "Error while parsing header" which is what I have seen with every variation of IP/port/login etc. that I have tried. I don't see any references to librtmp in the message header. It's very possible that FFmpeg (and ZoneMinder) aren't configured properly but it is also possible that FFmpeg doesn't handle the H264 stream properly. I'm just not sure.
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Re: Agasio A632W Set Up

Post by marty505 »

Seem to be making some progress but no video yet. I uninstalled FFmpeg and re-installed with X264 libs and everything else I could find. Removed and re-installed ZoneMinder and this got rid of the red Source on the control panel. If I select Modec I get Green! - but no video. There is a message window at the bottom that says Waiting for localhost but video never appears. Regarding the codec I ran your command line and got libavcodec 52.20. 1 / 52.20. 1.
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Re: Agasio A632W Set Up

Post by marty505 »

More info - latest debug log output:

04/12/12 20:53:42.090811 zmc_m1[4906].INF-zm_debug.c/292 [New Debug Level = 0, New Debug Log = /tmp/zm_debug.log.04906]
04/12/12 20:53:42.175419 zmc_m1[4906].INF-zmc.cpp/188 [Starting Capture]
04/12/12 20:53:43.103463 zmc_m1[4907].ERR-zm_rtsp.cpp/92 [Unexpected response code 401, text is 'Unauthorized']
04/12/12 20:53:43.108396 zmc_m1[4907].ERR-zm_rtsp.cpp/92 [Unexpected response code 406, text is 'Not Acceptable']
04/12/12 20:53:52.191406 zmc_m1[4906].FAT-zm_remote_camera_rtsp.cpp/118 [No RTSP sources]
04/12/12 20:53:52.191582 zmc_m1[4906].INF-zm_signal.cpp/64 [Got signal 6 (Aborted), exiting and forcing backtrace]
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Re: Agasio A632W Set Up

Post by marty505 »

Dug into the log file info. and the code 401 means that FFmpeg failed to log on to the camera which also accounts for the subsequent errors. The user & password are correct in the host name. (The same user/password/path works for VLC). Googling around I found that FFmpeg does (or did) have a problem with authentication on RTSP streams. There is a patch out there but it is more complicated to install than I am comfortable with. Does anyone know where to get an already patched version?
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Re: Agasio A632W Set Up

Post by marty505 »

Getting warmer but not quite there. Decided to use the internal webcam (/dev/video0) to check out my ZM installation, figured that would remove some variables. Sure enough, in the Options - Images section I discovered that MPEG_LIVE_FORMAT and MPEG_REPLAY_FORMAT should be left blank.
Also, changing permissions of the /dev/video0 file helped too. Now I get video from the built in web cam but still no video from the IP cam. This camera is very similar to the Foscam FI8602 so I used that setup as a guide (ffmpeg vs. Remote seems to be the big difference) here's the end of the zm debug log using this setup:

04/24/12 17:48:43.224496 zms[5357].DB1-zms.cpp/98 [Query: mode=jpeg&monitor=2&scale=100&maxfps=15&buffer=1000&connkey=177143&rand=1335311322]
04/24/12 17:48:43.224882 zms[5357].DB1-zm_monitor.cpp/2262 [Got 1 monitors]
04/24/12 17:48:43.226636 zms[5357].DB1-zm_monitor.cpp/338 [monitor purpose=0]
04/24/12 17:48:43.226678 zms[5357].DB1-zm_monitor.cpp/345 [mem.size=6912952]
04/24/12 17:48:43.226787 zms[5357].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 640x360 - 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]
04/24/12 17:48:43.276936 zms[5357].DB1-zm_monitor.cpp/458 [Monitor Monitor-2 has function 2]
04/24/12 17:48:43.276977 zms[5357].DB1-zm_monitor.cpp/459 [Monitor Monitor-2 LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
04/24/12 17:48:43.276995 zms[5357].DB1-zm_monitor.cpp/460 [Monitor Monitor-2 IBC = 10, WUC = 10, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
04/24/12 17:48:43.277014 zms[5357].DB1-zm_monitor.cpp/2459 [Loaded monitor 2(Monitor-2), 0 zones]
04/24/12 17:48:43.809339 zms[5357].ERR-zm_monitor.cpp/3579 [Terminating, last frame sent time 1335311323.309245 secs more than maximum of 10.000000]
04/24/12 17:48:43.809431 zms[5357].DB1-zm_monitor.cpp/3588 [Cleaning swap files from /tmp/zmswap-m2/zmswap-q177143]
04/24/12 17:48:43.809529 zms[5357].DB1-zm_monitor.cpp/3616 [Can't glob '/tmp/zmswap-m2/zmswap-q177143/*.*': 3]

I can sympathize with the "can't glob.." error, heck I can't either. If anybody has any ideas (even crazy ones) about this I'd love to hear them.

Marty
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Re: Agasio A632W Set Up

Post by cordel »

Sorry for coming back so late into this. You are correct that ffmpeg did and very well may still have a problem with auth in RTSP. I beleive a patch was in the wiki and I might very well have it on one of my servers.

I'm still a ways away from being able to build packages and such, but if I get some down time from work and school I'll take a look and at least provide an updated patch. Then at least you can check and see if it works.

Have you tried removing the password protection from the cam to see if it atleast catches the stream?
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Re: Agasio A632W Set Up

Post by marty505 »

Unfortunately the camera insists on a username and password, won't allow you to exit the set up until they are set. Another possibility I came across is adding enables (--enable-network --enable-protocol=tcp --enable-demuxer=rtsp --enable-decoder=h264) to the config file when building FFmpeg. I didn't do this and I'm not sure if it would help or not. I might try it tomorrow if I get the time.
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Re: Agasio A632W Set Up

Post by marty505 »

installed FFmpeg with the additional enables and no change - still can't open RTSP streams. Played around with the HTTP stream and I can get images in ZM using HTTP. The first image came up using HTTP://camera-ip:port/tmpfs/auto.jpg. It's a little image, 320 x 176 meant for phones, but at least it's an image. HTTP://camera.ip:port/tmpfs.snap.jpg increased the image size to 640 x 352 at 5 fps (which is what the camera is set at) and looks pretty good. Someplace in there is a 1280 x 720 image if I can find the right command. I've tried a variety of Foscam CGI command with no luck. I'm hoping there is a URL API list out there tthat will crack this. I'm pretty sure that FFmpeg isn't up to the task of reading the RTSP stream so I'll see what's possible with the HTTP stream. Wierd thing is that when I check the log file in the camera it says it's streaming RTSP over HTTP.
marty505
Posts: 16
Joined: Thu Apr 05, 2012 1:19 am

Re: Agasio A632W Set Up

Post by marty505 »

Hmm, this may not be an Ffmpeg problem after all; may be in Zoneminder. It seems that ZM uses Basic authentication for RTSP and this camera wants Digest authentication. Here's the error log:

05/03/12 20:44:54.772090 zmc_m3[7956].DB2-zm_rtsp.cpp/72 [Received RTSP response: RTSP/1.0 401 Unauthorized
Server: HiIpcam/V100R003 VodServer/1.0.0
Cseq: 1
WWW-Authenticate: Digest realm="Hipcam RealServer", nonce="07e193c75716723aba9dcb15148f0ca3"

(174 bytes)]
05/03/12 20:44:54.772168 zmc_m3[7956].ERR-zm_rtsp.cpp/92 [Unexpected response code 401, text is 'Unauthorized']
05/03/12 20:44:54.772357 zmc_m3[7956].DB1-zm_rtsp.cpp/304 [Processing SDP '']
05/03/12 20:44:54.772425 zmc_m3[7956].DB2-zm_rtsp.cpp/46 [Sending RTSP message: SETUP rtsp://192.168.0.158:554/12 RTSP/1.0
Transport: RTP/AVP;multicast
Authorization: Basic dXNlcjp1c2Vy
User-Agent: ZoneMinder/1.24.2
CSeq: 2

Could still involve Ffmpeg but I got the same error after telling ZM that Ffmpeg wasn't installed.

Is there a way to make ZM use Digest authentication for RTSP? The use of only Basic authentication would explain why some people can use RTSP and others can't. If a server requires Digest that would be a show stopper.
Locked