[gst-devel] reducing memory usage in avidemux

Ronald S. Bultje rbultje at ronald.bitfreak.net
Mon Feb 12 15:24:17 CET 2007

On Mon, 2007-02-12, tim Muller wrote:
> On Fri, 2007-02-09 at 12:39 +0100, Stefan Kost wrote:
> > I have an avi that is 300 mb. Unfortunately it has 446774 index
> > entries. One index entry uses 52 bytes. Therefore the index needs
> > 23232248 bytes, .... (snip micro-optimising)
> > Any comments?
> So that's one index entry for roughly every 700 bytes of data, right?
> Couldn't the demuxer just drop every, say, second index entry when it
> detects something like this, or does it really need to save all of them?

Don't know what codecs the above-mentioned file uses, but at first
sight, audio appears to be the main problem. For a full hour of video,
30fps, you wouldn't see more than 60*60*30 index entries, which is ~50k,
leaving ~400k for for audio. For video, still, at least all the
non-keyframe ones could be ignored, leaving (say 1 keyframe per second)
only 60*60 (3,6k). For playback, you don't need the audio ones
otherwise, since the video one always lags, so all audio ones apart from
the ones right after each keyframe (~1/s again) can be ignored, which
would decrease this to ~7,2k, or a decrease by ~98,5%. For editing, a
special "keep-all-indexes" could be created to keep them all and trash
your memory as requested.


More information about the gstreamer-devel mailing list