Hi. On Mon, Mar 15, 2010 at 02:28:19PM +0200, Stas Oskin wrote: >> Shouldn't every FFmpeg container support copy? It basically follows same >> pattern as encoding - just instead of being re-coded, the data moves >> straight to disk.
Anyway what you want is copying without using up more memory if more > data is copied, which is a far higher requirement. > MOV/MP4 is a format with a mandatory index, and at least without very ugly > hacks the index must be in one piece. Which means that the index can only > be written at the end and after all other data was written, which means > that unless you store it in a temporary file (which has quite serious > issues), > the index must be kept in memory and grows in size with every audio or > video > frame added to the file. > Ok, this perfectly explains why the memory grows only when I copy it to disk, but not when I re-send it to RTP. A dummy question perhaps, but is the in-memory index released the moment trailer written and the file handle is closed? Or there is any memory cache for this, that being kept around for some time? > If you don't want that you definitely must one of > 1) use a format where the index is optional and FFmpeg supports not > generating > the index (no idea if there is a option to disable index generation at > all). > Is there a MPEG4-codec compatible format that supports this? > 2) use a format where the index can be written in segments and FFmpeg > supports that > (I don't think such a format exists, and such an index is of somewhat > limited use). > This seems quite ineffective, and I prefer switching to format that doesn't require an index at all. > 3) use a format that does not support any index at all, e.g. MPEG-TS or so. > > I definitively need a MPEG-4 codec compatible, while the MPEG-TS seems to support only MPEG-2. Is there an index-less format which supports this codec? > Lastly, if memory usage grows really badly, A-V desync causing audio or > video packets > to be buffered is a more likely cause though, but I didn't see any details > in your > mails that would allow concluding if that is the case or not. > I'm currently trying now video-only source to simply the reproduction. Thanks again. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
