Jump to content

Hardware encoding on TVS-663


Recommended Posts

bbfugitive
Posted

This NAS model includes the SOC AMD GX-424CC with Radeon R5E Graphics.  I am running the new Emby release  emby-server-qnap_3.5.2.0_x86_64.qpkg.    I attempted to enable hardware transcoding but it does not appear to be working.  Does anyone know if I can get any hardware assisted transcoding from this setup?  If so, what settings or dependencies?  Thanks!

Posted

Hi, have you tried VAAPI?

bbfugitive
Posted

VAAPI doesnt work.  Here is part of the ffmpeg log with errors.

 

ffmpeg version 4.0.1 Copyright © 2000-2018 the FFmpeg developers
libavutil 56. 14.100 / 56. 14.100
built with gcc 6.3.0 (crosstool-NG crosstool-ng-1.23.0)
libavcodec 58. 18.100 / 58. 18.100
configuration: --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --arch=x86_64 --prefix=/home/embybuilder/Buildbot/x64/ffmpeg-x64/staging --pkg-config=pkg-config --disable-doc --disable-ffplay --disable-vdpau --disable-xlib --enable-fontconfig --enable-gnutls --enable-gpl --enable-iconv --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libwebp --enable-libx264 --enable-libzvbi --enable-version3 --enable-libsmbclient --enable-cuda --enable-cuvid --enable-nvenc --enable-vaapi --enable-cross-compile --cross-prefix=x86_64-pc-linux-gnu- --extra-libs='-ldl -lexpat -lfreetype -lfribidi -lfontconfig -liconv -lpng -luuid -lz -lvorbis -logg -lnettle -lhogweed -lgmp -laddns-samba4 -lasn1util-samba4 -lauthkrb5-samba4 -lCHARSET3-samba4 -lcliauth-samba4 -lcli-cldap-samba4 -lcli-ldap-common-samba4 -lcli-nbt-samba4 -lcli-smb-common-samba4 -lcom_err -lcommon-auth-samba4 -ldbwrap-samba4 -ldcerpc-binding -ldcerpc-samba-samba4 -lflag-mapping-samba4 -lgenrand-samba4 -lgensec-samba4 -lgse-samba4 -lgssapi_krb5 -llibcli-lsa3-samba4 -llibsmb-samba4 -linterfaces-samba4 -liov-buf-samba4 -lk5crypto -lkrb5 -lkrb5samba-samba4 -lkrb5support -lldb -lldbsamba-samba4 -lmessages-dgm-samba4 -lmessages-util-samba4 -lmsghdr-samba4 -lmsrpc3-samba4 -lndr -lndr-krb5pac -lndr-nbt -lndr-samba-samba4 -lndr-standard -lreplace-samba4 -lsamba-cluster-support-samba4 -lsamba-credentials -lsamba-debug-samba4 -lsamba-errors -lsamba-hostconfig -lsamba-modules-samba4 -lsamba-security-samba4 -lsamba-sockets-samba4 -lsamba-util -lsamba3-util-samba4 -lsamdb -lsamdb-common-samba4 -lsecrets3-samba4 -lserver-id-db-samba4 -lserver-role-samba4 -lsmbconf -lsmbd-shim-samba4 -lsmb-transport-samba4 -lsocket-blocking-samba4 -lsys-rw-samba4 -ltalloc -ltalloc-report-samba4 -ltdb -ltdb-wrap-samba4 -ltevent -ltevent-util -ltime-basic-samba4 -lutil-cmdline-samba4 -lutil-reg-samba4 -lutil-setid-samba4 -lutil-tdb-samba4 -lwbclient -lwinbind-client-samba4 -ldrm' --target-os=linux --enable-shared --disable-static
libavformat 58. 12.100 / 58. 12.100
libavutil 56. 14.100 / 56. 14.100
libavdevice 58. 3.100 / 58. 3.100
libavcodec 58. 18.100 / 58. 18.100
libavfilter 7. 16.100 / 7. 16.100
libavformat 58. 12.100 / 58. 12.100
libswscale 5. 1.100 / 5. 1.100
libavdevice 58. 3.100 / 58. 3.100
libswresample 3. 1.100 / 3. 1.100
libavfilter 7. 16.100 / 7. 16.100
libpostproc 55. 1.100 / 55. 1.100
libswscale 5. 1.100 / 5. 1.100
radeonsi: driver missing
libswresample 3. 1.100 / 3. 1.100
[AVHWDeviceContext @ 0x182ea00] libva: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/lib/dri/r600_drv_video.so init failed
libpostproc 55. 1.100 / 55. 1.100
[AVHWDeviceContext @ 0x182ea00] Failed to initialise VAAPI connection: 2 (resource allocation failed).
Input #0, matroska,webm, from 'file:/share/Media/Movies/Adult/TAU.2018.1080p.NF.WEBRip.DD5.1.x264-NTb/TAU.2018.1080p.NF.WEB-DL.DD5.1.x264-NTb.mkv':
Device creation failed: -5.
Metadata:
Failed to set value '/dev/dri/renderD128' for option 'vaapi_device': Input/output error
encoder : libebml v1.3.5 + libmatroska v1.4.8
Error parsing global options: Input/output error
creation_time : 2018-06-29T07:02:04.000000Z
Duration: 01:37:40.64, start: 0.000000, bitrate: 3847 kb/s
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1920x1080 [sAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
BPS-eng : 3460165
DURATION-eng : 01:37:40.230000000
NUMBER_OF_FRAMES-eng: 140505
NUMBER_OF_BYTES-eng: 2534670513
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-06-29 07:02:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
Metadata:
title : English
BPS-eng : 384000
DURATION-eng : 01:37:40.640000000
NUMBER_OF_FRAMES-eng: 183145
NUMBER_OF_BYTES-eng: 281310720
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-06-29 07:02:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Subtitle: subrip (default)
Metadata:
title : SDH
BPS-eng : 41
DURATION-eng : 01:29:57.559000000
NUMBER_OF_FRAMES-eng: 963
NUMBER_OF_BYTES-eng: 27872
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-06-29 07:02:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

Posted

Can you please attach the complete ffmpeg log? Thanks.

bbfugitive
Posted

Can you please attach the complete ffmpeg log? Thanks.

Here you go, Luke.

 

I read in a thread somewhere that a NAS had to have the HDMI connected to a monitor or some type of loopback cable or the hardware will not be available.  Maybe this is happening here.   I will try to find an HDMI monitor tonight to test.

 

Thanks!

Posted

Thanks for the info.

bbfugitive
Posted

I hooked up an hdmi monitor to the NAS, but I don't thing vaapi is working for me.  Here is the log file

ff-mpeglog0814.txt

Posted
[AVHWDeviceContext @ 0xa8db40] Failed to initialise VAAPI connection: 2 (resource allocation failed).

Did you add the emby user to the video group?

bbfugitive
Posted (edited)
[AVHWDeviceContext @ 0xa8db40] Failed to initialise VAAPI connection: 2 (resource allocation failed).

Did you add the emby user to the video group?

 

I don't have an emby user in my qnap.  Is my installation busted?

Edited by bbfugitive
PenkethBoy
Posted

no - i dont have an emby user either and my NAS works fine with Emby

 

Some media types are not supported by VAapi so some files cannot take advantage of it

 

Have you tried a few different files to see if some work and some dont - which is what i see

bbfugitive
Posted

no - i dont have an emby user either and my NAS works fine with Emby

 

Some media types are not supported by VAapi so some files cannot take advantage of it

 

Have you tried a few different files to see if some work and some dont - which is what i see

I have tried many files of all types.  You say tha VA Api is working for you on your Celeron based NAS,

Do you ever see these errors in your logs?

 

libswresample 3. 1.100 / 3. 1.100

radeonsi: driver missing

libpostproc 55. 1.100 / 55. 1.100

[AVHWDeviceContext @ 0x13a5980] libva: /share/CACHEDEV1_DATA/.qpkg/EmbyServer/lib/dri/r600_drv_video.so init failed

Input #0, matroska,webm, from 'file:/share/CACHEDEV1_DATA/Media/Television/Adult/Black Sails/Black Sails Season 03/Black Sails.S03E04.XXII.mkv':

[AVHWDeviceContext @ 0x13a5980] Failed to initialise VAAPI connection: 2 (resource allocation failed).

Metadata:

Device creation failed: -5.

title : Black.Sails.S03E04.720p.x265.

Failed to set value '/dev/dri/renderD128' for option 'vaapi_device': Input/output error

PenkethBoy
Posted

@@Luke - would an amd cpu have the same vaapi render node as an intel?

bbfugitive
Posted

This NAS model includes the SOC AMD GX-424CC with Radeon R5E Graphics.  I am running the new Emby release  emby-server-qnap_3.5.2.0_x86_64.qpkg.    I attempted to enable hardware transcoding but it does not appear to be working.  Does anyone know if I can get any hardware assisted transcoding from this setup?  If so, what settings or dependencies?  Thanks!

 

Bump!

 

Does anyone have vaapi working with a TVS-663 or other similar AMD SOC based model?  I'm trying to determine if the ffmpeg included with EMBY 3.5.2.0 supports the SOC in my NAS.

Posted

Hi, you will get a response. Thank you for your patience.

  • Like 1
bbfugitive
Posted

Hi, you will get a response. Thank you for your patience.

Thanks!  If you need any log or info from the shell, I will try to assist.  

Posted (edited)

Our package only comes with the r600 driver for older amd gpus. Anything newer like radeonsi needs llvm to build and run, you can thank mesa for that, so we can't ship them unfortunately.

Edited by alucryd
bbfugitive
Posted

Our package only comes with the r600 driver for older amd gpus. Anything newer like radeonsi needs llvm to build and run, you can thank mesa for that, so we can't ship them unfortunately.

@@alucryd @@Luke Thanks for the update.

 

Sent from my LEX727 using Tapatalk

  • 2 weeks later...
Posted

For Radeon hardware transcoding, and since Emby uses ffmpeg, maybe a better approach would be to use AMD AMF hardware acceleration that is comming to ffmpeg (I believe it's included in the Windows build already).

 

I'm not sure what the shared library dependencies are but the ffmpeg option handling should be very similar to QSV which Emby already uses.

I also believe AMF support should allow use of older Radeon hardware based on what it is capable of in hardware.

 

This approach might be a lot simpler but might still depend mesa with llvm although it might actually work.

I read somewhere that not all the needed header files are distributed with the ffmpeg source but in time I expect that will be sorted out.

 

Do you think this would be a good way to go Luke, worth investigation at least?

 

Ian

Posted

Yes that is possible for the future. Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...