15
4
Working on a tube site. I'm running videos through ffmpeg on a linux dedicated server to convert to mp4.
The server specs:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 60
Stepping: 3
CPU MHz: 3491.749
BogoMIPS: 6983.49
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K
NUMA node0 CPU(s): 0-7
Issue during testing is that even only doing 4-5 at once, the server load skyrockets to an average of around 36. This is just a single person. I imagine when it opens, many people will be uploading at once.
It seems ffmpeg tries to use all the resources available per conversion.
I've heard there's a -threads setting you can change, but I cannot find it. I have an 8 cpu server. It's only used for conversions, so I've heard the best setting would be between 2 and 4. I can test it out.
But how do I change this setting? Everything I see online discusses this setting, but not the steps to change it.
10Option placement matters. With
-threads
before the input you are applying this option the the input (the decoder). A generalized usage isffmpeg [global options] [input options] -i input [output options] output
. – llogan – 2014-08-05T18:25:30.160So where would you suggest placing it? I thought at the beginning it was being applied globally? – denjello – 2014-08-05T18:34:14.107
3
As an output option so it becomes an encoding option. See the FFmpeg documentation to view which options are marked as
– llogan – 2014-08-05T18:44:18.753(global)
.does it matter if you put the
-threads
arg before or after-i
arg? Also, how should I determine how many threads I should use? I'm basically just doing-c copy
– chovy – 2016-07-28T03:34:04.503