setting cpu thread in ffmpeg





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I have a PC 24 Thread and when I use ffmpeg I only use 25% of my CPU usage. so how can all of these 24 threads be used? so my CPU usage reaches 100%, because if it's 25% it's still a slow process



example:



ffmpeg -i video01.mkv -i watermark.png -filter_complex "overlay = 10: 10" output01.mkv



how to set 24 cpu threads?










share|improve this question























  • by default it uses (IIRC) 1.5x threads as you have cores but you can force a specific number of threads with -threads 0 ... what OS (Windows or Linux), processor and ffmpeg version (32 or 64 bit) are you using?

    – Offbeatmammal
    Jan 3 at 21:33











  • i using dedicated server windows 2012, spesification intel xeon 24 thread ram 104 GB

    – Amy Bomer
    Jan 4 at 15:34


















0















I have a PC 24 Thread and when I use ffmpeg I only use 25% of my CPU usage. so how can all of these 24 threads be used? so my CPU usage reaches 100%, because if it's 25% it's still a slow process



example:



ffmpeg -i video01.mkv -i watermark.png -filter_complex "overlay = 10: 10" output01.mkv



how to set 24 cpu threads?










share|improve this question























  • by default it uses (IIRC) 1.5x threads as you have cores but you can force a specific number of threads with -threads 0 ... what OS (Windows or Linux), processor and ffmpeg version (32 or 64 bit) are you using?

    – Offbeatmammal
    Jan 3 at 21:33











  • i using dedicated server windows 2012, spesification intel xeon 24 thread ram 104 GB

    – Amy Bomer
    Jan 4 at 15:34














0












0








0








I have a PC 24 Thread and when I use ffmpeg I only use 25% of my CPU usage. so how can all of these 24 threads be used? so my CPU usage reaches 100%, because if it's 25% it's still a slow process



example:



ffmpeg -i video01.mkv -i watermark.png -filter_complex "overlay = 10: 10" output01.mkv



how to set 24 cpu threads?










share|improve this question














I have a PC 24 Thread and when I use ffmpeg I only use 25% of my CPU usage. so how can all of these 24 threads be used? so my CPU usage reaches 100%, because if it's 25% it's still a slow process



example:



ffmpeg -i video01.mkv -i watermark.png -filter_complex "overlay = 10: 10" output01.mkv



how to set 24 cpu threads?







video ffmpeg encode






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 3 at 10:03









Amy BomerAmy Bomer

73




73













  • by default it uses (IIRC) 1.5x threads as you have cores but you can force a specific number of threads with -threads 0 ... what OS (Windows or Linux), processor and ffmpeg version (32 or 64 bit) are you using?

    – Offbeatmammal
    Jan 3 at 21:33











  • i using dedicated server windows 2012, spesification intel xeon 24 thread ram 104 GB

    – Amy Bomer
    Jan 4 at 15:34



















  • by default it uses (IIRC) 1.5x threads as you have cores but you can force a specific number of threads with -threads 0 ... what OS (Windows or Linux), processor and ffmpeg version (32 or 64 bit) are you using?

    – Offbeatmammal
    Jan 3 at 21:33











  • i using dedicated server windows 2012, spesification intel xeon 24 thread ram 104 GB

    – Amy Bomer
    Jan 4 at 15:34

















by default it uses (IIRC) 1.5x threads as you have cores but you can force a specific number of threads with -threads 0 ... what OS (Windows or Linux), processor and ffmpeg version (32 or 64 bit) are you using?

– Offbeatmammal
Jan 3 at 21:33





by default it uses (IIRC) 1.5x threads as you have cores but you can force a specific number of threads with -threads 0 ... what OS (Windows or Linux), processor and ffmpeg version (32 or 64 bit) are you using?

– Offbeatmammal
Jan 3 at 21:33













i using dedicated server windows 2012, spesification intel xeon 24 thread ram 104 GB

– Amy Bomer
Jan 4 at 15:34





i using dedicated server windows 2012, spesification intel xeon 24 thread ram 104 GB

– Amy Bomer
Jan 4 at 15:34












1 Answer
1






active

oldest

votes


















0














It is designed so that you can still use your system for other processes. The comment explains how to manipulate ffmpeg thread behavior. If you ask me, default ffmpeg behavior is pretty good. It allows multiple encoding and decoding on same system with running separate ffmpeg processes.



If you tell me that system will do only "this" job in it's lifetime, than this PC probably an overkill for this job.



And finally, according to Amdahl's law, using too many threads may not yield linear performance speed-up either.



Hope that helps.






share|improve this answer
























  • means there is no solution to speed up encoding?

    – Amy Bomer
    Jan 4 at 15:35











  • I would try adjusting the threads parameter (as per original comment) and experiment. Do make sure you're running latest version of ffmpeg, and watch sysmon to make sure you're not getting gated on something like disk I/O.

    – Offbeatmammal
    Jan 4 at 21:24











  • @AmyBomer is that a NUMA system (kinda means the main board has multiple cpus installed on different sockets, probably two on your system) ?

    – the kamilz
    Jan 5 at 16:04












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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',
autoActivateHeartbeat: false,
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%2fstackoverflow.com%2fquestions%2f54020024%2fsetting-cpu-thread-in-ffmpeg%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














It is designed so that you can still use your system for other processes. The comment explains how to manipulate ffmpeg thread behavior. If you ask me, default ffmpeg behavior is pretty good. It allows multiple encoding and decoding on same system with running separate ffmpeg processes.



If you tell me that system will do only "this" job in it's lifetime, than this PC probably an overkill for this job.



And finally, according to Amdahl's law, using too many threads may not yield linear performance speed-up either.



Hope that helps.






share|improve this answer
























  • means there is no solution to speed up encoding?

    – Amy Bomer
    Jan 4 at 15:35











  • I would try adjusting the threads parameter (as per original comment) and experiment. Do make sure you're running latest version of ffmpeg, and watch sysmon to make sure you're not getting gated on something like disk I/O.

    – Offbeatmammal
    Jan 4 at 21:24











  • @AmyBomer is that a NUMA system (kinda means the main board has multiple cpus installed on different sockets, probably two on your system) ?

    – the kamilz
    Jan 5 at 16:04
















0














It is designed so that you can still use your system for other processes. The comment explains how to manipulate ffmpeg thread behavior. If you ask me, default ffmpeg behavior is pretty good. It allows multiple encoding and decoding on same system with running separate ffmpeg processes.



If you tell me that system will do only "this" job in it's lifetime, than this PC probably an overkill for this job.



And finally, according to Amdahl's law, using too many threads may not yield linear performance speed-up either.



Hope that helps.






share|improve this answer
























  • means there is no solution to speed up encoding?

    – Amy Bomer
    Jan 4 at 15:35











  • I would try adjusting the threads parameter (as per original comment) and experiment. Do make sure you're running latest version of ffmpeg, and watch sysmon to make sure you're not getting gated on something like disk I/O.

    – Offbeatmammal
    Jan 4 at 21:24











  • @AmyBomer is that a NUMA system (kinda means the main board has multiple cpus installed on different sockets, probably two on your system) ?

    – the kamilz
    Jan 5 at 16:04














0












0








0







It is designed so that you can still use your system for other processes. The comment explains how to manipulate ffmpeg thread behavior. If you ask me, default ffmpeg behavior is pretty good. It allows multiple encoding and decoding on same system with running separate ffmpeg processes.



If you tell me that system will do only "this" job in it's lifetime, than this PC probably an overkill for this job.



And finally, according to Amdahl's law, using too many threads may not yield linear performance speed-up either.



Hope that helps.






share|improve this answer













It is designed so that you can still use your system for other processes. The comment explains how to manipulate ffmpeg thread behavior. If you ask me, default ffmpeg behavior is pretty good. It allows multiple encoding and decoding on same system with running separate ffmpeg processes.



If you tell me that system will do only "this" job in it's lifetime, than this PC probably an overkill for this job.



And finally, according to Amdahl's law, using too many threads may not yield linear performance speed-up either.



Hope that helps.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 4 at 7:35









the kamilzthe kamilz

8441613




8441613













  • means there is no solution to speed up encoding?

    – Amy Bomer
    Jan 4 at 15:35











  • I would try adjusting the threads parameter (as per original comment) and experiment. Do make sure you're running latest version of ffmpeg, and watch sysmon to make sure you're not getting gated on something like disk I/O.

    – Offbeatmammal
    Jan 4 at 21:24











  • @AmyBomer is that a NUMA system (kinda means the main board has multiple cpus installed on different sockets, probably two on your system) ?

    – the kamilz
    Jan 5 at 16:04



















  • means there is no solution to speed up encoding?

    – Amy Bomer
    Jan 4 at 15:35











  • I would try adjusting the threads parameter (as per original comment) and experiment. Do make sure you're running latest version of ffmpeg, and watch sysmon to make sure you're not getting gated on something like disk I/O.

    – Offbeatmammal
    Jan 4 at 21:24











  • @AmyBomer is that a NUMA system (kinda means the main board has multiple cpus installed on different sockets, probably two on your system) ?

    – the kamilz
    Jan 5 at 16:04

















means there is no solution to speed up encoding?

– Amy Bomer
Jan 4 at 15:35





means there is no solution to speed up encoding?

– Amy Bomer
Jan 4 at 15:35













I would try adjusting the threads parameter (as per original comment) and experiment. Do make sure you're running latest version of ffmpeg, and watch sysmon to make sure you're not getting gated on something like disk I/O.

– Offbeatmammal
Jan 4 at 21:24





I would try adjusting the threads parameter (as per original comment) and experiment. Do make sure you're running latest version of ffmpeg, and watch sysmon to make sure you're not getting gated on something like disk I/O.

– Offbeatmammal
Jan 4 at 21:24













@AmyBomer is that a NUMA system (kinda means the main board has multiple cpus installed on different sockets, probably two on your system) ?

– the kamilz
Jan 5 at 16:04





@AmyBomer is that a NUMA system (kinda means the main board has multiple cpus installed on different sockets, probably two on your system) ?

– the kamilz
Jan 5 at 16:04




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54020024%2fsetting-cpu-thread-in-ffmpeg%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

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

'app-layout' is not a known element: how to share Component with different Modules