<div dir="ltr"><div>When you suggest using libav, do you mean something like the following?</div><div><a href="https://github.com/libav/libav/blob/master/libavcodec/api-example.c">https://github.com/libav/libav/blob/master/libavcodec/api-example.c</a></div>
<div> </div><div>Using a port driver per stream will not scale?</div><div> </div><div>Is there an example for using async threads to do a similar task?</div><div>Will my transcoding compete with file I/O because they are using the same threads?</div>
<div>How do I know how many threads to use?</div><div> </div><div>Why not use NIF?</div><div>Encoding/decoding a single frame will probably take about 3ms.</div><div>If the NIF will bump reductions, will this be ok?</div>
<div> </div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 1, 2013 at 5:52 PM, Max Lapshin <span dir="ltr"><<a href="mailto:max.lapshin@gmail.com" target="_blank">max.lapshin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You have following choices:<br>
<br>
1) start program based on libav, one per stream and speak with it via<br>
port. You cannot use avconv directly because it will be<br>
unmaintainable.<br>
2) launch driver based on libav and schedule transcoding to async threads<br>
3) transcode in NIF.<br>
<br>
I think that if you have really hundreds of streams, than 2-nd choice<br>
is best, because it is much better to schedule 20-40 threads than 400<br>
processes.<br>
</blockquote></div><br></div>