VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member Klagar's Avatar
    Join Date
    Sep 2010
    Location
    Montreal, Canada
    Search Comp PM
    Hi !

    I am confused with a few parameters in FFmpeg, so I'm posting a few threads to try and adress some of them ; I think discussion will be a lot clearer that way.

    What does the -threads parameter do ?
    From Robert Swain's Encoding Guide :
    For all rate control methods you will probably want libx264 to select the number of threads to use to maximise its performance on your CPU(s):
    -threads 0
    Can someone tell me what are its concrete effects, and whether it is supposed to work only with libx264 ? From what I've tested so far it doesn't seem to work with wmv2 and libxvid codecs, but maybe I haven't done it the right way...

    Regards !
    Quote Quote  
  2. Basically, multiple threads allows multiple cores and/or multiple CPUs to work on the job at the same time. Setting threads to 0 is a special case, it tells the encoder to decide for itself how many threads to use.

    If you deliver goods with a truck and it takes you an hour to deliver one truck load, you can deliver twice as much using two trucks -- two truckloads per hour, three times as much with three trucks, etc. Eventually you get diminishing returns because your loading dock isn't fast enough to load all those trucks. If your loading dock can only load 4 trucks per hour then having 10 trucks won't get you any better throughput than 4.
    Last edited by jagabo; 9th Nov 2010 at 11:09.
    Quote Quote  
  3. Member Klagar's Avatar
    Join Date
    Sep 2010
    Location
    Montreal, Canada
    Search Comp PM
    Wow now that was a comprehensive answer !
    Thanks a lot !
    Quote Quote  
  4. By the way, Xvid maxes out at 1 times the number of cores you have, or at around 4 threads if you have more than 4 cores. x264 maxes out at around 1.5 times the number of cores. So a quad core CPU will encode with x264 fastest with 6 threads.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!