This enables ffmpeg to encode each frame in its own thread. However in most
cases Blender does not pass frames to ffmpeg fast enough to actually use the
more than two threads. In some tests the speed was measured to be about 20%.
If other parts of the video sequencer get optimized, this should improve.
Differential Revision: https://developer.blender.org/D4031
/* Set up the codec context */
c = st->codec;
+ c->thread_count = 0;
+ c->thread_type = FF_THREAD_FRAME;
+
c->codec_id = codec_id;
c->codec_type = AVMEDIA_TYPE_VIDEO;
st->id = 1;
c = st->codec;
+ c->thread_count = 0;
+ c->thread_type = FF_THREAD_FRAME;
+
c->codec_id = codec_id;
c->codec_type = AVMEDIA_TYPE_AUDIO;