h.264 rtsp ip camera configuration issues - encoding error?

Forum for questions and support relating to the 1.25.x releases only.
everwake
Posts: 13
Joined: Wed Jul 18, 2012 11:32 am

h.264 rtsp ip camera configuration issues - encoding error?

Post by everwake »

just bought an amovision AM-C755RV 2Mpix ip camera, it works just fine using vlc or other rtsp-stream handler, but I cannot get any picture from within zoneminder.

the default stream is called /ch0_0.h264 (to anyone thinking of buying one, please note this, as the manual is wrong...)

when I add it to zoneminder the log just states "Error while decoding frame 0" from rtsp remote camera like this:

[Error while decoding frame 0]
2012-08-03 22:34:49.764356 zmc_m1[2656].ERR-zm_remote_camera_rtsp.cpp/225 [256: 7c 81 ec 06 c5 0a f1 b3 e5 71 25 1f 5e 7c bb 77 b6 f2 f6 ff c3 b8 34 cb db 89 dc 89 24 ed f9 7b 5f 35 d5 be 7f ac 2c 2a 55 15 3c f7 0f 71 aa 8d b7 13 c4 fb 1a 97 5b ac d8 fd 70 61 6c d8 bb cb 4a fd 07 e5 28 30 bc e7 0b 97 9b 15 af 6b 5b cc 2f 27 18 f]

no picture is displayed, but it seems it is capturing frames at least, it's logging so much it actually puts load on my system...

the exact same settings for the stream work without issue in vlc player.

any ideas or hints on h.264 rtsp?

edit: I am using an ubuntu 12.04 vanilla installation, could this be ffmpeg related ?
Last edited by everwake on Sat Aug 04, 2012 8:16 am, edited 1 time in total.
everwake
Posts: 13
Joined: Wed Jul 18, 2012 11:32 am

Re: h.264 rtsp ip camera configuration issues - endcoding er

Post by everwake »

Managed to get a video-feed from the camera in zoneminder, it is choppy smeared and does not look like intended

Image


anyone know why? zm says the camera is streaming at 25fps but the frame only updates about every 3 seconds and the log still whines about shared mem, despite the really hig values I have set


the log gives the "Got unexpected memory map file size" every time I change any stream setting, rebooting removes the error message though...

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 1048576
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1
pashdown
Posts: 11
Joined: Tue Oct 04, 2011 1:31 pm

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by pashdown »

If there is a way to have the camera only use TCP over UDP, try that. I was getting similar errors with an Axis until I did that.
everwake
Posts: 13
Joined: Wed Jul 18, 2012 11:32 am

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by everwake »

there is no option to change tcp or udp on the camera, however, if I view the stream from VLC player using the same URL from the same computer it works like a charm, so it's probably some setting that needs changing, I tried some trial and error, but most of the time if I change a setting I loose the stream, have not found any setting that works.
everwake
Posts: 13
Joined: Wed Jul 18, 2012 11:32 am

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by everwake »

has anyone got any idea what is causing the graphics errors in ZM? because the glitches are shifting every few seconds it is triggering the motion detection, so what ever the issue is it is earlier in the process than motion detection.

All other clients I tried (including vlc from the same host) work without issue.
licchende
Posts: 13
Joined: Thu Aug 09, 2012 8:19 am

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by licchende »

I've the same problem or quite similar...
I think that you need more powerfull hardware for decoding, analysing and store a 2mpx image...
I've 8 2mpx cameras and a quadcore cpu I5 seems not enough for modect all...
With less camera all work really better.

Have you found some solution?
everwake
Posts: 13
Joined: Wed Jul 18, 2012 11:32 am

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by everwake »

I am not using modect (yet) problem is the same in monitor-mode

I have a quadcore I5 3.1GHz cpu with 16GB of ram, and only a single camera, so I don't think performance is the issue.

the system is unusable, Ihave not found any solution, I can read the feed via vlc or have the camera record to HDD, but I can not use zoneminder =(
licchende
Posts: 13
Joined: Thu Aug 09, 2012 8:19 am

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by licchende »

Everwake try to force TCP connection instead of UDP, in my system this solved all encoding problems
SenseiNYC
Posts: 8
Joined: Fri Apr 20, 2012 7:21 pm

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by SenseiNYC »

Can you tell me what you did to get anything from your Amovision AM-C755? I have a W736 and I have the same initial problem you had. No feed but it seems to be getting something (black screen but it shows a fps). I have Amovision trying to help but they're slow to respond.

What was your configuration to get anything from the camera in Zoneminder?

Thanks.
everwake
Posts: 13
Joined: Wed Jul 18, 2012 11:32 am

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by everwake »

unfortunately I am on the road at the moment without access to my zoneminder installation, but initially I had issues with the monitor beeing black, I had to increase shared mem alot to get a picture, I have however not resolved my zoneminder problem, it still does not work correctly, since the amovision camera works just fine with other software it seems to be a zoneminder specific problem.

if your problem persists I can check my zm settings next week when I return
SenseiNYC
Posts: 8
Joined: Fri Apr 20, 2012 7:21 pm

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by SenseiNYC »

That would be great. I increased my shared memory from 128MB to 1GB. I am hoping that I will be able to get a picture. My symptoms were exactly as yours were. I believe we are having the same problem, just that you moved a step ahead of me.

I submitted a trouble ticket with Amovision and even created a remote lab for them to test with my cameras. I hope they want to work with ZM a bit. That would certainly not hurt their business either.
SenseiNYC
Posts: 8
Joined: Fri Apr 20, 2012 7:21 pm

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by SenseiNYC »

In /etc/sysctl.conf I increased the size to
kernel.shmall = 2097152
kernel.shmmax = 4294967296

then performed sysctl -p

Unfortunately I still do not get any images.
SenseiNYC
Posts: 8
Joined: Fri Apr 20, 2012 7:21 pm

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by SenseiNYC »

Got it.

You have to use ffmpeg. Works like a charm. By default, ffmpeg is not installed on vanilla Zoneminder.
the ffmpeg string is the rtsp stream rtsp://IP_Address:554/ch0_0.h264

Increasing the shared memory helps with framing for sure.
SenseiNYC
Posts: 8
Joined: Fri Apr 20, 2012 7:21 pm

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by SenseiNYC »

Bite my tongue, the image is horrible. Initially it was great, somehow turned to crap. I'm going to play more with the memory.
SenseiNYC
Posts: 8
Joined: Fri Apr 20, 2012 7:21 pm

Re: h.264 rtsp ip camera configuration issues - encoding err

Post by SenseiNYC »

Ok here are the details of what I have.

In Zoneminder, I am using ffmpeg to connect to the cam's RTSP stream. Using rtsp://ip_add:554/ch0_1.h264 I am able to get the low-res stream, flawless in fact. problem is that the resolution is 352x192 (although the specs state 352x288, which does not work), not the resolution i am looking for.

ch0_0.h264 is the 1600x1200, but if you change the stream channel (main flow), ffmpeg retrieves nothing.

VLC can retrieve both channels, as well as their OCX, which appears to use the ONVIF command set (Amovision was pretty generous and sent me the API for the ONVIF, but that did not produce much results in the way of assisting with this project with ZM).

I have noticed that when you set the cam Main Flow to 1280x720, the cam does not work at all, even through the internal web page for the cam (OCX or VLC). I tried changing every value on the video params screen and its just complete crap. I do not believe the cam is capable of the 720p as described unless you use their proprietary software, which I have not yet tried (which even then I still doubt since the built-in web server cannot produce a 720p image).

Strangely enough though when I initially set the main flow to 1600x1200, ZM was able to briefly pick up something, then it turned to crap, but now gives me nothing. I do not know if this is a ZM issue or a cam issue or both.

I am considering redoing ZM from scratch and trying again, but I am not hopeful about the outlook for producing any high-res images.

So just to recap:
- Minor Flow (352x192) works with internal viewer, VLC and ZM with ffmpeg.
- Main Flow (1600x1200) work with internal viewer, VLC but not ZM (RTP or ffmpeg).
- Main Flow (1280x720) does not work with internal viewer, VLC or ZM.
- There is no HTTP URL to grab any MJPEG since it has none, only h264 via RTSP.
Locked