VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Member
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    I'm wrapping up the design on an automated system to convert broadcast-quality MPEG-2 to stream-quality MPEG-4 for a government access TV station. It uses ffmpeg SVN-r10464 (the Celtic Druid binaries) under Windows XP Pro SP2.

    On my test workstation, everything works very well and ffmpeg happily gobbles up 97-99% of my CPU. However, when I move it to the PC which is dedicated to encoding streams, it will never use more than exactly 50% of the CPU. The only significant difference I can find is that the new PC has a dual-core CPU while my test workstation is a single-core. ffmpeg is written for dual-core and spreads the process across both, but it never exceeds 50% total. If I change the CPU affinity and only give it access to one core, it will use the whole core but again never exceeds 50% of the total.

    While everything works the way it's supposed to, I'd really love to convince ffmpeg to make use of the rest of the CPU. Does anyone have any notion what might be going on? Perhaps it's related to the Pthreads-w32 DLL that ffmpeg uses?

    Thanks!
    Quote Quote  
  2. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    it may be that the cpu speed has exceeded the i/o transfer speed of the hard drive you are using and can't read write any faster causing the bottleneck.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  3. Member
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Originally Posted by aedipuss
    it may be that the cpu speed has exceeded the i/o transfer speed of the hard drive you are using and can't read write any faster causing the bottleneck.
    That's a good thought. I'll see if I can find a way to test that.

    Thanks!
    Quote Quote  
  4. Member
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Originally Posted by aedipuss
    it may be that the cpu speed has exceeded the i/o transfer speed of the hard drive you are using and can't read write any faster causing the bottleneck.
    OK, I don't think that's it. I ran a test reading from and writing to a flash drive and ffmpeg still maxed out at 50% CPU usage. I would think that if I/O was the bottleneck, then slower I/O would result in a slower bottleneck (I'd need something faster than my hard drive to know for certain, but I don't have anything faster on hand.)

    Thanks for the idea, though!
    Quote Quote  
  5. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Try ffmpeg -threads 2 -i yourinputfile.avi etc
    Quote Quote  
  6. Member
    Join Date
    Nov 2007
    Location
    United States
    Search Comp PM
    Originally Posted by Soopafresh
    Try "ffmpeg -threads 2"
    That does the trick!

    Sorry to miss something so obvious. When I saw that it was using both cores, I assumed it had auto-detected and was already running multiple threads.

    Thanks!
    Quote Quote  
  7. Well if that works try "ffmpeg -threads 3 -i yourinputfile.avi" LOL
    Corned beef is now made to a higher standard than at any time in history.
    The electronic components of the power part adopted a lot of Rubycons.
    Quote Quote  



Similar Threads

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