Author Topic: HEVC in 2.7 only use 1 cpu core  (Read 616 times)

PlayX

  • Newbie
  • *
  • Posts: 8
HEVC in 2.7 only use 1 cpu core
« on: October 14, 2017, 06:43:13 PM »
I try to cut a Video in HEVC.
But in more complex scenes the CPU Load grows to 100% (on only one core) and the video slows down (sound runs good)

I bet one core is not enough to decode the video. Different Hardware Decoder Options dont work.
Doesn't the Decoder support Multithreading?

in 2.6 I have the same Problem.

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1538
Re: HEVC in 2.7 only use 1 cpu core
« Reply #1 on: October 15, 2017, 11:51:36 AM »
I try to cut a Video in HEVC.
But in more complex scenes the CPU Load grows to 100% (on only one core) and the video slows down

This is definitely not the case on my Fedora system running local Avidemux builds, the load is spread more or less evenly across both cores. This is unfortunately not enough to allow real-time playback of 720p HEVC video on my outdated hardware.

What platform and what Avidemux build are you referring to?

Quote
Different Hardware Decoder Options dont work.

You need a pretty new NVIDIA graphics card with NVIDIA binary drivers to decode 8 bit HEVC via VDPAU or a comparably new Intel GPU (Braswell and later).

Quote
Doesn't the Decoder support Multithreading?

This is a question I can't easily answer yet, unfortunately. Hopefully, Mean finds time for a clear statement.

PlayX

  • Newbie
  • *
  • Posts: 8
Re: HEVC in 2.7 only use 1 cpu core
« Reply #2 on: October 15, 2017, 01:50:30 PM »
I ise the AppImage Version 2.7 on Ubuntu 17.10
In VLC the load is on all cores during Playback (AMD FX-8300 @8x4GHz)

The Video was encoded with Nvenc_HEVC on the GPU so im shure decode should work as well. (GTX970)

VLC: https://imgur.com/t14TbAt
Avidemux: https://imgur.com/nXVxBaM
« Last Edit: October 15, 2017, 01:57:07 PM by PlayX »

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1538
Re: HEVC in 2.7 only use 1 cpu core
« Reply #3 on: October 15, 2017, 02:14:34 PM »
Could you please try a local Avidemux build from the current git? Compiling Avidemux locally is very easy on Linux, especially on Ubuntu (though it has not been tested on 17.10): with git installed,

Code: [Select]
git clone https://github.com/mean00/avidemux2.git
cd avidemux2
bash createDebFromSourceUbuntu.bash

If you want Avidemux to be installed in /usr/local, use

Code: [Select]
bash createDebFromSourceUbuntu.bash --prefix=/usr/local
instead.

PlayX

  • Newbie
  • *
  • Posts: 8
Re: HEVC in 2.7 only use 1 cpu core
« Reply #4 on: October 15, 2017, 02:30:37 PM »
did not work.
I will look at this later

https://pastebin.com/Xy5VF0Hp

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1538
Re: HEVC in 2.7 only use 1 cpu core
« Reply #5 on: October 15, 2017, 02:50:44 PM »
Yes, it would be helpful to know where the build actually fails. The output you posted originates presumably in cmake checking yasm (CMakeDetermineCompilerId.cmake), nothing listed there should be fatal for compilation.

PlayX

  • Newbie
  • *
  • Posts: 8
Re: HEVC in 2.7 only use 1 cpu core
« Reply #6 on: October 15, 2017, 03:02:00 PM »
-- Packager=deb, valid choices= {deb,rpm,tgz,none}
CMake Error at pluginsPackageDebian.cmake:18 (ELSE):
  A duplicate ELSE command was found inside an IF block.
Call Stack (most recent call first):
  /home/playx/avidemux2/install/usr/include/avidemux/2.7/cmake/admPackager.cmake:18 (include)
  CMakeLists.txt:283 (admPackager)


-- Configuring incomplete, errors occurred!
See also "/home/playx/avidemux2/buildPluginsCommon/CMakeFiles/CMakeOutput.log".
See also "/home/playx/avidemux2/buildPluginsCommon/CMakeFiles/CMakeError.log".
** Failed at cmakeZ**
Installing avidemux...
createDebFromSourceUbuntu.bash: Zeile 35: cd: debs: Datei oder Verzeichnis nicht gefunden
playx@desktop:~/avidemux2$

Output: https://pastebin.com/TnprsNtq
Error: https://pastebin.com/v7v4UkgX

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1538
Re: HEVC in 2.7 only use 1 cpu core
« Reply #7 on: October 15, 2017, 03:54:34 PM »
Should be fixed now. Please run

Code: [Select]
git pull
in the avidemux2 folder followed by

Code: [Select]
bash createDebFromSourceUbuntu.bash --rebuild

PlayX

  • Newbie
  • *
  • Posts: 8
Re: HEVC in 2.7 only use 1 cpu core
« Reply #8 on: October 15, 2017, 09:13:09 PM »
all goes good but if I try to start (after install the debs)
avidemux3_qt5: symbol lookup error: avidemux3_qt5: undefined symbol: _ZN13ADM_vaSurfaceD1Ev

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1538
Re: HEVC in 2.7 only use 1 cpu core
« Reply #9 on: October 15, 2017, 10:00:28 PM »
Do you have another build installed elsewhere?

PlayX

  • Newbie
  • *
  • Posts: 8
Re: HEVC in 2.7 only use 1 cpu core
« Reply #10 on: October 15, 2017, 10:28:18 PM »
a few old 2.6 things was there. I have removed them all and now the new avidemux work.

but still the same 100% core use.
btw x264 seems to have the same but my cpu seems fast enough to decode it in single core.

hw decode dont work. the load is the same (with or without activated vadapu)

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1538
Re: HEVC in 2.7 only use 1 cpu core
« Reply #11 on: October 15, 2017, 10:45:09 PM »
Please run Avidemux in terminal

Code: [Select]
avidemux3_qt5 > ~/admlog.txt
load a H.264 video (optionally try to play it), quit Avidemux, then compress admlog.txt and attach it to your reply.

PlayX

  • Newbie
  • *
  • Posts: 8
Re: HEVC in 2.7 only use 1 cpu core
« Reply #12 on: October 15, 2017, 11:04:52 PM »
h264 works now with HW decode. maybe some settings was wrong in my testing before.

https://imgur.com/a/B0jsu
2x vdpau below decoder

https://imgur.com/a/qTgqx
but for hevc this is not

I have atached you the log from the hevc video

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1538
Re: HEVC in 2.7 only use 1 cpu core
« Reply #13 on: October 15, 2017, 11:15:09 PM »
Thanks, does vdpauinfo list HEVC as supported? EDIT: Please note that Avidemux currently supports only HEVC_MAIN via VDPAU.

BTW, please try to run Avidemux with env var QT_STYLE_OVERRIDE set to fusion.
« Last Edit: October 15, 2017, 11:32:58 PM by eumagga0x2a »

PlayX

  • Newbie
  • *
  • Posts: 8
Re: HEVC in 2.7 only use 1 cpu core
« Reply #14 on: October 15, 2017, 11:32:05 PM »
https://imgur.com/a/7U27B
ok this might be the problem for hw decode ;-)

after a bit research
it seems a gtx970 (Maxwell G2)can only encode hevc in hardware but not decode
but a gtx960 (Maxwell G206) (came later and is based on a tweaked gpu) can encode and decode hevc

found this table


so only a GTX950 and GTX960 and the complete GTX10XX series can handle both

ok now we have to bring multithreaddding to libx265 ;-) or I use h264 until I have a better Card ;-)
« Last Edit: October 15, 2017, 11:35:23 PM by PlayX »