On Mon, Mar 18, 2002 at 11:23:30AM -0600, Roy Stogner wrote: > > >I'm currently still recording video with the August 3 avifile CVS > >snapshot and vcr-1.08, because I haven't managed to find anything > >which works as stably. The current CVS avifile is coming pretty > >close. > > I should be more clear on this: > > The remaining stability problem I see is a memory leak in avirec; over > the course of an hour recording it starts dropping hundreds of > megabytes of RAM. I'm going to try to find this myself, but I suppose > I should call attention to it for people familiar with the code.
Hm, how did you get to this conclusion? If you look at avirec with
top, you may indeed see that its memory consumption seems to increase, while
in reality it does not.
The reason: avirec allocates half of physical ram for video buffering upon
start. You do not see this with top, because linux reserves the space when
this space is actually needed. If CPU usage is low, the memory usage you see
will be low as well, because the buffer never fills up. If you do some other
task while recording (say, compile a kernel, run updatedb, play doom...),
the frames cannot be compressed as fast as they appear, and the buffer fills
up. The kernel only releases the space when it is needed by some other process,
so if mem usage was high once, it seems to remain so.
Actually, memory usage may be even higher than half ram, because audio needs to
be buffered as well.
>
> I also have a feature request: currently avirec bombs out when it
> records a file up to the 2GB limit, since there is no way to request a
> segmented AVI file. I would suggest at least making the default
> segment size 2GB, not unlimited. It seems that the following one line
> change is sufficient to do this:
>
>
> --- avirec.cpp Mon Mar 18 11:22:32 2002
> +++ avirec.cpp.new Mon Mar 18 11:22:25 2002
> @@ -243,7 +243,7 @@
> if(pcc)
> {
> pcc->filename = filename;
> - pcc->segment_size = -1;
> + pcc->segment_size = 2000000;
>
> avm::vector<CodecInfo>::iterator it =
> GetCodecID(pconf->codec_string);
> if(it != video_codecs.end())
>
Thanky you. I will apply this.
Mermgfurt,
Oliver
--
It's true! The author of masqmail mailed to you!
See http://masqmail.cx/masqmail/
msg02977/pgp00000.pgp
Description: PGP signature
