Buffer problem

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
sTYZ
Posts: 2
Joined: Tue Feb 11, 2020 12:41 pm

Buffer problem

Post by sTYZ »

I have a system with:
- Dual quad core xeons
- 32 gigs of ram
- 4 SAS drives in raid 0
- 4 Gigabit ethernet ports
- Ubuntu 19.10

While running i get constant buffer warnings. My ram usage as per "free -m" is 8-11%. Any time i increase the buffer it just asks for a higher number. I have saving JPGs off. I just use x264 passthrough for ALL cameras. I have deleted all detection zones. I am also having an issue where i am getting smaller recorded chunks than the set amount (600s) but only on some cameras.

Anyone have any idea what causes this?
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Buffer problem

Post by iconnor »

When you write out an mp4, the first frame has to be a full image, otherwise known as an i-frame or keyframe. So when doing passthrough, when not recording, we need to keep all the frames since the last keyframe so that when we start writing the mp4, we can start with that keyframe.

If your camera is set to not send keyframes very often, we end up having to store a LOT of frames.

That's what that message is about. Either configure your camera to send keyframes more often or use more buffers.
ruffledrooster
Posts: 4
Joined: Mon Mar 06, 2017 6:20 pm

Re: Buffer problem

Post by ruffledrooster »

I was getting this too for about 7 out of my 10 cameras and I had adjust the buffer sizes higher and then the messages subsided. Just a general question, did something fundamentally change in 1.34 to make ffmpeg more 'sensitive' to this? I don't recall ever getting these messages in 1.32. Just curious. Thanks.
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Buffer problem

Post by iconnor »

I just added an error message telling about it. 1.32 was silently not including all frames.
sTYZ
Posts: 2
Joined: Tue Feb 11, 2020 12:41 pm

Re: Buffer problem

Post by sTYZ »

OK i have the problem mostly sorted.

I couldn't change the keyframe interval on my cameras and when i increased the buffer i ran out of tempfs space on /dev/shm .

I added to fstab: none /dev/shm tmpfs defaults,size=24G 0 0

This gave me an extra 8GB of memory to use on the tempfs which made my total buffer use 96%. All of the warning errors have gone away. Is there a reason that this doesn't auto increase or have a setting in the control panel?
Post Reply