Jump to content

trouble with intel hwacc vaapi


derdigge1982

Recommended Posts

derdigge1982

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
Link to comment
Share on other sites

derdigge1982

lightning fast reply :)

 

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

Link to comment
Share on other sites

derdigge1982

did it.

 

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

Link to comment
Share on other sites

  • 7 months later...
slevin7

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
Link to comment
Share on other sites

dcrdev

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.

  • Like 1
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...