Am I doing something wrong or is the threading option in avconv broken? I tried the -threads option with H264 and mpeg2video and regardless of what value I give it (0 to 4) there is no difference in performance at all.If I split the screen into multiple tiles of 640x640 and run separate instances of avconv for each simultaneously I get 90 FPS on each.If I just create one 2560x1440 ffmpeg stream I get like 12 FPS.So clearly threading is working on the system level but not within avconv.On the client side I can use tiled mplayer instances, that's not a problem.   There's a lot of flicker glitches where the image buffer of one stream is shown in the other. (I'm using different UDP port numbers for each tile so it's not that) I suspect this is an avconv glitch where it's not designed to be ran in multiple instances and therefore it shares some kind of buffer.The command I use:avconv -f x11grab -s 640x640 -framerate 180 -i :0.0+320,400 -c:v mpeg2video -q:v 20 -pix_fmt yuv420p -g 1 -threads 4 -f mpegts udp://192.168.0.7:1231Avconv/ffmpeg version:avconv -versionffmpeg version 2.8.8-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developersbuilt with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencvlibavutil      54. 31.100 / 54. 31.100libavcodec     56. 60.100 / 56. 60.100libavformat    56. 40.101 / 56. 40.101libavdevice    56.  4.100 / 56.  4.100libavfilter     5. 40.101 /  5. 40.101libavresample   2.  1.  0 /  2.  1.  0libswscale      3.  1.101 /  3.  1.101libswresample   1.  2.101 /  1.  2.101libpostproc    53.  3.100 / 53.  3.100As for the processors:processor       : 0vendor_id       : AuthenticAMDcpu family      : 21model           : 1model name      : AMD FX(tm)-4170 Quad-Core Processorstepping        : 2microcode       : 0x6000629cpu MHz         : 2900.000cache size      : 2048 KBphysical id     : 0siblings        : 4core id         : 0cpu cores       : 2apicid          : 0initial apicid  : 0fpu             : yesfpu_exception   : yescpuid level     : 13wp              : yesflags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 nodeid_msr topoext perfctr_core perfctr_nb cpb hw_pstate vmmcall arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthresholdbugs            : fxsave_leak sysret_ss_attrsbogomips        : 8456.93TLB size        : 1536 4K pagesclflush size    : 64cache_alignment : 64address sizes   : 48 bits physical, 48 bits virtualpower management: ts ttp tm 100mhzsteps hwpstate cpb...and so onThe application is streaming virtual reality. It needs to be 90 FPS with no latency. If split into tiles the framerate is not a problem which proves that threading is messed up. The only codec not introducing any noticeable latency is mpeg2video.I also downloaded and compiled from source latest ffmpeg - version 3.2.2 and get the same results.
avconv / ffmpeg threading not working
ffmpeg;avconv