How many threads does ffmpeg use by default?











up vote
34
down vote

favorite
4












I see that there's a -threads <count> command line option in ffmpeg. What is the default value of this option?










share|improve this question




























    up vote
    34
    down vote

    favorite
    4












    I see that there's a -threads <count> command line option in ffmpeg. What is the default value of this option?










    share|improve this question


























      up vote
      34
      down vote

      favorite
      4









      up vote
      34
      down vote

      favorite
      4






      4





      I see that there's a -threads <count> command line option in ffmpeg. What is the default value of this option?










      share|improve this question















      I see that there's a -threads <count> command line option in ffmpeg. What is the default value of this option?







      ffmpeg






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 11 '11 at 4:03









      studiohack

      11.3k1880113




      11.3k1880113










      asked Jun 22 '10 at 9:22









      scompt.com

      3792413




      3792413






















          6 Answers
          6






          active

          oldest

          votes

















          up vote
          20
          down vote



          accepted










          it depends on codec used, ffmpeg version and your CPU core count. Sometimes it's simply one thread per core. Sometimes it's more complex like:




          With libx264 it is cores x 1.5 for frame threads and cores x 1 for slice threads.







          share|improve this answer























          • Thanks. Do you have a reference to the defaults for some standard codecs supported by ffmpeg?
            – scompt.com
            Jun 22 '10 at 9:26






          • 5




            Don't rely on it. My ffmpeg 0.7.8 on Linux uses 1 thread by default no matter what.
            – Barafu Albino
            Dec 22 '11 at 19:30










          • What value can be used to get the better result? PS I am using FFMpeg in Android framework.
            – Killer
            Aug 1 at 11:05


















          up vote
          17
          down vote













          As of 2014, it uses an optimal number.



          You can verify this on a multi-core computer by examining CPU load (Linux: top, Windows: task manager) with different options to ffmpeg:




          • -threads 0 (optimal);


          • -threads 1 (single-threaded);


          • -threads 2 (2 threads for e.g. an Intel Core 2 Duo);


          • none (the default, also optimal).



          2015 edit: on a 12-core CPU, some ffmpeg commands have Linux top showing at most 200% cpu (only 2 cores), no matter what number is given to -threads. So the default may still be optimal in the sense of "as good as this ffmpeg binary can get", but not optimal in the sense of "fully exploiting my leet CPU."






          share|improve this answer



















          • 1




            Note that this only seems to be true for encoding, not general processing. If it is not actually producing output frames then it won't parallelize. e.g. if you're de-shaking from 02:00 onwards then you will only get parallelism from 02:00 onwards, but everything up to 02:00 will still need to be processed serially.
            – Mehrdad
            Aug 19 at 3:14


















          up vote
          4
          down vote













          In 2015 on Ubuntu 14.04 with ffmpeg 0.8.10-6, it used 1 core on a 4 core system.
          htop showed this; only one core was used, and I got 16 fps conversion rate for a FullHD video.



          Using -threads 4 made all my CPU cores go to 100% and I got a conversion rate of 47 fps.



          I used the following command:



          $ ffmpeg -i foo.mp4 -y -target pal-dvd -aspect 16:9 dvd-out.mpg





          share|improve this answer






























            up vote
            3
            down vote













            I was playing with converting in a CentOS 6.5 VM (Ryzen 1700 8c/16t - vm assigned 12 of 16 cores).
            Experiments with 480p movies netted the following:



            Thread option/Conversion Rate (fps @ 60 secs)



            (none/default)/130fps
            -threads 1/70fps
            -threads 2/120fps
            -threads 4/185fps
            -threads 6/228fps
            -threads 8/204fps
            -threads 10/181fps


            The interesting part was the CPU loading (using htop to watch it).

            Using no -threads option wound up at the 130fps range with load spread out across all cores at a low-load level.

            Using 1 thread did exactly that, loaded one core at 100%. Using anything else resulted in another spread-load situation.



            As you can see, there's also a point of diminishing returns, so you'd have to adjust the -threads option for your particular machine. For my setup specifically, using the -threads 6 (on a 12 core machine) resulted in the best FPS when converting the video (from h264 to x264 at a different bitrate to force a conversion) and returns actually diminished the more threads I threw into it.



            It could have been a memory issue too - it only had 1GB assigned to the VM. I may tweak that and see if that changes anything. Still - it does show that using the -threads option can increase performance so run some tests on your particular machine at different levels to find your setups sweet spot.






            share|improve this answer























            • Could you please add what do you mean by "converting"? Ideally, the exact command.
              – Ondra Žižka
              Nov 14 at 2:40


















            up vote
            1
            down vote













            assuming you have threading enabled, it assigned 1.5x number of cores.






            share|improve this answer





















            • 1.5 x number of cores for frame threads. 1 x number of cores for slice threads. This is specific for (lib)x264. I'm not sure what the allocation is for other encoders.
              – LordNeckbeard
              Apr 3 '15 at 18:21












            • @LordNeckbeard How to switch between frame threading and slice threading!?
              – Dr.jacky
              Aug 16 '15 at 5:50






            • 1




              @Mr.Hyde Probably with -x264-params sliced-threads=1. Or via usage of -tune zerolatency.
              – LordNeckbeard
              Aug 17 '15 at 19:55


















            up vote
            0
            down vote













            Some of these answers are a bit old, and I'd just like to add that with my ffmpeg 4.1, encoding with libx264, all 6 cores/12 threads of my 2600X system were maxed without any -thread argument.






            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














               

              draft saved


              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f155305%2fhow-many-threads-does-ffmpeg-use-by-default%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              6 Answers
              6






              active

              oldest

              votes








              6 Answers
              6






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              20
              down vote



              accepted










              it depends on codec used, ffmpeg version and your CPU core count. Sometimes it's simply one thread per core. Sometimes it's more complex like:




              With libx264 it is cores x 1.5 for frame threads and cores x 1 for slice threads.







              share|improve this answer























              • Thanks. Do you have a reference to the defaults for some standard codecs supported by ffmpeg?
                – scompt.com
                Jun 22 '10 at 9:26






              • 5




                Don't rely on it. My ffmpeg 0.7.8 on Linux uses 1 thread by default no matter what.
                – Barafu Albino
                Dec 22 '11 at 19:30










              • What value can be used to get the better result? PS I am using FFMpeg in Android framework.
                – Killer
                Aug 1 at 11:05















              up vote
              20
              down vote



              accepted










              it depends on codec used, ffmpeg version and your CPU core count. Sometimes it's simply one thread per core. Sometimes it's more complex like:




              With libx264 it is cores x 1.5 for frame threads and cores x 1 for slice threads.







              share|improve this answer























              • Thanks. Do you have a reference to the defaults for some standard codecs supported by ffmpeg?
                – scompt.com
                Jun 22 '10 at 9:26






              • 5




                Don't rely on it. My ffmpeg 0.7.8 on Linux uses 1 thread by default no matter what.
                – Barafu Albino
                Dec 22 '11 at 19:30










              • What value can be used to get the better result? PS I am using FFMpeg in Android framework.
                – Killer
                Aug 1 at 11:05













              up vote
              20
              down vote



              accepted







              up vote
              20
              down vote



              accepted






              it depends on codec used, ffmpeg version and your CPU core count. Sometimes it's simply one thread per core. Sometimes it's more complex like:




              With libx264 it is cores x 1.5 for frame threads and cores x 1 for slice threads.







              share|improve this answer














              it depends on codec used, ffmpeg version and your CPU core count. Sometimes it's simply one thread per core. Sometimes it's more complex like:




              With libx264 it is cores x 1.5 for frame threads and cores x 1 for slice threads.








              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited May 8 at 10:58

























              answered Jun 22 '10 at 9:24









              mOlind

              40039




              40039












              • Thanks. Do you have a reference to the defaults for some standard codecs supported by ffmpeg?
                – scompt.com
                Jun 22 '10 at 9:26






              • 5




                Don't rely on it. My ffmpeg 0.7.8 on Linux uses 1 thread by default no matter what.
                – Barafu Albino
                Dec 22 '11 at 19:30










              • What value can be used to get the better result? PS I am using FFMpeg in Android framework.
                – Killer
                Aug 1 at 11:05


















              • Thanks. Do you have a reference to the defaults for some standard codecs supported by ffmpeg?
                – scompt.com
                Jun 22 '10 at 9:26






              • 5




                Don't rely on it. My ffmpeg 0.7.8 on Linux uses 1 thread by default no matter what.
                – Barafu Albino
                Dec 22 '11 at 19:30










              • What value can be used to get the better result? PS I am using FFMpeg in Android framework.
                – Killer
                Aug 1 at 11:05
















              Thanks. Do you have a reference to the defaults for some standard codecs supported by ffmpeg?
              – scompt.com
              Jun 22 '10 at 9:26




              Thanks. Do you have a reference to the defaults for some standard codecs supported by ffmpeg?
              – scompt.com
              Jun 22 '10 at 9:26




              5




              5




              Don't rely on it. My ffmpeg 0.7.8 on Linux uses 1 thread by default no matter what.
              – Barafu Albino
              Dec 22 '11 at 19:30




              Don't rely on it. My ffmpeg 0.7.8 on Linux uses 1 thread by default no matter what.
              – Barafu Albino
              Dec 22 '11 at 19:30












              What value can be used to get the better result? PS I am using FFMpeg in Android framework.
              – Killer
              Aug 1 at 11:05




              What value can be used to get the better result? PS I am using FFMpeg in Android framework.
              – Killer
              Aug 1 at 11:05












              up vote
              17
              down vote













              As of 2014, it uses an optimal number.



              You can verify this on a multi-core computer by examining CPU load (Linux: top, Windows: task manager) with different options to ffmpeg:




              • -threads 0 (optimal);


              • -threads 1 (single-threaded);


              • -threads 2 (2 threads for e.g. an Intel Core 2 Duo);


              • none (the default, also optimal).



              2015 edit: on a 12-core CPU, some ffmpeg commands have Linux top showing at most 200% cpu (only 2 cores), no matter what number is given to -threads. So the default may still be optimal in the sense of "as good as this ffmpeg binary can get", but not optimal in the sense of "fully exploiting my leet CPU."






              share|improve this answer



















              • 1




                Note that this only seems to be true for encoding, not general processing. If it is not actually producing output frames then it won't parallelize. e.g. if you're de-shaking from 02:00 onwards then you will only get parallelism from 02:00 onwards, but everything up to 02:00 will still need to be processed serially.
                – Mehrdad
                Aug 19 at 3:14















              up vote
              17
              down vote













              As of 2014, it uses an optimal number.



              You can verify this on a multi-core computer by examining CPU load (Linux: top, Windows: task manager) with different options to ffmpeg:




              • -threads 0 (optimal);


              • -threads 1 (single-threaded);


              • -threads 2 (2 threads for e.g. an Intel Core 2 Duo);


              • none (the default, also optimal).



              2015 edit: on a 12-core CPU, some ffmpeg commands have Linux top showing at most 200% cpu (only 2 cores), no matter what number is given to -threads. So the default may still be optimal in the sense of "as good as this ffmpeg binary can get", but not optimal in the sense of "fully exploiting my leet CPU."






              share|improve this answer



















              • 1




                Note that this only seems to be true for encoding, not general processing. If it is not actually producing output frames then it won't parallelize. e.g. if you're de-shaking from 02:00 onwards then you will only get parallelism from 02:00 onwards, but everything up to 02:00 will still need to be processed serially.
                – Mehrdad
                Aug 19 at 3:14













              up vote
              17
              down vote










              up vote
              17
              down vote









              As of 2014, it uses an optimal number.



              You can verify this on a multi-core computer by examining CPU load (Linux: top, Windows: task manager) with different options to ffmpeg:




              • -threads 0 (optimal);


              • -threads 1 (single-threaded);


              • -threads 2 (2 threads for e.g. an Intel Core 2 Duo);


              • none (the default, also optimal).



              2015 edit: on a 12-core CPU, some ffmpeg commands have Linux top showing at most 200% cpu (only 2 cores), no matter what number is given to -threads. So the default may still be optimal in the sense of "as good as this ffmpeg binary can get", but not optimal in the sense of "fully exploiting my leet CPU."






              share|improve this answer














              As of 2014, it uses an optimal number.



              You can verify this on a multi-core computer by examining CPU load (Linux: top, Windows: task manager) with different options to ffmpeg:




              • -threads 0 (optimal);


              • -threads 1 (single-threaded);


              • -threads 2 (2 threads for e.g. an Intel Core 2 Duo);


              • none (the default, also optimal).



              2015 edit: on a 12-core CPU, some ffmpeg commands have Linux top showing at most 200% cpu (only 2 cores), no matter what number is given to -threads. So the default may still be optimal in the sense of "as good as this ffmpeg binary can get", but not optimal in the sense of "fully exploiting my leet CPU."







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jul 13 '15 at 19:55

























              answered Mar 8 '14 at 15:59









              Camille Goudeseune

              75611329




              75611329








              • 1




                Note that this only seems to be true for encoding, not general processing. If it is not actually producing output frames then it won't parallelize. e.g. if you're de-shaking from 02:00 onwards then you will only get parallelism from 02:00 onwards, but everything up to 02:00 will still need to be processed serially.
                – Mehrdad
                Aug 19 at 3:14














              • 1




                Note that this only seems to be true for encoding, not general processing. If it is not actually producing output frames then it won't parallelize. e.g. if you're de-shaking from 02:00 onwards then you will only get parallelism from 02:00 onwards, but everything up to 02:00 will still need to be processed serially.
                – Mehrdad
                Aug 19 at 3:14








              1




              1




              Note that this only seems to be true for encoding, not general processing. If it is not actually producing output frames then it won't parallelize. e.g. if you're de-shaking from 02:00 onwards then you will only get parallelism from 02:00 onwards, but everything up to 02:00 will still need to be processed serially.
              – Mehrdad
              Aug 19 at 3:14




              Note that this only seems to be true for encoding, not general processing. If it is not actually producing output frames then it won't parallelize. e.g. if you're de-shaking from 02:00 onwards then you will only get parallelism from 02:00 onwards, but everything up to 02:00 will still need to be processed serially.
              – Mehrdad
              Aug 19 at 3:14










              up vote
              4
              down vote













              In 2015 on Ubuntu 14.04 with ffmpeg 0.8.10-6, it used 1 core on a 4 core system.
              htop showed this; only one core was used, and I got 16 fps conversion rate for a FullHD video.



              Using -threads 4 made all my CPU cores go to 100% and I got a conversion rate of 47 fps.



              I used the following command:



              $ ffmpeg -i foo.mp4 -y -target pal-dvd -aspect 16:9 dvd-out.mpg





              share|improve this answer



























                up vote
                4
                down vote













                In 2015 on Ubuntu 14.04 with ffmpeg 0.8.10-6, it used 1 core on a 4 core system.
                htop showed this; only one core was used, and I got 16 fps conversion rate for a FullHD video.



                Using -threads 4 made all my CPU cores go to 100% and I got a conversion rate of 47 fps.



                I used the following command:



                $ ffmpeg -i foo.mp4 -y -target pal-dvd -aspect 16:9 dvd-out.mpg





                share|improve this answer

























                  up vote
                  4
                  down vote










                  up vote
                  4
                  down vote









                  In 2015 on Ubuntu 14.04 with ffmpeg 0.8.10-6, it used 1 core on a 4 core system.
                  htop showed this; only one core was used, and I got 16 fps conversion rate for a FullHD video.



                  Using -threads 4 made all my CPU cores go to 100% and I got a conversion rate of 47 fps.



                  I used the following command:



                  $ ffmpeg -i foo.mp4 -y -target pal-dvd -aspect 16:9 dvd-out.mpg





                  share|improve this answer














                  In 2015 on Ubuntu 14.04 with ffmpeg 0.8.10-6, it used 1 core on a 4 core system.
                  htop showed this; only one core was used, and I got 16 fps conversion rate for a FullHD video.



                  Using -threads 4 made all my CPU cores go to 100% and I got a conversion rate of 47 fps.



                  I used the following command:



                  $ ffmpeg -i foo.mp4 -y -target pal-dvd -aspect 16:9 dvd-out.mpg






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 3 '15 at 18:22

























                  answered Apr 3 '15 at 18:10









                  cweiske

                  76811129




                  76811129






















                      up vote
                      3
                      down vote













                      I was playing with converting in a CentOS 6.5 VM (Ryzen 1700 8c/16t - vm assigned 12 of 16 cores).
                      Experiments with 480p movies netted the following:



                      Thread option/Conversion Rate (fps @ 60 secs)



                      (none/default)/130fps
                      -threads 1/70fps
                      -threads 2/120fps
                      -threads 4/185fps
                      -threads 6/228fps
                      -threads 8/204fps
                      -threads 10/181fps


                      The interesting part was the CPU loading (using htop to watch it).

                      Using no -threads option wound up at the 130fps range with load spread out across all cores at a low-load level.

                      Using 1 thread did exactly that, loaded one core at 100%. Using anything else resulted in another spread-load situation.



                      As you can see, there's also a point of diminishing returns, so you'd have to adjust the -threads option for your particular machine. For my setup specifically, using the -threads 6 (on a 12 core machine) resulted in the best FPS when converting the video (from h264 to x264 at a different bitrate to force a conversion) and returns actually diminished the more threads I threw into it.



                      It could have been a memory issue too - it only had 1GB assigned to the VM. I may tweak that and see if that changes anything. Still - it does show that using the -threads option can increase performance so run some tests on your particular machine at different levels to find your setups sweet spot.






                      share|improve this answer























                      • Could you please add what do you mean by "converting"? Ideally, the exact command.
                        – Ondra Žižka
                        Nov 14 at 2:40















                      up vote
                      3
                      down vote













                      I was playing with converting in a CentOS 6.5 VM (Ryzen 1700 8c/16t - vm assigned 12 of 16 cores).
                      Experiments with 480p movies netted the following:



                      Thread option/Conversion Rate (fps @ 60 secs)



                      (none/default)/130fps
                      -threads 1/70fps
                      -threads 2/120fps
                      -threads 4/185fps
                      -threads 6/228fps
                      -threads 8/204fps
                      -threads 10/181fps


                      The interesting part was the CPU loading (using htop to watch it).

                      Using no -threads option wound up at the 130fps range with load spread out across all cores at a low-load level.

                      Using 1 thread did exactly that, loaded one core at 100%. Using anything else resulted in another spread-load situation.



                      As you can see, there's also a point of diminishing returns, so you'd have to adjust the -threads option for your particular machine. For my setup specifically, using the -threads 6 (on a 12 core machine) resulted in the best FPS when converting the video (from h264 to x264 at a different bitrate to force a conversion) and returns actually diminished the more threads I threw into it.



                      It could have been a memory issue too - it only had 1GB assigned to the VM. I may tweak that and see if that changes anything. Still - it does show that using the -threads option can increase performance so run some tests on your particular machine at different levels to find your setups sweet spot.






                      share|improve this answer























                      • Could you please add what do you mean by "converting"? Ideally, the exact command.
                        – Ondra Žižka
                        Nov 14 at 2:40













                      up vote
                      3
                      down vote










                      up vote
                      3
                      down vote









                      I was playing with converting in a CentOS 6.5 VM (Ryzen 1700 8c/16t - vm assigned 12 of 16 cores).
                      Experiments with 480p movies netted the following:



                      Thread option/Conversion Rate (fps @ 60 secs)



                      (none/default)/130fps
                      -threads 1/70fps
                      -threads 2/120fps
                      -threads 4/185fps
                      -threads 6/228fps
                      -threads 8/204fps
                      -threads 10/181fps


                      The interesting part was the CPU loading (using htop to watch it).

                      Using no -threads option wound up at the 130fps range with load spread out across all cores at a low-load level.

                      Using 1 thread did exactly that, loaded one core at 100%. Using anything else resulted in another spread-load situation.



                      As you can see, there's also a point of diminishing returns, so you'd have to adjust the -threads option for your particular machine. For my setup specifically, using the -threads 6 (on a 12 core machine) resulted in the best FPS when converting the video (from h264 to x264 at a different bitrate to force a conversion) and returns actually diminished the more threads I threw into it.



                      It could have been a memory issue too - it only had 1GB assigned to the VM. I may tweak that and see if that changes anything. Still - it does show that using the -threads option can increase performance so run some tests on your particular machine at different levels to find your setups sweet spot.






                      share|improve this answer














                      I was playing with converting in a CentOS 6.5 VM (Ryzen 1700 8c/16t - vm assigned 12 of 16 cores).
                      Experiments with 480p movies netted the following:



                      Thread option/Conversion Rate (fps @ 60 secs)



                      (none/default)/130fps
                      -threads 1/70fps
                      -threads 2/120fps
                      -threads 4/185fps
                      -threads 6/228fps
                      -threads 8/204fps
                      -threads 10/181fps


                      The interesting part was the CPU loading (using htop to watch it).

                      Using no -threads option wound up at the 130fps range with load spread out across all cores at a low-load level.

                      Using 1 thread did exactly that, loaded one core at 100%. Using anything else resulted in another spread-load situation.



                      As you can see, there's also a point of diminishing returns, so you'd have to adjust the -threads option for your particular machine. For my setup specifically, using the -threads 6 (on a 12 core machine) resulted in the best FPS when converting the video (from h264 to x264 at a different bitrate to force a conversion) and returns actually diminished the more threads I threw into it.



                      It could have been a memory issue too - it only had 1GB assigned to the VM. I may tweak that and see if that changes anything. Still - it does show that using the -threads option can increase performance so run some tests on your particular machine at different levels to find your setups sweet spot.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Nov 14 at 3:07









                      Ondra Žižka

                      3742721




                      3742721










                      answered Apr 6 '17 at 16:04









                      Bill Rookard

                      311




                      311












                      • Could you please add what do you mean by "converting"? Ideally, the exact command.
                        – Ondra Žižka
                        Nov 14 at 2:40


















                      • Could you please add what do you mean by "converting"? Ideally, the exact command.
                        – Ondra Žižka
                        Nov 14 at 2:40
















                      Could you please add what do you mean by "converting"? Ideally, the exact command.
                      – Ondra Žižka
                      Nov 14 at 2:40




                      Could you please add what do you mean by "converting"? Ideally, the exact command.
                      – Ondra Žižka
                      Nov 14 at 2:40










                      up vote
                      1
                      down vote













                      assuming you have threading enabled, it assigned 1.5x number of cores.






                      share|improve this answer





















                      • 1.5 x number of cores for frame threads. 1 x number of cores for slice threads. This is specific for (lib)x264. I'm not sure what the allocation is for other encoders.
                        – LordNeckbeard
                        Apr 3 '15 at 18:21












                      • @LordNeckbeard How to switch between frame threading and slice threading!?
                        – Dr.jacky
                        Aug 16 '15 at 5:50






                      • 1




                        @Mr.Hyde Probably with -x264-params sliced-threads=1. Or via usage of -tune zerolatency.
                        – LordNeckbeard
                        Aug 17 '15 at 19:55















                      up vote
                      1
                      down vote













                      assuming you have threading enabled, it assigned 1.5x number of cores.






                      share|improve this answer





















                      • 1.5 x number of cores for frame threads. 1 x number of cores for slice threads. This is specific for (lib)x264. I'm not sure what the allocation is for other encoders.
                        – LordNeckbeard
                        Apr 3 '15 at 18:21












                      • @LordNeckbeard How to switch between frame threading and slice threading!?
                        – Dr.jacky
                        Aug 16 '15 at 5:50






                      • 1




                        @Mr.Hyde Probably with -x264-params sliced-threads=1. Or via usage of -tune zerolatency.
                        – LordNeckbeard
                        Aug 17 '15 at 19:55













                      up vote
                      1
                      down vote










                      up vote
                      1
                      down vote









                      assuming you have threading enabled, it assigned 1.5x number of cores.






                      share|improve this answer












                      assuming you have threading enabled, it assigned 1.5x number of cores.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Sep 12 '12 at 19:19









                      rogerdpack

                      83121428




                      83121428












                      • 1.5 x number of cores for frame threads. 1 x number of cores for slice threads. This is specific for (lib)x264. I'm not sure what the allocation is for other encoders.
                        – LordNeckbeard
                        Apr 3 '15 at 18:21












                      • @LordNeckbeard How to switch between frame threading and slice threading!?
                        – Dr.jacky
                        Aug 16 '15 at 5:50






                      • 1




                        @Mr.Hyde Probably with -x264-params sliced-threads=1. Or via usage of -tune zerolatency.
                        – LordNeckbeard
                        Aug 17 '15 at 19:55


















                      • 1.5 x number of cores for frame threads. 1 x number of cores for slice threads. This is specific for (lib)x264. I'm not sure what the allocation is for other encoders.
                        – LordNeckbeard
                        Apr 3 '15 at 18:21












                      • @LordNeckbeard How to switch between frame threading and slice threading!?
                        – Dr.jacky
                        Aug 16 '15 at 5:50






                      • 1




                        @Mr.Hyde Probably with -x264-params sliced-threads=1. Or via usage of -tune zerolatency.
                        – LordNeckbeard
                        Aug 17 '15 at 19:55
















                      1.5 x number of cores for frame threads. 1 x number of cores for slice threads. This is specific for (lib)x264. I'm not sure what the allocation is for other encoders.
                      – LordNeckbeard
                      Apr 3 '15 at 18:21






                      1.5 x number of cores for frame threads. 1 x number of cores for slice threads. This is specific for (lib)x264. I'm not sure what the allocation is for other encoders.
                      – LordNeckbeard
                      Apr 3 '15 at 18:21














                      @LordNeckbeard How to switch between frame threading and slice threading!?
                      – Dr.jacky
                      Aug 16 '15 at 5:50




                      @LordNeckbeard How to switch between frame threading and slice threading!?
                      – Dr.jacky
                      Aug 16 '15 at 5:50




                      1




                      1




                      @Mr.Hyde Probably with -x264-params sliced-threads=1. Or via usage of -tune zerolatency.
                      – LordNeckbeard
                      Aug 17 '15 at 19:55




                      @Mr.Hyde Probably with -x264-params sliced-threads=1. Or via usage of -tune zerolatency.
                      – LordNeckbeard
                      Aug 17 '15 at 19:55










                      up vote
                      0
                      down vote













                      Some of these answers are a bit old, and I'd just like to add that with my ffmpeg 4.1, encoding with libx264, all 6 cores/12 threads of my 2600X system were maxed without any -thread argument.






                      share|improve this answer

























                        up vote
                        0
                        down vote













                        Some of these answers are a bit old, and I'd just like to add that with my ffmpeg 4.1, encoding with libx264, all 6 cores/12 threads of my 2600X system were maxed without any -thread argument.






                        share|improve this answer























                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          Some of these answers are a bit old, and I'd just like to add that with my ffmpeg 4.1, encoding with libx264, all 6 cores/12 threads of my 2600X system were maxed without any -thread argument.






                          share|improve this answer












                          Some of these answers are a bit old, and I'd just like to add that with my ffmpeg 4.1, encoding with libx264, all 6 cores/12 threads of my 2600X system were maxed without any -thread argument.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 21 at 3:01









                          Matt M.

                          1014




                          1014






























                               

                              draft saved


                              draft discarded



















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f155305%2fhow-many-threads-does-ffmpeg-use-by-default%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                              Alcedinidae

                              Origin of the phrase “under your belt”?