<div dir="ltr">On Fri, Feb 8, 2013 at 7:49 PM, Jérôme SALAYET <span dir="ltr"><<a href="mailto:jerome.salayet@hymatom.fr" target="_blank">jerome.salayet@hymatom.fr</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p class="MsoNormal">Hello, I'm using FFMPEG to decode video streaming from an IP Camera. all seems good but I try to decrease the CPU usage of my application when I decompress several differents streams.<br>In fact, I have a dual core processor, and if I decode one stream, my CPU usage is very low (so good). If I decompress two streams, it's ok too. But if I had a third decompression, my CPU increase from 2-5% to 25-30%.<br>
<br>So, I try to activate Mutlithreading in FFMPEG (compiling with --enable-w32threads) with Mingw.<u></u><u></u></p><p class="MsoNormal">Perhaps, trying Multithreading isn"t the good solution to decrease the CPU usage, I'm not very sure of this point.</p>
</blockquote><div><br></div><div>Other authors gave you important advice, but to address your specific question: multithreading is definitely nice for multi-stream decoding, especially when you have multi-core CPU. But this should not be multithreaded decoding: the best overall performance can be achieved when separate threads are attached to each input stream, and each thread uses a "single-threaded" decoder instance.</div>
<div><br></div><div>BR,</div><div>Alex</div></div><br><br></div>