Jump to content

After upgraded to 3.5.1, VAAPI is not working


viktor80

Recommended Posts

viktor80

Hi,

 

I used VAAPI hardware accelerated transcoding without any issue on emby server 3.2.x.

I upgraded to 3.5.1 and there is no VAAPI, only cpu transcoding. (cpu cores are on 100% and quality is bad on the client)

 

I checked the log and I don't see -vaapi_device /dev/dri/renderD128 parameter.

Is there any change in FFMpeg 4 parameters or should I do some additional configuration?

 

Is it possible somehow to modify the ffmpeg parameters which the emby server generate?

 

I use Debian sid.

 

Thanks your help in advance.

/opt/emby-server/bin/ffmpeg -ss 00:17:54.000 -i file:"/pool/some_movie.avi" -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 libx264 -vf "scale=trunc(min(max(iw\,ih*dar)\,1280)/2)*2:trunc(ow/dar/2)*2" -pix_fmt yuv420p -prese
t veryfast -crf 23 -maxrate 3648738 -bufsize 7297476 -profile:v high -level 4.1 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=n
one -force_key_frames "expr:if(isnan(prev_forced_t),eq(t,t),gte(t,prev_forced_t+3))" -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 2 -ab 384000 -af "volume=
2" -f segment -max_delay 5000000 -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 -start_at_zero -segment_time 3 -segment_time_delta -1074 -individual_head
er_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 358 -segment_list "/var/lib/emby/transcoding-temp/7b387cfdadadc4cd0cd3407b11377b5f.m3u
8" -y "/var/lib/emby/transcoding-temp/7b387cfdadadc4cd0cd3407b11377b5f%d.ts"                                                                                            
                                                                                                                                                                        
ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers                                                                                                      
  built with gcc 6.3.0 (crosstool-NG crosstool-ng-1.23.0)                                                                                                               
  configuration: --enable-cross-compile --cross-prefix=x86_64-pc-linux-gnu- --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --arch=x86_64 --prefix=/home/emby
builder/Buildbot-master/x64/ffmpeg-x64/staging --pkg-config=pkg-config --disable-doc --disable-ffplay --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 --enab
le-libx264 --enable-libzvbi --enable-version3 --extra-libs='-ldl -lexpat -lfreetype -lfribidi -lfontconfig -liconv -lpng -luuid -lz -lvorbis -logg -lnettle -lhogweed -l
gmp -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 -lgssap
i_krb5 -llibcli-lsa3-samba4 -llibsmb-samba4 -linterfaces-samba4 -liov-buf-samba4 -lk5crypto -lkrb5 -lkrb5samba-samba4 -lkrb5support -lldb -lldbsamba-samba4 -lmessages-d
gm-samba4 -lmessages-util-samba4 -lmsghdr-samba4 -lmsrpc3-samba4 -lndr -lndr-krb5pac -lndr-nbt -lndr-samba-samba4 -lndr-standard -lreplace-samba4 -lsamba-cluster-suppor
t-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 -lsoc
ket-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 --enable-libsmbclient --enable
-cuda --enable-cuvid --enable-nvenc --enable-vaapi                                                                                                                      
<?xml version="1.0"?>                                                                                                                                                   
<EncodingOptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">                                                    
  <EncodingThreadCount>-1</EncodingThreadCount>                                                                                                                         
  <TranscodingTempPath />                                                                                                                                               
  <DownMixAudioBoost>2</DownMixAudioBoost>                                                                                                                              
  <EnableThrottling>true</EnableThrottling>                                                                                                                             
  <ThrottleDelaySeconds>180</ThrottleDelaySeconds>                                                                                                                      
  <HardwareAccelerationType>vaapi</HardwareAccelerationType>                                                                                                            
  <VaapiDevice>/dev/dri/renderD128</VaapiDevice>                                                                                                                        
  <H264Crf>23</H264Crf>                                                                                                                                                 
  <H264Preset />                                                                                                                                                        
  <EnableHardwareEncoding>true</EnableHardwareEncoding>                                                                                                                 
  <EnableSubtitleExtraction>true</EnableSubtitleExtraction>                                                                                                             
  <HardwareDecodingCodecs />                                                                                                                                            
</EncodingOptions>                                                                                                                                                      
/# vainfo                                                                                                                                                      
error: can't connect to X server!                                                                                                                                       
libva info: VA-API version 1.2.0                                                                                                                                        
libva info: va_getDriverName() returns 0                                                                                                                                
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so                                                                                              
libva info: Found init function __vaDriverInit_1_2                                                                                                                      
libva info: va_openDriver() returns 0                                                                                                                                   
vainfo: VA-API version: 1.2 (libva 2.1.0)                                                                                                                               
vainfo: Driver version: Intel i965 driver for Intel(R) Broxton - 2.2.0                                                                                                  
vainfo: Supported profile and entrypoints                                                                                                                               
      VAProfileMPEG2Simple            : VAEntrypointVLD                                                                                                                 
      VAProfileMPEG2Main              : VAEntrypointVLD                                                                                                                 
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD                                                                                                                 
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice                                                                                                            
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP                                                                                                          
      VAProfileH264Main               : VAEntrypointVLD                                                                                                                 
      VAProfileH264Main               : VAEntrypointEncSlice                                                                                                            
      VAProfileH264Main               : VAEntrypointEncSliceLP                                                                                                          
      VAProfileH264High               : VAEntrypointVLD                                                                                                                 
      VAProfileH264High               : VAEntrypointEncSlice                                                                                                            
      VAProfileH264High               : VAEntrypointEncSliceLP                                                                                                          
      VAProfileH264MultiviewHigh      : VAEntrypointVLD                                                                                                                 
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice                                                                                                            
      VAProfileH264StereoHigh         : VAEntrypointVLD                                                                                                                 
      VAProfileH264StereoHigh         : VAEntrypointEncSlice                                                                                                            
      VAProfileVC1Simple              : VAEntrypointVLD                                                                                                                 
      VAProfileVC1Main                : VAEntrypointVLD                                                                                                                 
      VAProfileVC1Advanced            : VAEntrypointVLD                                                                                                                 
      VAProfileNone                   : VAEntrypointVideoProc                                                                                                           
      VAProfileJPEGBaseline           : VAEntrypointVLD                                                                                                                 
      VAProfileJPEGBaseline           : VAEntrypointEncPicture                                                                                                          
      VAProfileVP8Version0_3          : VAEntrypointVLD                                                                                                                 
      VAProfileVP8Version0_3          : VAEntrypointEncSlice                                                                                                            
      VAProfileHEVCMain               : VAEntrypointVLD                                                                                                                 
      VAProfileHEVCMain               : VAEntrypointEncSlice                                                                                                            
      VAProfileHEVCMain10             : VAEntrypointVLD                                                                                                                 
      VAProfileVP9Profile0            : VAEntrypointVLD                                                                                                                 
# ls -al /dev/dri                                                                                                                            
total 0                                                                                                                                                                 
drwxr-xr-x  3 root root       100 júl   28 06:28 .                                                                                                                      
drwxr-xr-x 18 root root      3060 júl   28 06:28 ..                                                                                                                     
drwxr-xr-x  2 root root        80 júl   28 06:28 by-path                                                                                                                
crw-rw----  1 root video 226,   0 júl   28 06:28 card0                                                                                                                  
crw-rw----  1 root video 226, 128 júl   28 06:28 renderD128                                                                                                             

emby user is member of video group

video:x:44:emby

 

Link to comment
Share on other sites

Hi, the input file here is mpeg4, which is not supported by vaapi. 

 

If you try an input file where the video is h264, then it should work.

Link to comment
Share on other sites

viktor80

Thanks, it's working.

I didn't notice that difference.

Is it possible to use vaapi in emby if the source is mpeg4, but the output is h264?

As I know ffmpeg supports sw decode, hw encode transcoding.

Edited by viktor80
Link to comment
Share on other sites

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