Using a system with two processors

Questions involving a Windows version of FFmpeg.
Post Reply
Mbelyaev
Posts: 2
Joined: Wed May 13, 2015 6:14 pm

Using a system with two processors

Post by Mbelyaev » Wed May 13, 2015 7:57 pm

I use the following command line in a system with two CPU E5-2660v3 (10 cores per CPU+HP=40 threads)
"ffmpeg.exe -i 1.avi -i 1.wav -vcodec h264 -threads 40 -preset slower -crf 17 -ab 192k -ar 48000 -flags +ilme+ildct -top 0 -movflags faststart -y 1.mp4"
the command line is set to use 40 threads, but in the task manager I see that only one CPU is used
Image

When I increase the number of threads to 80 (or more), increases the CPU load, but still only one CPU

Image

How can I use both processors?

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

Re: Using a system with two processors

Post by rogerdpack » Thu May 14, 2015 1:57 pm

complete uncut command line and console output of an example run please?

Mbelyaev
Posts: 2
Joined: Wed May 13, 2015 6:14 pm

Re: Using a system with two processors

Post by Mbelyaev » Tue Oct 10, 2017 9:20 pm

command
ffmpeg.exe -i v_file -i a_file -vcodec h264 -threads 96 -preset slower -crf 17 -ab 192k -ar 48000 -flags +ilme+ildct -x264opts bff=1 -movflags faststart -y output_file



ffmpeg version N-87353-g183fd3
0 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --e
nable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-lib
opencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 76.100 / 55. 76.100
libavcod
ec 57.106.101 / 57.106.101
libavformat 57. 82.101 / 57. 82.101
libavdevice 57. 8.101 / 57. 8.101
libavfilter 6.105.100 / 6.105.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
libpostproc
54. 6.100 / 54. 6.100

Guessed Channel Layout for Input Stream #0.0 : stereo

Input #0, wav, from 'S:\localhost\htdocs\uploads\12733\MARAFON_20170722_sayt.wav':
Duration: 01:07:10.08, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s

Input #1, avi, from 'S:\localhost\htdocs\uploads\12733\MARAFON_20170722_sayt.avi':

Metadata:
date : 2017-07-20T14:05:32+03:00
encoder : Adobe Premiere Pro CC 2015 (Windows)
Duration: 01:07:10.08, start: 0.000000, bitrate: 28807 kb/s
Stream #1:0: Video: dvvideo (dvsd / 0x64737664), yuv420p, 720x57
6 [SAR 16:15 DAR 4:3], 28800 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #1:0 -> #0:0 (dvvideo (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help

[libx264 @ 0000000001f4e440]
Application has requested 96 threads. Using a thread count greater than 16 is not recommended.

[libx264 @ 0000000001f4e440]
interlace + weightp is not implemented
[libx264 @ 0000000001f4e440] using SAR=16/15
[libx264 @ 0000000001f4e440] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

[libx264 @ 0000000001f4e440]
profile High, level 3.1
[libx264 @ 0000000001f4e440] 264 - core 152 r2851 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=8 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=9 psy=1 psy_rd=1.00
:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=96 lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=bff bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_a
dapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=17.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00

Output #0, mp4, to 's:\localhost\htdocs\uploads\a_videos\a_video_7078.mp4':

Metadata:
encoder : Lavf57.82.101
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(bottom coded first (swapped)), 720x576 [SAR 16:15 DAR 4:3], q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : La
vc57.106.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s
Metadata:
encoder : Lavc57.106.101 aac

pandy
Posts: 55
Joined: Mon Feb 24, 2014 1:46 pm

Re: Using a system with two processors

Post by pandy » Tue Oct 31, 2017 4:53 pm

IMHO you need different ffmpeg build that will support fully NUMA (not sure however if such build exist).
If this is possible try to start second ffmpeg process (use batch command START with explicit AFFINITY) you can split encoding on two - use 'stichable' option etc.

Post Reply