zoneminder ffmpeg progressive degrading quality

Forum for questions and support relating to the 1.24.x releases only.
Locked
baos
Posts: 14
Joined: Wed Jun 23, 2010 10:32 pm

zoneminder ffmpeg progressive degrading quality

Post 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.
baos
Posts: 14
Joined: Wed Jun 23, 2010 10:32 pm

Post 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!
Image
baos
Posts: 14
Joined: Wed Jun 23, 2010 10:32 pm

Post by baos »

Maybe if I could get the command line for ffmpeg it might help me in acquiring assistance?
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post 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.
baos
Posts: 14
Joined: Wed Jun 23, 2010 10:32 pm

Post 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.
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

Your system or Zoneminder log files are going to give you the information you need to figure this out.
baos
Posts: 14
Joined: Wed Jun 23, 2010 10:32 pm

Post by baos »

Image
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.
Voltage54
Posts: 23
Joined: Sat Feb 21, 2009 1:35 am

Post 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).
baos
Posts: 14
Joined: Wed Jun 23, 2010 10:32 pm

Post 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?
baos
Posts: 14
Joined: Wed Jun 23, 2010 10:32 pm

Post 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.
jfkastner
Posts: 74
Joined: Wed Jun 17, 2009 11:52 pm

Post 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
pls send emails to 'myusername at google dot com'
dgrierms
Posts: 3
Joined: Sun Jun 20, 2010 9:12 pm

Same problem

Post 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.
rolk
Posts: 1
Joined: Fri Jul 23, 2010 8:34 pm

Post 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.
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Post by kingofkya »

Thous are for sure ffmpeg related because those are mpeg artifacts not jpeg artifacts.
neonightmare
Posts: 2
Joined: Wed Nov 16, 2011 6:48 am

Re: zoneminder ffmpeg progressive degrading quality

Post 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
Locked