Project

General

Profile

How i can enable VAAPI

Added by hacksat hacksat over 5 years ago

Hi, I installed tvheadend on my home server, everything works as far as CPU transcoding, now I need to enable the VAAPI function of my internal processor's GPU.

I sent the command
./configure --enable vaapi
but not solve the problem

in website tvheadend can see the profile
screenshot: http://prntscr.com/onyckc

could you give me a hand to understand how to enable this feature?
thanks


Replies (28)

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

hacksat hacksat wrote:

./configure --enable vaapi

need to be

./configure --enable-vaapi

for more information read
https://tvheadend.org/boards/4/topics/24116

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

hi, thanks for the reply, I performed all the steps of the guide. I missed a library now I installed everything and I have no more errors during the configuration, i sent the command

 ./configure --enable-vaapi

have this

root@tvh1:~/tvheadend# ./configure --enable-vaapi
Checking support/features
  checking for cc execinfo.h ...                    ok
  checking for cc -mmmx ...                         ok
  checking for cc -msse2 ...                        ok
  checking for cc -Wunused-result ...               ok
  checking for cc -fstack-protector ...             ok
  checking for cc -fstack-protector-strong ...      ok
  checking for cc -fstack-check ...                 ok
  checking for cc -fPIE ...                         ok
  checking for cc strlcat ...                       fail
  checking for cc strlcpy ...                       fail
  checking for cc fdatasync ...                     ok
  checking for cc getloadavg ...                    ok
  checking for cc atomic32 ...                      ok
  checking for cc atomic64 ...                      ok
  checking for cc atomic_time_t ...                 ok
  checking for cc atomic_ptr ...                    ok
  checking for cc bitops64 ...                      ok
  checking for cc lockowner ...                     ok
  checking for cc qsort_r ...                       ok
  checking for cc stime ...                         ok
  checking for cc gmtoff ...                        ok
  checking for cc recvmmsg ...                      ok
  checking for cc sendmmsg ...                      ok
  checking for cc libiconv ...                      fail
    ^ using build-in glibc iconv routines
  checking for cc ifnames ...                       ok
  checking for cc cclang_threadsan ...              fail
  checking for py module gzip ...                   ok
  checking for pkg-config ...                       ok
  checking for xgettext ...                         ok
  checking for msgmerge ...                         ok
  checking for gzip ...                             ok
  checking for bzip2 ...                            ok
  checking for pkg openssl  ...                     ok (detected 1.1.1)
  checking for cc linux/dvb/version.h ...           ok
  checking for pkg zlib  ...                        ok (detected 1.2.11)
  checking for pkg libpcre2-8  ...                  fail (detected <none>)
  checking for pkg libpcre  ...                     fail (detected <none>)
  checking for pkg liburiparser  ...                ok (detected 0.8.4)
  checking for pkg avahi-client  ...                ok (detected 0.7)
  checking for cmake ...                            ok
  checking for cc -lstdc++ ...                      ok
  checking for pkg libva >=0.38.0 ...               ok (detected 1.1.0)
  checking for pkg libva-x11 >=0.38.0 ...           ok (detected 1.1.0)
  checking for pkg libva-drm >=0.38.0 ...           ok (detected 1.1.0)
  checking for cc sys/inotify.h ...                 ok
  checking for cc inotify_init1 ...                 ok
  checking for cc dvbcsa/dvbcsa.h ...               ok
  checking for cc -ldvbcsa ...                      ok
  fetching dvb-scan files ...                       ok
  checking for cc epoll_create1 ...                 ok
  checking for pkg dbus-1  ...                      ok (detected 1.12.2)

Compiler:
  Using C compiler:                        cc
  Using LD flags:                           -ldvbcsa
  Build for arch:                          x86_64

Binaries:
  Using PYTHON:                            python
  Using GZIP:                              gzip
  Using BZIP2:                             bzip2

Options:
  pie                                      yes
  ccdebug                                  no
  cardclient                               yes
  cwc                                      yes
  cccam                                    yes
  capmt                                    yes
  constcw                                  yes
  linuxdvb                                 yes
  satip_server                             yes
  satip_client                             yes
  hdhomerun_client                         yes
  hdhomerun_static                         yes
  iptv                                     yes
  tsfile                                   yes
  dvbscan                                  yes
  timeshift                                yes
  trace                                    yes
  avahi                                    yes
  zlib                                     yes
  libav                                    yes
  ffmpeg_static                            yes
  libx264                                  yes
  libx264_static                           yes
  libx265                                  yes
  libx265_static                           yes
  libvpx                                   yes
  libvpx_static                            yes
  libtheora                                yes
  libtheora_static                         yes
  libvorbis                                yes
  libvorbis_static                         yes
  libfdkaac                                no
  libfdkaac_static                         no
  libopus                                  yes
  libopus_static                           yes
  nvenc                                    no
  vaapi                                    yes
  mmal                                     no
  omx                                      no
  inotify                                  yes
  epoll                                    yes
  pcre                                     no
  pcre2                                    no
  uriparser                                yes
  ccache                                   no
  tvhcsa                                   yes
  bundle                                   no
  pngquant                                 no
  kqueue                                   no
  dbus_1                                   yes
  android                                  no
  gtimer_check                             no
  slow_memoryinfo                          no
  libsystemd_daemon                        no
  pcloud_cache                             yes
  ddci                                     yes
  cclang_threadsan                         no
  gperftools                               no
  execinfo                                 yes
  mmx                                      yes
  sse2                                     yes
  W_unused_result                          yes
  f_stack_protector                        yes
  f_stack_protector_strong                 yes
  f_stack_check                            yes
  f_PIE                                    yes
  fdatasync                                yes
  getloadavg                               yes
  atomic32                                 yes
  atomic64                                 yes
  atomic_time_t                            yes
  atomic_ptr                               yes
  bitops64                                 yes
  lockowner                                yes
  qsort_r                                  yes
  stime                                    yes
  gmtoff                                   yes
  recvmmsg                                 yes
  sendmmsg                                 yes
  ifnames                                  yes
  py_gzip                                  yes
  bin_pkg_config                           yes
  bin_xgettext                             yes
  bin_msgmerge                             yes
  bin_gzip                                 yes
  bin_bzip2                                yes
  ssl                                      yes
  linuxdvbapi                              yes
  linuxdvb_ca                              yes
  upnp                                     yes
  bin_cmake                                yes
  stdcpp                                   yes
  libogg_static                            yes
  hwaccels                                 yes
  inotify_h                                yes
  inotify_init1                            yes
  dvbcsa                                   yes
  epoll_create1                            yes
  mpegts                                   yes
  mpegts_dvb                               yes

Packages:
  openssl                                  1.1.1
  zlib                                     1.2.11
  liburiparser                             0.8.4
  avahi-client                             0.7
  libva                                    1.1.0
  libva-x11                                1.1.0
  libva-drm                                1.1.0
  dbus-1                                   1.12.2

Installation paths:
  Prefix:                                  /usr/local
  Binaries:                                ${prefix}/bin
  Libraries:                               ${prefix}/lib
  Data files:                              ${prefix}/share
  Man pages:                               ${datadir}/man

Final Binary:
  /root/tvheadend/build.linux/tvheadend

Tvheadend Data Directory:
  /usr/local/share/tvheadend

I also tried to restart tvheadend with the command

sudo service tvheadend restart

but in the profile codec menu there is no vaapi option
see screenshot: http://prntscr.com/oo5534

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

Use build script and post build log
libpcre is not installed

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

hi i have libpcre
libpcre3 is already the newest version (2:8.39-9).
libpcre3-dev is already the newest version (2:8.39-9).

how i can use build script and see the log?
thanks

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

checking for pkg libpcre2-8  ...                  fail (detected <none>)
checking for pkg libpcre  ...                     fail (detected <none>)

so not instaled ;)

https://tvheadend.org/boards/4/topics/24116#Automated-build-script

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

the guide I followed it all step by step, but in the end I don't see h264 vaapi in the profiles

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

in my configuration it says

checking for pkg libpcre2-8 ... ok (detected 10.31)

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

post resulting log file build.log

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

where is this file? build.log

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

where script is run

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

ok i enable debuggin have only this in log

2019-08-05 14:39:52.434 [  ERROR]:spawn: frame=176249 fps= 25 q=17.0 size= 1994255kB time=01:57:36.08 bitrate=2315.3kbits/s speed=   1x    
2019-08-05 14:39:52.558 [  ERROR]:spawn: frame=176298 fps= 25 q=21.0 size= 1965941kB time=01:57:34.96 bitrate=2282.8kbits/s speed=   1x    

I don't think it's useful :(

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

You are doing something else.

Go to About in TVH UI press toggle details
and post result

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

have this

Configure arguments:
  --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libexecdir=${prefix}/lib/tvheadend --disable-maintainer-mode --disable-dependency-tracking --enable-ccache --enable-ffmpeg_static --enable-hdhomerun_static --arch=x86_64 --jobs=9

Compiler:
  Using C compiler:                        ccache cc
  Using LD flags:                           -ldvbcsa
  Build for arch:                          x86_64

Binaries:
  Using PYTHON:                            python
  Using GZIP:                              gzip
  Using BZIP2:                             bzip2

Options:
  pie                                      yes
  ccdebug                                  no
  cardclient                               yes
  cwc                                      yes
  cccam                                    yes
  capmt                                    yes
  constcw                                  yes
  linuxdvb                                 yes
  satip_server                             yes
  satip_client                             yes
  hdhomerun_client                         yes
  hdhomerun_static                         yes
  iptv                                     yes
  tsfile                                   yes
  dvbscan                                  yes
  timeshift                                yes
  trace                                    yes
  avahi                                    yes
  zlib                                     yes
  libav                                    yes
  ffmpeg_static                            yes
  libx264                                  yes
  libx264_static                           yes
  libx265                                  yes
  libx265_static                           yes
  libvpx                                   yes
  libvpx_static                            yes
  libtheora                                yes
  libtheora_static                         yes
  libvorbis                                yes
  libvorbis_static                         yes
  libfdkaac                                no
  libfdkaac_static                         no
  libopus                                  yes
  libopus_static                           yes
  nvenc                                    no
  vaapi                                    no
  mmal                                     no
  omx                                      no
  inotify                                  yes
  epoll                                    yes
  pcre                                     no
  pcre2                                    yes
  uriparser                                yes
  ccache                                   yes
  tvhcsa                                   yes
  bundle                                   no
  pngquant                                 no
  kqueue                                   no
  dbus_1                                   yes
  android                                  no
  gtimer_check                             no
  slow_memoryinfo                          no
  libsystemd_daemon                        no
  pcloud_cache                             yes
  ddci                                     yes
  cclang_threadsan                         no
  gperftools                               no
  execinfo                                 yes
  mmx                                      yes
  sse2                                     yes
  W_unused_result                          yes
  f_stack_protector                        yes
  f_stack_protector_strong                 yes
  f_stack_check                            yes
  f_PIE                                    yes
  fdatasync                                yes
  getloadavg                               yes
  atomic32                                 yes
  atomic64                                 yes
  atomic_time_t                            yes
  atomic_ptr                               yes
  bitops64                                 yes
  lockowner                                yes
  qsort_r                                  yes
  stime                                    yes
  gmtoff                                   yes
  recvmmsg                                 yes
  sendmmsg                                 yes
  ifnames                                  yes
  py_gzip                                  yes
  bin_pkg_config                           yes
  bin_xgettext                             yes
  bin_msgmerge                             yes
  bin_gzip                                 yes
  bin_bzip2                                yes
  ssl                                      yes
  linuxdvbapi                              yes
  linuxdvb_ca                              yes
  upnp                                     yes
  bin_cmake                                yes
  stdcpp                                   yes
  libogg_static                            yes
  inotify_h                                yes
  inotify_init1                            yes
  dvbcsa                                   yes
  epoll_create1                            yes
  mpegts                                   yes
  mpegts_dvb                               yes

Packages:
  openssl                                  1.1.1
  zlib                                     1.2.11
  libpcre2-8                               10.31
  liburiparser                             0.8.4
  avahi-client                             0.7
  dbus-1                                   1.12.2

Installation paths:
  Prefix:                                  /usr
  Binaries:                                ${prefix}/bin
  Libraries:                               ${prefix}/lib
  Data files:                              ${prefix}/share
  Man pages:                               /usr/share/man

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

vaapi                                    no

A'm not sure what exactly you do, bit 100% not fallowing steps

Are you build DEB installers?
Are you install them?

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

yes sure i install all on this guide
https://tvheadend.org/boards/4/topics/24116

but when sent the command

./configure --enable-vaapi

not enable vvapi

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

No you not.
Use script.

#!/bin/bash

BASE=$(dirname "$0")
(
  if [ -d "$BASE/tvheadend" ]; then
    cd "$BASE/tvheadend" 
    git pull
  else
    cd "$BASE" 
    git clone https://github.com/tvheadend/tvheadend.git tvheadend --depth=1
    cd "$BASE/tvheadend" 
  fi
  time AUTOBUILD_CONFIGURE_EXTRA="–-disable-bintray_cache --enable-vaapi --disable-hdhomerun_client --disable-hdhomerun_static " ./Autobuild.sh -j$(nproc) # edit only betwin "quotation marks" 
) | tee "$BASE/build.log" 

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

ok i created the script in / tvheadend and sent the command ./script.sh
when you finish after the compilation, he tells me

 vaapi                                    yes

but when i go in menu, About > Toggle details

vaapi                                    no

and i can't create profile vaapi
something wrong yet?

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

but I would not like that it is not compatible with ubuntu 18 and we are losing only time, or should it also work with ubuntu 18?

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

It work but not in your hands.
Do you install generated packages ?

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

I installed everything there was to install, I executed the command as described above, I did all the recommended procedures, but unfortunately still nothing, how can I see if I am missing something?

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

Post build.log with is in location where you run script.sh

also post result of

uname -a
lsb_release -a

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

command uname -a:

Linux tvh1 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

this is lsb_release -a:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

build.log (373 KB) build.log

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

could my ubuntu version not work?

RE: How i can enable VAAPI - Added by saen acro over 5 years ago

is version in TVH is tvheadend_0.0.0-unknown_amd64.deb

RE: How i can enable VAAPI - Added by hacksat hacksat over 5 years ago

sorry I didn't understand, what do you mean?

(1-25/28)