How to optimize multicore encoding

Questions involving a Windows version of FFmpeg.
rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: How to optimize multicore encoding

Post by rogerdpack » Thu Aug 09, 2012 3:32 am

oh yeah my builds don't have it yet. I'll try and add it :)

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: How to optimize multicore encoding

Post by rogerdpack » Thu Aug 09, 2012 3:26 pm

Ok my latest test stuff has libxvid now.
While compiling, I also noticed that the 64 bit versions of libxvid *don't have any assembly* available so they might be slower than the 32 bit...

http://rogerdpack.t28.net/incoming/ffmp ... libxvid.7z

-r

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: How to optimize multicore encoding

Post by rogerdpack » Thu Aug 16, 2012 12:37 pm

Also note that the "mainlines" distros seem to use stable threading now, so they're good too :)

RedPenguin
Posts: 20
Joined: Mon Mar 25, 2013 5:25 am

Re: How to optimize multicore encoding

Post by RedPenguin » Sat Apr 06, 2013 6:18 am

Sorry to resurrect an old post but I am having a very similar issue.

I have always downloaded the very latest Zeranoe builds mainly because WinFF uses old ones and newest fixes are never preset such as the one I submitted which was fixed for putting -t over 24 hours for seeking.

Yet for libxvid encoding no matter what I put for threads such as -threads 0 or -threads 2 or 4 (depending on which system I am on) it does not encode any faster what so ever as if there is no threads support in the builds.

I have this happen on Windows 7 and Windows 8.

Ajaja
Posts: 69
Joined: Fri Mar 08, 2013 2:00 pm

Re: How to optimize multicore encoding

Post by Ajaja » Sat Apr 06, 2013 1:11 pm

RedPenguin wrote:Yet for libxvid encoding no matter what I put for threads such as -threads 0 or -threads 2 or 4 (depending on which system I am on) it does not encode any faster what so ever as if there is no threads support in the builds.
Confirm, "threads" option ignored for libxvid encoding in Zeranoe's builds. But builds from mplayer-win32 (http://sourceforge.net/projects/mplayer ... es/FFmpeg/) do not support threads too. Looks like it's ffmpegs issue.

BTW. There is no asm support in Zeranoe's builds for libxvid (both x86 and x64) too. I get ~100fps on test video using Zeranoe's builds, and ~400fps using builds from mplayer-win32.

RedPenguin
Posts: 20
Joined: Mon Mar 25, 2013 5:25 am

Re: How to optimize multicore encoding

Post by RedPenguin » Sun Apr 07, 2013 5:02 am

I even found and tried these builds which seem very similar to Zeranoe's except they seem to have put in "enable-pthreads" but even still no go.

http://rodrigopolo.com/ffmpeg/

It just seems I never go over about 60% of CPU usage on a dual-core.

Ajaja
Posts: 69
Joined: Fri Mar 08, 2013 2:00 pm

Re: How to optimize multicore encoding

Post by Ajaja » Sun Apr 07, 2013 11:17 am

All tested ffmpeg builds - maximum 30% CPU on 4 cores. And Process Explorer (http://technet.microsoft.com/en-us/sysi ... 96653.aspx) shows no additional threads with -threads N in comparison to -threads 1.

So, it's better to use -c:v mpeg4. It works fine and much faster than libxvid.

RedPenguin
Posts: 20
Joined: Mon Mar 25, 2013 5:25 am

Re: How to optimize multicore encoding

Post by RedPenguin » Sun Apr 07, 2013 11:39 am

I was thinking about that but some other sites claim it's lower quality while others claim it's the same quality, so it has me confused, LoL.

Though in my tests they seem virtually identical and I can't stand 27 fps so at least 74 is way better.

27 means 1 hr video takes virtually 1 hr so it just seems so slow.

EDIT: Yes I definitely am switching now, because even on my dual-core I get is 91-93 then 105 fps which is almost 3.5 times faster than going 27 fps so I can finally clear my hard drive off.

I wish I knew about this "trick" a while back, it's way way faster.

rogerdpack
Posts: 1877
Joined: Fri Aug 05, 2011 9:56 pm

Re: How to optimize multicore encoding

Post by rogerdpack » Thu May 16, 2013 7:14 am

Ajaja wrote:
RedPenguin wrote:Yet for libxvid encoding no matter what I put for threads such as -threads 0 or -threads 2 or 4 (depending on which system I am on) it does not encode any faster what so ever as if there is no threads support in the builds.
Confirm, "threads" option ignored for libxvid encoding in Zeranoe's builds. But builds from mplayer-win32 (http://sourceforge.net/projects/mplayer ... es/FFmpeg/) do not support threads too. Looks like it's ffmpegs issue.

BTW. There is no asm support in Zeranoe's builds for libxvid (both x86 and x64) too. I get ~100fps on test video using Zeranoe's builds, and ~400fps using builds from mplayer-win32.
Is that because of lack of threading or lack of asm?

Post Reply
'