Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: Jan Gruuthuse on October 16, 2016, 09:24:54 AM

Title: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 16, 2016, 09:24:54 AM
fixed: 153a4b2        [libVa] Fix probing, vp9 was aliased to hevc
Code: [Select]
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:436:18: warning: ‘AVCodecContext::coded_frame’ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
     if(_context->coded_frame)
                  ^
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:436:18: warning: ‘AVCodecContext::coded_frame’ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:438:29: warning: ‘AVCodecContext::coded_frame’ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
         pict_type=_context->coded_frame->pict_type;
                             ^
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:438:29: warning: ‘AVCodecContext::coded_frame’ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:439:28: warning: ‘AVCodecContext::coded_frame’ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
         keyframe=_context->coded_frame->key_frame;
                            ^
/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/src/ADM_coreVideoEncoderFFmpeg.cpp:439:28: warning: ‘AVCodecContext::coded_frame’ is deprecated (declared at /home/jan/avidemux2/buildCore/ffmpeg/source/libavcodec/avcodec.h:2951) [-Wdeprecated-declarations]
make[2]: *** [ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o] Error 1
make[2]: Leaving directory `/home/jan/avidemux2/buildCore'
make[1]: *** [ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/all] Error 2

_____________________________________________
Avidemux v2.6.14 (18f0680)        [UI] Try to handle maximizing window and back a bit better (euma)
_____________________________________________
Compiler: GCC 4.8.4
cmake: 2.8.12.2
Build Target: Linux (x86-64)
User Interface: Qt (4.8.6)
_____________________________________________
Kernel: Linux 3.19.0-71-generic (x86_64) (linux-image-3.19.0-71-generic                         3.19.0-71.79~14.04.1)
Distribution: Linux Ubuntu 14.04.5 LTS (Trusty)
qt4-default: installed
qt5-default: not installed
_____________________________________________

Intel Core i7-3770K @ 3.50GHz (4 Cores/8 Threads) with 32 GB ram

Desktop: Unity 7.2.6
Display Server: X Server 1.15.1
Display Driver: NVIDIA 361.93.02
OpenGL: 4.3.0
Compiler: GCC 4.8.4 + CUDA 7.5


OpenGL Vendor: NVIDIA Corporation
OpenGL Renderer: GeForce GTX 960/PCIe/SSE2 2048MB (1227/3600MHz)
OpenGL: 4.5.0 NVIDIA 361.93.02


- vdpauinfo:API version: 1   NVIDIA VDPAU Driver Shared Library  361.93.02
- x264 0.148.2721 72d53ab
 (libswscale 3.1.101)
 (libavformat 56.36.100)
 x264 configuration: --bit-depth=8 --chroma-format=all
 libx264 configuration: --bit-depth=8 --chroma-format=all


- x265 [info]: HEVC encoder version 1.9+226-6561d8676581
 x265 [info]: build info [Linux][[GCC 4.8.4][64 bit] 8bit
_____________________________________________
Title: Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 16, 2016, 09:43:14 AM
The actual error is at line 1506:

Code: [Select]
/home/jan/avidemux2/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp: In static member function ‘static bool admLibVA::supported(VAProfile)’:
/home/jan/avidemux2/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp:489:16: error: ‘VAProfileVP9Profile3’ was not declared in this scope
         SUPSUP(VAProfileVP9Profile3,configVP9)
                ^
Title: Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 16, 2016, 12:37:31 PM
It is again an issue with an older libva version in Ubuntu 14.04.5. VAProfileVP9Profile3 is missing there in the list of available profiles in va.h from libva-dev. The commit [libva] Use our new cflags (https://github.com/mean00/avidemux2/commit/4993361091f4205be49c36d1a21b954959157d1c) might have exposed the issue.

I wonder if the typo at line 7 of cmake/cmake_compile_check/libva_vp9dec.cpp from the commit [libva] Better detection of system libva (h265, vp9,...) (https://github.com/mean00/avidemux2/commit/ff92a4e1c16646b1bb1dd06d80c1c61481559dea) might be related.

You could try the attached patch, even if it doesn't fix the build issue, it won't do any harm.

Code: [Select]
diff --git a/cmake/cmake_compile_check/libva_vp9dec.cpp b/cmake/cmake_compile_check/libva_vp9dec.cpp
index df5b55e..d22e365 100644
--- a/cmake/cmake_compile_check/libva_vp9dec.cpp
+++ b/cmake/cmake_compile_check/libva_vp9dec.cpp
@@ -4,6 +4,6 @@
 
 int main(int argc, char **argv)
 {
-        int attr=VAPRofileVP9Profile3;     
+        int attr=VAProfileVP9Profile3;     
         return 0;
 }

edited: Please check the output which bootStrap.bash prints to the terminal related to VP9 in the LIBVA context, e.g.

Code: [Select]
-- Checking for LIBVA
-- *******************
-- Found va/va.h
-- Checking it is the right version...
--     yes
-- Checking for HEVC decoder, result is TRUE
-- HEVC decoder is supported
-- Checking for VP9 decoder, result is TRUE
-- VP9 decoder is supported
-- Checking for DUMMY decoder, result is FALSE
-- DUMMY decoder is not supported
-- LibVA cflags=<-DLIBVA_HEVC_DEC;-DLIBVA_VP9_DEC>
-- Found LIBVA

If yours finds VP9, the detection is wrong.
Title: Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: mean on October 16, 2016, 03:24:24 PM
Should work now
be sure to delete the core build tree, some internal vars used are cached
Title: Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 16, 2016, 04:25:27 PM
libva on Ubuntu 14.04.5 doesn't support HEVC either, so even if the VP9 check really only checked for HEVC (which I gloriously missed looking at the patch :-[), the result should have been negative, shouldn't it? Anyway, Jan will find it out soon.
Title: Re: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 16, 2016, 04:34:36 PM
Code: [Select]
** ALL DONE **
** The installable packages are in the debs folder **
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 16, 2016, 04:47:08 PM
Great, the build succeeded, but what did cmake report about libva support?
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 16, 2016, 04:57:53 PM
there plenty of references for cmake about libva, don't know what your looking for.
Here the logbuildCore for this build:
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 16, 2016, 05:12:49 PM
I meant the output you see in the terminal while building, not logbuildCore. But in this case even logbuildCore is helpful because it indicates in

Code: [Select]
Building CXX object ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o
cd /home/jan/avidemux2/buildCore/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src && /usr/bin/c++   -DADM_coreLibVA6_EXPORTS -DLIBVA_HEVC_DEC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fmessage-length=0 -O3 -DNDEBUG -fPIC -I/home/jan/avidemux2/buildCore/config -I/home/jan/avidemux2/avidemux_core/ADM_core/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioFilter/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioParser/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudio/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioDevice/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioEncoder/include -I/home/jan/avidemux2/avidemux_core/ADM_coreDemuxer/include -I/home/jan/avidemux2/avidemux_core/ADM_coreDemuxer/include/unix -I/home/jan/avidemux2/avidemux_core/ADM_coreDemuxerMpeg/include -I/home/jan/avidemux2/avidemux_core/ADM_coreImage/include -I/home/jan/avidemux2/avidemux_core/ADM_coreMuxer/include -I/home/jan/avidemux2/avidemux_core/ADM_coreScript/include -I/home/jan/avidemux2/avidemux_core/ADM_coreUI/include -I/home/jan/avidemux2/avidemux_core/ADM_coreUtils/include -I/home/jan/avidemux2/avidemux_core/ADM_coreVideoEncoder/include -I/home/jan/avidemux2/avidemux_core/ADM_coreVideoFilter/include -I/home/jan/avidemux2/avidemux_core/ADM_coreVideoCodec/include -I/home/jan/avidemux2/avidemux_core/ADM_coreImageLoader/include -I/home/jan/avidemux2/avidemux_core/ADM_coreJobs/include -I/home/jan/avidemux2/avidemux_core/ADM_coreSocket/include -I/home/jan/avidemux2/avidemux_core/ADM_coreAudioCodec/include -I/home/jan/avidemux2/buildCore/ffmpeg/source -I/home/jan/avidemux2/buildCore/ffmpeg/build -I/home/jan/avidemux2/avidemux_core/ADM_coreLibVA/include    -Werror=attributes -o CMakeFiles/ADM_coreLibVA6.dir/ADM_coreLibVA.cpp.o -c /home/jan/avidemux2/avidemux_core/ADM_coreVideoCodec/ADM_hwAccel/ADM_coreLibVA/src/ADM_coreLibVA.cpp

at line 1493 that cmake detects HEVC as supported (-DLIBVA_HEVC_DEC) despite it being unavailable on 14.04.5. Just for some reason the build still succeeds, but the detection seems to be incorrect.
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 16, 2016, 05:25:30 PM
perhaps while HEVC is hardware supported here (GTX 960) over vdpau API (VDPAU backend for VA-API - 0.7.3)?
Vainfo is not reporting HEVC:
Code: [Select]
vainfo
Code: [Select]
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.37 (libva 1.5.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.3
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG4Simple            : VAEntrypointVLD
      VAProfileMPEG4AdvancedSimple    : VAEntrypointVLD
      VAProfileH264Baseline           : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD

vdpau only gives decoder info? perhaps nvenc?

GLX:
Quote
GL_NVX_nvenc_interop
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 16, 2016, 05:38:07 PM
No, features supported via VDPAU are not related. CMake tries to compile libva_hevcdec.cpp from the cmake/cmake_compile_check folder. If it succeeds, the feature is supported. If it fails to compile, it is not. Copy this file e.g. to /tmp/, go the /tmp and run

Code: [Select]
gcc libva_hevcdec.cpp -o hevc-test
If you get a binary hevc-test and no error instead, the detection of HEVC support is not at fault.
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 17, 2016, 03:36:46 AM
Quote
gcc: error: libva_hevcdec.cpp: No such file or directory
gcc: fatal error: no input files
compilation terminated.
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 17, 2016, 07:16:03 AM
You've forgotten to change directory prior to executing the command.
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 17, 2016, 09:14:18 AM
Not forgotten to go into /tmp. Did not see: I needed to copy ~/avidemux2/cmake/cmake_compile_check/libva_hevcdec.cpp first into it.
Seems to be successful, did create this binary:
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 17, 2016, 09:32:43 AM
Thanks, this explains why HEVC gets detected as supported. Now it would be nice to find out, where it comes from.

Code: [Select]
grep -nR VAProfileHEVCMain /usr/include/va/
dpkg -S /usr/include/va/va.h
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 17, 2016, 10:32:56 AM
Code: [Select]
vainfo
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.37 (libva 1.5.0)

Okay, I think I can deduct the only plausible answer: you have libva and libva-dev 1.5.0-1 from Ubuntu 15.04 (Vivid Vervet) installed on 14.04.5. It provides VA-API version 0.37 and supports HEVC but not yet VP9.

The main thing is that it is now clear that the detection of libva features on behalf of Avidemux works fine.
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 17, 2016, 11:38:07 AM
Code: [Select]
grep -nR VAProfileHEVCMain /usr/include/va/
Quote
/usr/include/va/va.h:296:    VAProfileHEVCMain                   = 17,
/usr/include/va/va.h:297:    VAProfileHEVCMain10                 = 18
Code: [Select]
dpkg -S /usr/include/va/va.h
Quote
libva-dev:amd64: /usr/include/va/va.h


libva-dev
Video Acceleration (VA) API for Linux -- development files
Libraries - Development (universe)
1.5.0-1~xedgers~trusty
maintainer: pkg-multimedia-maintainers @ lists.alioth.debian.org
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 17, 2016, 11:46:41 AM
libva-dev
Video Acceleration (VA) API for Linux -- development files
Libraries - Development (universe)
1.5.0-1~xedgers~trusty
maintainer: pkg-multimedia-maintainers @ lists.alioth.debian.org


Thank you for the confirmation. This is not an official Ubuntu Trusty package, it originates from the xorg-edgers PPA (https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa/+packages?field.name_filter=&field.status_filter=published&field.series_filter=trusty) which backports (mostly just rebuilds on Ubuntu Trusty) more recent version from Debian.

Edit: This means that packages built on your 14.04.5 system but installed on a regular Ubuntu 14.04.5 (without working VDPAU decoding) would try to play HEVC content via libva and fail, instead of skipping straight to the software decoding via internal ffmpeg. I don't know if they fail gracefully, i.e. automatically falling back to the software decoding or hard, unable to decode HEVC unless hardware accel in Avidemux gets disabled.
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 18, 2016, 06:56:22 AM
As it stands now, it looks like hevc is now processed by the the CPU and not by hardware accelerated GPU. It take now minutes to encode 3sat test clip on 14.04.5 versus seconds on 16.04.1 accelerated GPU for the same test clip.
3sat test clip 69 MB download (https://www.dropbox.com/s/a8scxh0m134zxh0/720p4audioTracks3sat.ts?dl=0) @ dropbox
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 18, 2016, 07:05:31 AM
False alarm: avidemux did reset all settings (preferences). From time to time you need to check this, installing a newer avidemux does this.
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 18, 2016, 07:18:01 AM
14.04.5 x265 encoding seems slower:
Code: [Select]
x265 [info]: frame I:     14, Avg QP:20,27  kb/s: 18312,09
x265 [info]: frame P:    913, Avg QP:24,08  kb/s: 4086,61
x265 [info]: frame B:    965, Avg QP:29,11  kb/s: 279,65 
x265 [info]: Weighted P-Frames: Y:0,2% UV:0,1%
x265 [info]: Weighted B-Frames: Y:0,0% UV:0,0%
x265 [info]: consecutive B-frames: 53,1% 13,9% 8,8% 24,2%

encoded 1892 frames in 70,51s (26,83 fps), 2250,16 kb/s, Avg QP:26,62

more detailed info from terminal output attached:
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: Jan Gruuthuse on October 18, 2016, 07:33:08 AM
16.04.1 x265
Code: [Select]
x265 [info]: frame I:     14, Avg QP:20,25  kb/s: 18283,77
x265 [info]: frame P:    913, Avg QP:24,09  kb/s: 4078,13
x265 [info]: frame B:    965, Avg QP:29,10  kb/s: 277,56 
x265 [info]: Weighted P-Frames: Y:0,2% UV:0,1%
x265 [info]: Weighted B-Frames: Y:0,0% UV:0,0%
x265 [info]: consecutive B-frames: 53,1% 13,9% 8,8% 24,2%

encoded 1892 frames in 64,54s (29,32 fps), 2244,79 kb/s, Avg QP:26,62
more detailed info from terminal output attached:
Title: Re: Fixed: 14.04.5 Failed at make, result in /tmp/logbuildCore**
Post by: eumagga0x2a on October 18, 2016, 06:42:15 PM
False alarm: avidemux did reset all settings (preferences).

This happend probably due to  [UI] Add a preference to select between reload default encoder setting or keep using current (euma) (https://github.com/mean00/avidemux2/commit/3d6d94f59304be8608edcac79de952a3645169b8). The way how Avidemux currently reacts encounting a new setting is surely a bug, maybe it will be fixed at some time in the future.

Why are you testing HEVC encoding? The libva features which were initially misdetected are decoding only.

To check if building Avidemux on 14.04.5 with a less outdated and thus HEVC capable libva than available via official repositories poses a problem for users of a regular 14.04.5 installation, one should use a target PC with a pretty recent Intel CPU but without a dedicated graphics card, running Ubuntu 14.04.5 without any PPAs or foreign packages apart from Avidemux added and try to decode (to play or to re-encode) a HEVC video in Avidemux.