Avidemux Forum

Avidemux => Unix-Like (Linux/Bsd/...) => Topic started by: PlayX on October 14, 2017, 06:43:13 PM

Title: HEVC in 2.7 only use 1 cpu core
Post by: PlayX 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.
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: eumagga0x2a on October 15, 2017, 11:51:36 AM
Quote from: PlayX 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

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?

QuoteDifferent 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).

QuoteDoesn't the Decoder support Multithreading?

This is a question I can't easily answer yet, unfortunately. Hopefully, Mean finds time for a clear statement.
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: PlayX 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
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: eumagga0x2a 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,

git clone https://github.com/mean00/avidemux2.git
cd avidemux2
bash createDebFromSourceUbuntu.bash


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

bash createDebFromSourceUbuntu.bash --prefix=/usr/local

instead.
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: PlayX on October 15, 2017, 02:30:37 PM
did not work.
I will look at this later

https://pastebin.com/Xy5VF0Hp
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: eumagga0x2a 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.
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: PlayX 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
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: eumagga0x2a on October 15, 2017, 03:54:34 PM
Should be fixed (https://github.com/mean00/avidemux2/commit/95fc81495544f4c9a79476bbf2c00ec17a49b27e) now. Please run

git pull

in the avidemux2 folder followed by

bash createDebFromSourceUbuntu.bash --rebuild
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: PlayX 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
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: eumagga0x2a on October 15, 2017, 10:00:28 PM
Do you have another build installed elsewhere?
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: PlayX 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)
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: eumagga0x2a on October 15, 2017, 10:45:09 PM
Please run Avidemux in terminal

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.
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: PlayX 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
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: eumagga0x2a 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 (https://github.com/mean00/avidemux2/blob/master/avidemux/common/ADM_videoCodec/src/ADM_ffmpeg_vdpau.cpp#L231) via VDPAU.

BTW, please try to run Avidemux with env var QT_STYLE_OVERRIDE set to fusion.
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: PlayX 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
(https://i.imgur.com/yVNTV3v.png)

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 ;-)
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: eumagga0x2a on October 15, 2017, 11:40:19 PM
Yeah, it feels as if it were time for a graphics card upgrade :-)
Title: Re: HEVC in 2.7 only use 1 cpu core
Post by: eumagga0x2a on October 15, 2017, 11:43:27 PM
Quote from: PlayX on October 15, 2017, 11:32:05 PM
ok now we have to bring multithreaddding to libx265 ;-) or I use h264 until I have a better Card ;-)

libx265 is used only for HEVC encoding. Decoding capabilities are provided by the bundled ffmpeg.