Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a good audio-video encoder which can utilize all cores of a multi-core CPU.

I've tried mencoder, but I can't see a "multi-core" option, and it appears to be using only one core at any given moment.

If mencoder cannot utilize multiple cores, is there another program which can?
It doesnt' bother me whether it is a GUI or CLI...

share|improve this question
up vote 5 down vote accepted

You need to use the "threads" option which is available for most encoder/decoders. Example:

mencoder -noodml -o $OUTPUT \
  -oac copy \
  -ovc xvid \
  -xvidencopts bitrate=1000:threads=2 \

Search for "threads" on the man page:

share|improve this answer
João, thanks. I had searched info mencoder for "core" :(. My original frames-per-second was FPS=32, with threads=2 FPS=43, with threads=4 FPS=47 ... so it is definitely faster, but it must be hitting some other limitation.... (data transfer? perhaps)... Determining CPU usage revealed a "strange" state of affairs for htop which showed 95% for all three tests.. However, top may have been more realistic it reported: no thread option 95%... threads=2 143%... threads=4 212%... So it seems that 1 core = 100%, but htop didn't show the extra threads (or at least that's how it looks to me). – Peter.O Nov 30 '10 at 12:49

For video encoding I use transmagedon. You can find it in Ubuntu Software Center. By default, it utilize multiple cores.

alt text

share|improve this answer
Salih, thanks for the suggestion... I must say! This program is in a class of its own! ... It is almost unbelievably simple to use, and could well be a good choice for people who only want to convert a video into another format. I'm amazed how simple it is, so +1 for that..... I, however, typically need something like mencoder to significantly process the video. This means I need lots of control (size, choice of quality, adding filters) and until AviSynth is available for Linux, I weep :) – Peter.O Nov 30 '10 at 13:51
Heh.. At least I tried.. :) I am not comfortable with cli programs, usually I ignore them even if they are powerful :P – Salih Emin Nov 30 '10 at 14:00

mencoder -lavdopts threads=N or is it mencoder -lavcopts threads=N

I'm also not sure how these related to "xvidencopts" above.

Though I'm not sure if these hurt quality or not...they might. You'll also need a fairly recent version of mencoder and ffmpeg for best results. Again it might hurt output quality.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.