[Libav-user] Multi threaded encode

Edward Richards edward at edwardandalison.com
Thu Sep 6 21:27:34 CEST 2012

I want to run a I-frame based codec multi threaded so that I can get it encoding faster on a multi core pc. 

If I open n streams can I simply change the steam index when I av_write_interleaved_frame or will it buffer because it assumes it has the mix the other streams (that'll never get filled). I don't have the ram for that. 
If I take responsibility for the interleaving will it work that way?

What if I simply change the encoder flag to include the threaded-frame attribute (it already has the threaded slice attribute)? Will that make av_encode2 non-blocking? If so I can encode n frames at a time and block on a av_flush right?

Thanks for pointers. 

Sent from my iPhone... So sorry for typos!

More information about the Libav-user mailing list