EE3内存泄漏? [英] EE3 memory leak?

查看:127
本文介绍了EE3内存泄漏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过  ericjut的博客论坛( http://blogs.msdn.com/expressionencoder/archive/2010/ 03/10 / 9976633.aspx ),讨论了对未来64位版本EE的需求,以便能够分配比在32位平台上更多的memocy。


然而,我的问题是为什么需要如此大量的RAM?我正在为一个SuneHD配置文件编码一个720p源(实际上只有1280x544),并且EE3不断消耗memroy,直到它为作为一个进程分配了大约3.5GB的RAM,然后它通过编码中途消失。这是一个4GB的Win7x64盒子。


以前的Windows Media Encoder使用相同的输出编解码器和参数来咀嚼SAME源文件,并且整个过程只分配大约150MB的进程。


发生了什么事?即使在缓冲区中将文件解码为RGB,在该分辨率下RGB空间中的1秒视频帧也小于50MB。你应该有一个20秒的缓冲区,仍然需要不到1GB。您是否存储了一分钟的解码RGB视频用于某些索引或GOP原因?似乎前一个编码器有一个合理大小的工作缓冲区,它吐出到.wmv文件...索引和所有。


如果是这样,我们将如何使用全高清(1920x1080),还是没有64GB系统的Red Digital Cinema的Red-One文件(4096x2304)?


-Steve


- sc

解决方案

史蒂夫,


您使用的是什么类型的720p源?因为我没有看到像这样的内存使用情况。是不是你正在使用第三方编解码器来解码那个漏洞问题?我刚尝试过WMV 720p - > ZuneHD 720p配置文件和内存消耗在175到202 MB之间保持稳定,因此我怀疑我们正在考虑针对您的问题使用第三方编解码器的问题。请尝试关闭所有第三方编解码器并尝试再次编码。如果您仍然可以重新编写它,我会有兴趣查看您的源文件以找出问题所在。


此外,为了更正您的计算,还有一个   RGB中的1秒缓冲区意味着:30  fps * 1280 x 720 x 4(32位RGB缓冲区),大约111MB的内存和双倍的1080p。现在考虑到许多解码器喜欢缓冲,以及一些预处理器(重新调整器,去隔行器),当然还有编码器,并且在任何给定点都有多秒钟的帧缓存。另请注意,在多个核心上拆分编码时会产生内存/缓冲开销。因此,对于8核PC上的720p-> 720p编码,202MB峰值内存使用量对我来说似乎没有那么大的内存消耗。


现在,我的博客文章不是'我真的在讨论单流WMV 720p编码情况下的内存消耗情况,你不应该在4GB机器上遇到任何麻烦(如上所述),但更多关于做类似"1080p source - >"的情况。 IIS SmoothStreaming VBR 1080p",同时编码近10个流,其中几个为HD(如果您使用我们的预设,则为1080p,2为720p)。再加上x86应用程序通常不能使用超过2GB的问题,而且有些用户试图使用8个以上的核心PC,我希望你能看到这类情况存在内存瓶颈问题。这就是我的博客条目有用的地方,特别是对于使用我们的SDK执行SmoothStreaming的解决方案开发人员。


可能需要使用64位版本的Encoder(某天)处理RedOne文件,尤其是SmoothStreaming编码。但它也将使Encoder在具有大量内核(16+)的PC上表现更好,充分利用PC资源。


我无法深入挖掘主题。但是,如果你的内存输出情况不合适,那就有问题了,如果你能为我们提供更多关于你具体案例的信息,我们会很感激,我们会尝试解决它。​​


I've read  ericjut's blog poting (http://blogs.msdn.com/expressionencoder/archive/2010/03/10/9976633.aspx), that discusses the need for a future 64 bit versions of EE in order to be able to allocate larger amounts of memroy than what you can do on a 32 bit platform.

However, my question is why are such large amounts of RAM needed? I'm encoding a 720p source (actually only 1280x544) to a SuneHD profile, and EE3 continuously consumes memroy until it hits >3.5GB of RAM allocated for it as a process, and then it dies halfway way thru the encode. this on a 4GB Win7x64 box.

The previous Windows Media Encoder chews theu the SAME source file, using the same output codecs and paramters, and only allocates about 150MB for it's process the entire time.

What's going on? Even decoding the files to RGB in a buffer, 1 second of video frames in RGB space at that resolution is less than 50MB. You sould have a 20 second buffer and still need less than a 1GB. Are you storing a minute's worth of decoded RGB video for some indexing or GOP reason? It seems that the previous Encoder had a reasonable sized working buffer that it spit out to the .wmv file... indexed and all.

If so, how on earth will we ever work with full HD (1920x1080), or something like Red Digital Cinema's Red-One files (4096x2304) without 64GB systems?

-Steve


-sc

解决方案

Hi Steve,

What kind of 720p source are you using? Because I'm not seeing any memory usage like this. Could it be that you are using a 3rd party codec to decode that's got a leak problem? I just tried a WMV 720p -> ZuneHD 720p profile and memory consumption stays steady between 175 and 202 MB, so I suspect we're looking at a problem with a 3rd party codec for your issue. Please try to turn off all 3rd party codecs and try to encode again. If you can still repro it, I would be interested in taking a look at your source file to figure out what's wrong.

Also, to correct your calculation a little, to have a 1 second buffer in RGB means: 30 fps * 1280 x 720 x 4 (32bit RGB buffers), which is about 111MB of memory and double that for 1080p. Now take into account that a lot of decoders like to have some buffering, as well as some pre-processors (rescalers, deinterlacers) and of course the encoders, and you have multiple seconds worth of frame cache in the pipeline at any given point. Also note that there is a memory/buffer overhead in splitting the encoding on multiple cores. So 202MB peak memory usage for a 720p->720p encoding on an 8-core PC doesn't seem that big of memory consumption to me.

Now, my blog entry wasn't really discussing about memory consumption for a one-stream WMV 720p encode case, which you shouldn't have any trouble with on a 4GB machine (as pointed out above), but more about doing cases like "1080p source -> IIS SmoothStreaming VBR 1080p", which encodes almost 10 streams at the same time, several of them in HD (2 at 1080p and 2 at 720p if you're using our preset for example). Add to the problem that x86 applications usually can't use more than 2GB and that some users are trying to do this of 8+ core PCs, and I hope you can see that there's a memory bottleneck problem for those kinds of cases. That's where my blog entry can be useful, especially for solution developers using our SDK to perform SmoothStreaming.

Using a 64-bit version of Encoder (someday) will probably be required to deal with RedOne files, especially for SmoothStreaming encodes. But it will also enable Encoder to perform better on PCs with large amounts of cores (16+), taking full advantage of the PC resources.

I can't really dig much deeper on the subject. But if you're running out of memory with a one stream output case, there is something wrong and we would appreciate it if you could provide us with more information on your specific case for us to try to resolve it.


这篇关于EE3内存泄漏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆