Page 1 of 1
zoneminder ffmpeg progressive degrading quality
Posted: Sat Jul 10, 2010 11:04 pm
by baos
When I first start up zoneminder I get a nice crystal clear image. After a period of 15 minutes I get boxy rainbows all over the jpeg. Worse yet It detects these boxy rainbows as motion. To make sure it wasn't the driver I did a cat /dev/cxm0 >> deleteme.mpg and was able to play a nice crisp picture. I am thinking I need to pass some codecs or arguments to ffmpeg.
Posted: Sun Jul 11, 2010 12:49 am
by baos
Here is a picture of a nice yard, fence, fire pit, back alley. After running for an hour. You might even notice me standing there!

Posted: Sun Jul 11, 2010 4:41 pm
by baos
Maybe if I could get the command line for ffmpeg it might help me in acquiring assistance?
Posted: Sun Jul 11, 2010 6:13 pm
by bb99
What type camera and/or capture card are you using? Just making a guess but this looks like a sync issue similar to setting up a NTSC camera with PAL settings.
Posted: Sun Jul 11, 2010 7:19 pm
by baos
Camera:
Lorex CVC6994CL
High Resolution Color Security Camera
http://lorexstore.lorextechnology.com/p ... ECS_R4.pdf
tuner card
composite input
hauppauge WinTV-PVR-150
My picture above is just the worst of how it looks. It starts out with little boxes and gradually moves up to that.
Although someone noted on this forum that this is nothing to worry about
Jul 11 13:17:53 cam kernel: cxm0: encoder dma not enough buffer space free
I kind of wonder if it could be the source of my degrading video quality. When I restart zoneminder everything gets better for about 2 minuites.
Posted: Sun Jul 11, 2010 8:18 pm
by bb99
Your system or Zoneminder log files are going to give you the information you need to figure this out.
Posted: Sun Jul 11, 2010 8:34 pm
by baos

after running 1/2 hour.
I've already checked the log files. and posted what I got out of them. I wouldn't be here if that wasn't something I already tried.
I have discovered that occasionally executing ffmpeg from shell seems to reset things back to normal. The picture should normally be a very crystal clear/sharp image.
I'm also open to purchasing a different tuner card.
Posted: Mon Jul 12, 2010 1:13 pm
by Voltage54
I don't believe this applies in your situation as it seems to be ffmpeg related, but I was having a similar issue with a cheap card I purchased off ebay (by similar I mean the displayed picture would show odd colours). The solution was to reduce the fps the capture card recorded at, as the card was overheating at the full 25fps (PAL).
Posted: Mon Jul 12, 2010 4:43 pm
by baos
I wonder if it could be libturbojpeg. I would like to use the regular one. Anyone know how to disable the turbo stuff?
Posted: Sat Jul 17, 2010 4:06 am
by baos
Still awaiting solution. If the command line for ffmpeg could be provided, I could then troubleshoot. I kind of think it could be the libjpegturbo.
Posted: Sat Jul 17, 2010 10:56 pm
by jfkastner
i had problems setting a fixed bitrate for ffmpeg while creating a video from the events. basically the same happened here, the quality degraded towards the end of the file - my solution was to 'hardwire' my desired bitrate as you see here:
http://www.zoneminder.com/forums/viewtopic.php?t=15202
if you look around you'll find the code that controls the streaming in another program file
my guess is that certain ffmpeg versions are a little bit buggy and need more attention than others, and don't calculate the bitrate vs framerate vs framesize correctly
Same problem
Posted: Tue Jul 20, 2010 4:06 pm
by dgrierms
I'm having the same problem with an ACTi IP camera. When I set the source type to remote, I get decent stills with lots of movement artifacts. When I set source to ffmpeg, the live feed is crystal clear for about 30 seconds then starts to "melt".
I've been trying to find a solution for the past three weeks and so far have nothing.
Posted: Fri Jul 23, 2010 8:41 pm
by rolk
I have the same issue with Edimax IC-9000 (aka StarVedia IC-602) camera's. I have these connected to Zoneminder using 'ffmpeg' using the url format:
rtsp://<user>:<password>@<ip>/<camera>.mp2
That produces 640x480 images quite nicely. I was running Zoneminder on a netbook and noticed that when limiting the framerate using 'Max FPS' in the monitor definition, I got this melting/bleeding effect as described. Without this limiting, the poor N270 Atom CPU was stretched to its limit and overall experience was suffering.
Now I'm running Zoneminder on a dedicated Atom D510 based server and I've left that Max FPS blank. Now everything remains crisp!
The negative bit about this is that the recording now happens at 10 fps, 2 cameras, 640x480... My HD is filling up quite quickly.
Posted: Fri Jul 23, 2010 9:47 pm
by kingofkya
Thous are for sure ffmpeg related because those are mpeg artifacts not jpeg artifacts.
Re: zoneminder ffmpeg progressive degrading quality
Posted: Wed Nov 16, 2011 7:43 am
by neonightmare
Hi
I also have a Ic9000 edimax cam. I found this explanation on the internet:
Appendix F. Third party and embedded web page
integration
For third party and embedded web page integration, IP Cam support the standard RTSP protocol and video codecs needed by most generally used video play software, including Apple QuickTime and VideoLAN. The supported media protocols including TCP and UDP. IP Cam will automatically use TCP or UDP media stream depends on the connection request. The video codec supported is MPEG4.
The access methods are the followings : rtsp://CAM-IP/CAMID.PW.mp2 for MPEG4 video + MPEG2 audio
rtsp://CAM-IP/CAMID.PW for MPEG4 video + AMR-NB audio
Where ip_cam_address is the IP address of the IP camera. CAM_ID is the unique Camera ID of the specific IP camera. Password is the video play password of the specific IP camera(detailed in section 3.6). Users can modify the password of the IP camera to prevent others to see the video.
For embedded web page integration, add the following codes into the proper position of the desired web page :
<object classid="clsid:5C519EC4-2BAE-44CE-B7F5-AD0CCD4BEFBD" id="mpeg4ax" codebase=">>>>Link removed"<<<<#Version=0,0,0,0" width="320" height="240">
<param name="Src" value="rtsp://CAM-IP/CAMID.PW.mp2"> </object>
How could/should I configure zm to work with the cam? All tests witch I made didn't work for me.
THX Neo