roketscyntist 0 Posted May 1, 2018 Share Posted May 1, 2018 (edited) Hi I have recently taken the time to get Emby properly set up and all content sorted properly, so my setup is almost perfect. One last issue remains, VAAPI hardware transcoding. Hardware transcoding is enabled in the server setup, and it's pointing to the correct device, /dev/dri/renderD128, but it seems Emby doesn't even try hardware encoding. As a test, I'm working with an old TV episode encoded using xvid inside an avi container. Some info: Emby 3.3.1.0 running on Arch, Ivy Bridge hardware. Emby using system ffmpeg (/usr/bin/ffmpeg) Streaming the same file via my browser to force transcoding, it appears it doesn't try h264 hardware encoding. Here are some tests I have done on the server, and my ffmpeg transcode log is attached. Any ideas? emby@[member="Asgard"] ~]$ whoami emby [emby@[member="Asgard"] ~]$ vainfo error: can't connect to X server! libva info: VA-API version 1.1.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_1_1 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.1 (libva 2.1.0) vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Desktop - 2.1.0 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc VAProfileJPEGBaseline : VAEntrypointVLD [emby@[member="Asgard"] ~]$ ffmpeg -vaapi_device /dev/dri/renderD128 -i test.avi -vf 'format=nv12,hwupload' -c:v h264_vaapi output.mp4 ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.3.0 (GCC) 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-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-shared --enable-version3 --enable-omx libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 Input #0, avi, from 'test.avi': Metadata: encoder : VirtualDubMod 1.5.4.1 (build 2178/release) IAS1 : English Duration: 00:22:22.01, start: 0.000000, bitrate: 1456 kb/s Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x416 [SAR 1:1 DAR 45:26], 1333 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 109 kb/s Stream mapping: Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (h264_vaapi)) Stream #0:1 -> #0:1 (mp3 (native) -> aac (native)) Press [q] to stop, [?] for help Output #0, mp4, to 'output.mp4': Metadata: IAS1 : English encoder : Lavf57.83.100 Stream #0:0: Video: h264 (h264_vaapi) (High) (avc1 / 0x31637661), vaapi_vld, 720x416 [SAR 1:1 DAR 45:26], q=0-31, 25 fps, 12800 tbn, 25 tbc Metadata: encoder : Lavc57.107.100 h264_vaapi Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s Metadata: encoder : Lavc57.107.100 aac Invalid return value 0 for stream protocol time=00:22:20.37 bitrate=1743.0kbits/s dup=1 drop=0 speed=17.2x Last message repeated 6 times frame=33551 fps=431 q=-0.0 Lsize= 286193kB time=00:22:22.01 bitrate=1747.0kbits/s dup=1 drop=0 speed=17.2x video:264045kB audio:21232kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.321293% [aac @ 0x55fcd2678f00] Qavg: 683.641 [emby@[member="Asgard"] ~]$ ls -alhtr total 513M drwxr-xr-x 2 emby emby 4.0K Apr 14 21:58 localization drwxr-xr-x 3 emby emby 4.0K Apr 14 21:58 root drwxr-xr-x 5 emby emby 4.0K Apr 14 22:27 metadata drwxr-xr-x 13 emby emby 4.0K Apr 16 22:06 cache drwxr-xr-x 4 emby emby 4.0K Apr 19 15:48 config -rw------- 1 emby emby 437 Apr 19 17:54 .bash_history drwxr-xr-x 7 emby emby 4.0K Apr 24 23:33 data drwxr-xr-x 2 emby emby 60K Apr 26 14:46 transcoding-temp drwxr-xr-x 2 emby emby 4.0K May 1 00:00 logs drwxr-xr-x 23 root root 4.0K May 1 00:00 .. drwxr-xr-x 2 emby emby 4.0K May 1 17:20 .ssh -rwxr-xr-x 1 emby emby 234M May 1 17:24 test.avi drwxr-xr-x 11 emby emby 4.0K May 1 17:24 . -rw-r--r-- 1 emby emby 280M May 1 17:26 output.mp4 [emby@[member="Asgard"] ~]$ file output.mp4 output.mp4: ISO Media, MP4 Base Media v1 [IS0 14496-12:2003] [emby@[member="Asgard"] ~]$ file test.avi test.avi: RIFF (little-endian) data, AVI, 720 x 416, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz) ffmpeg-transcode-19a2708b-093f-45f1-834b-b6b92ca1307c.txt Edited May 1, 2018 by roketscyntist Link to comment Share on other sites More sharing options...
Luke 37215 Posted May 1, 2018 Share Posted May 1, 2018 It's not used when the input is mpeg4 as vaapi doesn't support that. Link to comment Share on other sites More sharing options...
roketscyntist 0 Posted May 1, 2018 Author Share Posted May 1, 2018 Ah OK, so VAAPI has to support both the input and output formats? Link to comment Share on other sites More sharing options...
Luke 37215 Posted May 1, 2018 Share Posted May 1, 2018 It appears so, yes. Link to comment Share on other sites More sharing options...
tdiguy 96 Posted May 5, 2018 Share Posted May 5, 2018 One other thing to try since it was not noted here. Make sure emby is part of the video group. Link to comment Share on other sites More sharing options...
Luke 37215 Posted May 5, 2018 Share Posted May 5, 2018 Yes that's good advice as well, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now