[FFmpeg-trac] #1882(avcodec:open): Multi-threading wmv encoder

FFmpeg trac at avcodec.org
Wed Nov 7 00:08:25 CET 2012

#1882: Multi-threading wmv encoder
             Reporter:  txspaderz    |                    Owner:
                 Type:  enhancement  |                   Status:  open
             Priority:  wish         |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  wmv2         |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  0            |

Comment (by cehoyos):

 Replying to [comment:9 xnejp03]:
 > Actually it looks like the threads parameter is now not breaking the
 command any more.

 (I am curious: Could you point me to the bug report?)

 > It also looks that when not supplied, it uses all cores (at least for
 the mpeg2video encoder) and the threads parameter is now used mostly to
 limit the usage of CPUs (can you confirm)?

 The threads parameter allows to specify the number of used threads, the
 default is "0" (auto).

 > When run with -threads 1 I'm getting about 39 fps on my example file,
 when run without -threads it does about 80 fps, so it'd seem that there is
 some parallelism implemented. It doesn't push all the cores to maximum, as
 mpeg2video does though, so there is possible room for improvement.

 I am not sure if auto is always a good choice: It detects the number of
 cores, but in nearly all cases, you should specify a higher number for
 maximum performance.

 > Also, does it make difference if -threads is provided before -i and
 after? Would that specify number of CPUs separately for decoder and
 encoder? Or is just one definition (before -i) enough?

 You can specify -threads for the decoder and the encoder.

Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1882#comment:10>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list