Jump to content


Photo

trouble with intel hwacc vaapi

vaapi hardware intel arch

  • Please log in to reply
6 replies to this topic

#1 derdigge1982 OFFLINE  

derdigge1982

    Newbie

  • Members
  • 8 posts
  • Local time: 08:05 PM

Posted 29 July 2017 - 06:55 PM

Dear Community.

 

I am quiet new to emby. Until now i like it very much, it is clean and simple. On my archlinux box i am playing around with it. During that time i tried the hw acceleration of my i7-3770, which supports h264 accel through vaapi within ffmpeg. Running vaapi as root just works fine. Emby fails.

 

Hardware

 Intel i7 3770
 00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)        Subsystem: ASUSTeK Computer Inc. P8 series motherboard
        Kernel driver in use: i915
        Kernel modules: i915
 

emby ffmpeg log:


https://ip:port/emby/videos/2867cee654bf0d0ca3dc637f1bbfde0b/hls1/main/0.ts?DeviceId=ab07cd0fea138a788857db2bddfb59f6aef25385&MediaSourceId=2867cee654bf0d0ca3dc637f1bbfde0b&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=1&VideoBitrate=1616000&AudioBitrate=384000&Level=51&Profile=high&PlaySessionId=140d0cd68d4143569460200aff7e460a&api_key=754de6dbb1fa4a8782f4805076e40931&CopyTimestamps=false&TranscodingMaxAudioChannels=6&EnableSubtitlesInManifest=false&Tag=8f6ad6ae07ff85e31aec350a5a796098&RequireAvc=true&RequireNonAnamorphic=false&DeInterlace=true&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&TranscodeReasons=AudioCodecNotSupported,ContainerBitrateExceedsLimit


{"Protocol":"File","Id":"2867cee654bf0d0ca3dc637f1bbfde0b","Path":"/demo.mkv","Type":"Default","Container":"mkv","Name":"720P/H264/AC3","IsRemote":false,"ETag":"8f6ad6ae07ff85e31aec350a5a796098","RunTimeTicks":24835198976,"ReadAtNativeFramerate":false,"IgnoreDts":false,"IgnoreIndex":false,"GenPtsInput":false,"SupportsTranscoding":true,"SupportsDirectStream":true,"SupportsDirectPlay":true,"IsInfiniteStream":false,"RequiresOpening":false,"RequiresClosing":false,"SupportsProbing":true,"RequiresLooping":false,"VideoType":"VideoFile","MediaStreams":[{"Codec":"h264","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1/50","Title":"demo","DisplayTitle":"demo","NalLengthSize":"4","IsInterlaced":false,"IsAVC":true,"BitRate":7602939,"BitDepth":8,"RefFrames":1,"IsDefault":true,"IsForced":false,"Height":720,"Width":1280,"AverageFrameRate":25,"RealFrameRate":25,"Profile":"High","Type":"Video","AspectRatio":"16:9","Index":0,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"PixelFormat":"yuv420p","Level":41,"IsAnamorphic":false},{"Codec":"ac3","Language":"ger","TimeBase":"1/1000","CodecTimeBase":"1/48000","Title":"AC3 5.1 @ 640 kbps","DisplayTitle":"Ger AC3 5.1 @ 640 kbps","IsInterlaced":false,"ChannelLayout":"5.1","BitRate":640000,"Channels":6,"SampleRate":48000,"IsDefault":true,"IsForced":false,"Type":"Audio","Index":1,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false},{"Codec":"ac3","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"1/48000","Title":"AC3 5.1 @ 640 kbps","DisplayTitle":"Eng AC3 5.1 @ 640 kbps","IsInterlaced":false,"ChannelLayout":"5.1","BitRate":640000,"Channels":6,"SampleRate":48000,"IsDefault":false,"IsForced":false,"Type":"Audio","Index":2,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false},{"Codec":"PGSSUB","Language":"ger","TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"Forced PGS","DisplayTitle":"Ger Forced PGS","IsInterlaced":false,"IsDefault":true,"IsForced":true,"Type":"Subtitle","Index":3,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false},{"Codec":"DVDSUB","Language":"ger","TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"Forced VobSub","DisplayTitle":"Ger Forced VobSub","IsInterlaced":false,"IsDefault":false,"IsForced":true,"Type":"Subtitle","Index":4,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false},{"Codec":"PGSSUB","Language":"ger","TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"Full PGS","DisplayTitle":"Ger Full PGS","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":5,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false},{"Codec":"DVDSUB","Language":"ger","TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"Full VobSub","DisplayTitle":"Ger Full VobSub","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":6,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false},{"Codec":"PGSSUB","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"Full PGS","DisplayTitle":"Eng Full PGS","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":7,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false},{"Codec":"DVDSUB","Language":"eng","TimeBase":"1/1000","CodecTimeBase":"0/1","Title":"Full VobSub","DisplayTitle":"Eng Full VobSub","IsInterlaced":false,"IsDefault":false,"IsForced":false,"Type":"Subtitle","Index":8,"IsExternal":false,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Level":0,"IsAnamorphic":false}],"PlayableStreamFileNames":[],"Formats":[],"Bitrate":8882939,"RequiredHttpHeaders":{}}


/usr/bin/ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i file:"/demo.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_vaapi  -b:v 1616000 -maxrate 1616000 -bufsize 3232000 -level 41 -force_key_frames "expr:gte(t,n_forced*3)" -vf "format=nv12|vaapi,hwupload" -copyts -vsync -1 -codec:a:0 aac -strict experimental -ac 6 -ab 384000  -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time 3  -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 0 -segment_list "/var/lib/emby/transcoding-temp/0c452153ac505b7983821dc637462816.m3u8" -y "/var/lib/emby/transcoding-temp/0c452153ac505b7983821dc637462816%d.ts"




ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.1.1 (GCC) 20170630
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-shared --enable-version3
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
[AVHWDeviceContext @ 0x559975fa6a40] No VA display found for device: /dev/dri/renderD128.
[vaapi @ 0x559974a64050] Failed to create a VAAPI device

but permissions should be okay?

ls -la /dev/dri/
insgesamt 0
drwxr-xr-x  3 root root       100 26. Jul 10:54 .
drwxr-xr-x 19 root root      3040 26. Jul 11:36 ..
drwxr-xr-x  2 root root        80 26. Jul 10:54 by-path
crw-rw----  1 root video 226,   0 26. Jul 10:54 card0
crw-rw----  1 root video 226, 128 26. Jul 10:54 renderD128

groups emby
emby video

Running that ffmpeg command as root seems to work just fine. I cannot play the result cause it splits in so many pieces.

any other permissions emby needs now? Any other thoughts?

 

derdigge


Edited by derdigge1982, 29 July 2017 - 06:57 PM.


#2 hurricanehrndz OFFLINE  

hurricanehrndz

    Advanced Member

  • Developers
  • 1249 posts
  • Local time: 11:05 AM

Posted 29 July 2017 - 07:02 PM

Make emby part of video group

Sent from my ONEPLUS A3000 using Tapatalk

#3 derdigge1982 OFFLINE  

derdigge1982

    Newbie

  • Members
  • 8 posts
  • Local time: 08:05 PM

Posted 29 July 2017 - 07:15 PM

lightning fast reply :)

 

Emby is allready in video group. see last code box. Was also my first guess.



#4 derdigge1982 OFFLINE  

derdigge1982

    Newbie

  • Members
  • 8 posts
  • Local time: 08:05 PM

Posted 30 July 2017 - 04:58 AM

did it.

 

just removed emby user and recreated it with video as primary group for emby. Now it works. 



#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 135983 posts
  • Local time: 02:05 PM

Posted 30 July 2017 - 10:24 AM

Interesting. Thanks for the info !

#6 slevin7 OFFLINE  

slevin7

    Advanced Member

  • Members
  • 87 posts
  • Local time: 08:05 PM

Posted 21 March 2018 - 05:06 AM

I know this is a really noob question but how do you remove emby user and recreated it with video as primary group for emby?
i have the same issue as you had and emy should be in the video group. i tried 
sudo usermod -a -G video emby. but still the same error

 

    Sorry, forget it. i forgot to restart the server. How embarrassing.


Edited by slevin7, 21 March 2018 - 05:11 AM.


#7 dcrdev OFFLINE  

dcrdev

    Advanced Member

  • Members
  • 843 posts
  • Local time: 07:05 PM
  • LocationUK

Posted 21 March 2018 - 05:10 AM

It shouldn't make any difference whether video is the primary or a secondary group.

 

Did you guys reload systemd and restart emby after making these changes? You need to do that as these changes don't take affect on an existing session.


  • slevin7 likes this





Also tagged with one or more of these keywords: vaapi, hardware, intel, arch

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users