solabc16 379 Posted October 18, 2017 Share Posted October 18, 2017 Hello @@Burrito78 To follow on from the above, we create optimised builds on a platform architecture by platform architecture basis for Emby Server on Synology. In the case of video processing, this includes all of the supporting infrastructure, such as - libdrm, libva, libva-intel-driver as mentioned earlier. We actually had a refresh scheduled in this area, so I've prioritised the builds for 'braswell' based machines and have an update available for you to test. Let me know if you're happy to run with a custom Package Center URL for a couple of weeks and I'll PM you with details to get early access. For reference, the changes of note in the context of this thread are as follows:- | Current | New | ----------------------------------- libdrm | 2.4.71 | 2.4.84 | libva | 1.7.2 | 1.8.2 | libmfx | 1.16 | 1.23 | libvainteldrv | 1.7.2 | 1.8.2 | Best - James Link to comment Share on other sites More sharing options...
Burrito78 15 Posted October 18, 2017 Author Share Posted October 18, 2017 Hello @@Burrito78 To follow on from the above, we create optimised builds on a platform architecture by platform architecture basis for Emby Server on Synology. In the case of video processing, this includes all of the supporting infrastructure, such as - libdrm, libva, libva-intel-driver as mentioned earlier. We actually had a refresh scheduled in this area, so I've prioritised the builds for 'braswell' based machines and have an update available for you to test. Let me know if you're happy to run with a custom Package Center URL for a couple of weeks and I'll PM you with details to get early access. For reference, the changes of note in the context of this thread are as follows:- | Current | New | ----------------------------------- libdrm | 2.4.71 | 2.4.84 | libva | 1.7.2 | 1.8.2 | libmfx | 1.16 | 1.23 | libvainteldrv | 1.7.2 | 1.8.2 | Best - James Thats great to hear! If i don't have to reinstall emby from scratch to test these changes but somehow update my current install to this test build and if i can revert back to the stable releases once they are released then i'd be willing to help! Link to comment Share on other sites More sharing options...
solabc16 379 Posted October 18, 2017 Share Posted October 18, 2017 Hello @@Burrito78 This will be a special package build of the current stable Emby Server (3.2.33.0), so it will be a seamless upgrade with minimal risk of disruption - as we won't be switching to the Emby Server beta release channel. Reverting back to the normal channel will be equally as straightforward at some future point. I'll PM you shortly with the details... Best - James Link to comment Share on other sites More sharing options...
Burrito78 15 Posted October 19, 2017 Author Share Posted October 19, 2017 I've updated to the new build with current libraries (see post above from James) and verified with him that the new libraries are installed properly. I then ran a test again but the result was the same. Example: https://www.dropbox.com/s/4hyp5lfbsvs61qe/Emby%20VA%20API%20Macroblocks.mov?dl=0 See transcode log attached. Transcode log.txt Link to comment Share on other sites More sharing options...
solabc16 379 Posted October 19, 2017 Share Posted October 19, 2017 Hello @@Burrito78, All We've included 'vainfo' in the updated package, from which we have the following output - so I'm reasonably satisfied on this front:- libva info: VA-API version 0.40.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /var/packages/EmbyServer/target/ffmpeg/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_40 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.40 (libva ) vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 1.8.2 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 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 @@Burrito78, based on the example you uploaded earlier, could you create a short (1 - 2 minute) extract from the original source containing that section of the movie. We can then use to that to conduct some further tests and try a few things out, in a more manageable way. Best - James Link to comment Share on other sites More sharing options...
Andy777 21 Posted October 22, 2017 Share Posted October 22, 2017 I've updated to the new build with current libraries (see post above from James) and verified with him that the new libraries are installed properly. I then ran a test again but the result was the same. Example: https://www.dropbox.com/s/4hyp5lfbsvs61qe/Emby%20VA%20API%20Macroblocks.mov?dl=0 See transcode log attached. Hi. The stack @@solabc16 has provided (even the one in post #26) should provide very good quality.. I've been updating my vaapi about once in the month so I have a pretty good grasp about the advances and problems. Your sample did not show any pixelation in the fast scene change from the hotel room -> inside the car. That is something that was a big problem in early vaapi. My test video is the Interstellar start where you have cornfields blowing in the field and fast changes into the Ranger spacecraft in trouble. If you have that please try. Link to comment Share on other sites More sharing options...
Andy777 21 Posted October 22, 2017 Share Posted October 22, 2017 Hello @@Burrito78, All We've included 'vainfo' in the updated package, from which we have the following output - so I'm reasonably satisfied on this front:- libva info: VA-API version 0.40.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /var/packages/EmbyServer/target/ffmpeg/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_0_40 libva info: va_openDriver() returns 0 vainfo: VA-API version: 0.40 (libva ) vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 1.8.2 vainfo: Supported profile and entrypoints @@Burrito78, based on the example you uploaded earlier, could you create a short (1 - 2 minute) extract from the original source containing that section of the movie. We can then use to that to conduct some further tests and try a few things out, in a more manageable way. Best - James That is awsome support for a NAS system. Most Linux distros don't do such upgrades. I'm running a very similar stack (on a Skylake i5) and willing to help if I can. My kernel is intel-drm-tip, but that would mostly concern HEVC encoding (not relevant in @bBurrito78 case). Hope to get the same original to run through my vaapi with the same options. BR Andy777 Link to comment Share on other sites More sharing options...
Burrito78 15 Posted October 22, 2017 Author Share Posted October 22, 2017 @Burrito78, based on the example you uploaded earlier, could you create a short (1 - 2 minute) extract from the original source containing that section of the movie. We can then use to that to conduct some further tests and try a few things out, in a more manageable way. Best - James I uploaded a short sample of the Driver scene that provokes the blocking in my sample above from the original source for him and haven't heard from James back yet. I assume that the custom builds for me were used to get a look at the features available on the DS416play / similar Synology NAS and now he is looking into optimizing the transcoding parameters using the newest builds + features available using my "problematic" real world test sample. Regards, Burrito78 Link to comment Share on other sites More sharing options...
solabc16 379 Posted October 22, 2017 Share Posted October 22, 2017 Hello @@Andy777, @@Burrito78 Thanks for the feedback @@Andy777. @@Burrito78, would you be happy to share the dropbox link here so other's can give us some feedback? Best - James Link to comment Share on other sites More sharing options...
Burrito78 15 Posted October 23, 2017 Author Share Posted October 23, 2017 (edited) No problem. But keep in mind, this is only one example of the problem. Its not a really "problematic" clip at all. Every video played back has some parts that have macro blocking like in the example screen capture video above. https://www.dropbox.com/s/u1y4vr8li3e1wys/Drive%20%282011%29%20Blu-ray%20VA%20API%20test%20example.mkv?dl=0 This file is a 2 Min. sample of a MKV from the Driver Blu-ray that i personally own. It produces Macroblocking while transcoding when the video goes from black to the shot of the map on my DS416play only when using hardware transcoding using VA API. Edited October 23, 2017 by Burrito78 Link to comment Share on other sites More sharing options...
Andy777 21 Posted October 24, 2017 Share Posted October 24, 2017 No problem. But keep in mind, this is only one example of the problem. Its not a really "problematic" clip at all. Every video played back has some parts that have macro blocking like in the example screen capture video above. https://www.dropbox.com/s/u1y4vr8li3e1wys/Drive%20%282011%29%20Blu-ray%20VA%20API%20test%20example.mkv?dl=0 This file is a 2 Min. sample of a MKV from the Driver Blu-ray that i personally own. It produces Macroblocking while transcoding when the video goes from black to the shot of the map on my DS416play only when using hardware transcoding using VA API. Thanks. Quick reply: No pixelation on my Skylake on web-player (ms Edge) with 9MB/s (Full HD) or 1.5MB/s (downscaling): User policy for embyuser: EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True /opt/ffmpeg/ffmpeg -ss 00:02:00.000 -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i file:"/mnt/data/m/VideosOther/Test videos/Drive (2011) Blu-ray VA API test example.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 8616000 -maxrate 8616000 -bufsize 17232000 -level 41 -force_key_frames "expr:if(isnan(prev_forced_t),eq(t,t),gte(t,prev_forced_t+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 -segment_time_delta -120 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 40 -segment_list "/var/lib/emby-server/transcoding-temp/4b12950583a1b0c62cc0885c8ed95e54.m3u8" -y "/var/lib/emby-server/transcoding-temp/4b12950583a1b0c62cc0885c8ed95e54%d.ts" ffmpeg version N-87642-gcf3d2d5 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.3.0 (Ubuntu/Linaro 6.3.0-18ubuntu2~16.04) 20170519 configuration: --prefix=/home/msrv/ffmpeg_build --pkg-config-flags=--static --extra-cflags='-I/home/msrv/ffmpeg_build/include -ftree-vectorize -march=native' --extra-ldflags=-L/home/msrv/ffmpeg_build/lib --bindir=/home/msrv/bin --enable-hardcoded-tables --cpu=native --enable-gpl --enable-version3 --enable-nonfree --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libopencv --enable-libopenjpeg --enable-libwebp --enable-vaapi --enable-libmfx --enable-ladspa --enable-libgsm --enable-libsmbclient --enable-libsoxr --enable-libspeex --enable-libssh --enable-libwavpack --enable-libxvid --enable-openal --enable-openssl --enable-librtmp --enable-frei0r --enable-libzimg --enable-fontconfig --enable-libfribidi --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libzvbi libavutil 55. 77.101 / 55. 77.101 libavcodec 57.106.104 / 57.106.104 libavformat 57. 82.102 / 57. 82.102 libavdevice 57. 9.101 / 57. 9.101 libavfilter 6.106.100 / 6.106.100 libswscale 4. 7.103 / 4. 7.103 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 libva info: VA-API version 0.40.1 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_0_40 libva info: va_openDriver() returns 0 [matroska,webm @ 0x3b1c8e0] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options [matroska,webm @ 0x3b1c8e0] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, matroska,webm, from 'file:/mnt/data/m/VideosOther/Test videos/Drive (2011) Blu-ray VA API test example.mkv': Metadata: title : Drive encoder : libebml v1.3.5 + libmatroska v1.4.8 creation_time : 2017-10-19T20:20:25.000000Z Duration: 00:02:00.04, start: 0.000000, bitrate: 28134 kb/s Chapter #0:0: start 0.000000, end 120.032000 Metadata: title : Chapter 01 Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc Metadata: BPS : 23881840 BPS-eng : 23881840 DURATION : 00:01:59.953000000 DURATION-eng : 00:01:59.953000000 NUMBER_OF_FRAMES: 2876 NUMBER_OF_FRAMES-eng: 2876 NUMBER_OF_BYTES : 358087302 NUMBER_OF_BYTES-eng: 358087302 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(ger): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p (default) Metadata: title : Surround 5.1 BPS : 2128615 BPS-eng : 2128615 DURATION : 00:02:00.033000000 DURATION-eng : 00:02:00.033000000 NUMBER_OF_FRAMES: 11253 NUMBER_OF_FRAMES-eng: 11253 NUMBER_OF_BYTES : 31938008 NUMBER_OF_BYTES-eng: 31938008 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p Metadata: title : Surround 5.1 BPS : 2126121 BPS-eng : 2126121 DURATION : 00:02:00.033000000 DURATION-eng : 00:02:00.033000000 NUMBER_OF_FRAMES: 11253 NUMBER_OF_FRAMES-eng: 11253 NUMBER_OF_BYTES : 31900600 NUMBER_OF_BYTES-eng: 31900600 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:3(ger): Subtitle: hdmv_pgs_subtitle Metadata: BPS : 51184 BPS-eng : 51184 DURATION : 00:00:36.141000000 DURATION-eng : 00:00:36.141000000 NUMBER_OF_FRAMES: 20 NUMBER_OF_FRAMES-eng: 20 NUMBER_OF_BYTES : 231234 NUMBER_OF_BYTES-eng: 231234 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle Metadata: BPS : 48516 BPS-eng : 48516 DURATION : 00:00:38.559000000 DURATION-eng : 00:00:38.559000000 NUMBER_OF_FRAMES: 24 NUMBER_OF_FRAMES-eng: 24 NUMBER_OF_BYTES : 233843 NUMBER_OF_BYTES-eng: 233843 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi)) Stream #0:1 -> #0:1 (dts (dca) -> aac (native)) Press [q] to stop, [?] for help [segment @ 0x3f1e340] Opening '/var/lib/emby-server/transcoding-temp/4b12950583a1b0c62cc0885c8ed95e5440.ts' for writing Output #0, segment, to '/var/lib/emby-server/transcoding-temp/4b12950583a1b0c62cc0885c8ed95e54%d.ts': Metadata: encoder : Lavf57.82.102 Stream #0:0: Video: h264 (h264_vaapi) (High), vaapi_vld, 1920x1080 [SAR 1:1 DAR 16:9], q=0-31, 8616 kb/s, 23.98 fps, 90k tbn, 23.98 tbc Metadata: encoder : Lavc57.106.104 h264_vaapi Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp (16 bit), 384 kb/s (default) Metadata: encoder : Lavc57.106.104 aac [segment @ 0x3f1e340] Opening '/var/lib/emby-server/transcoding-temp/4b12950583a1b0c62cc0885c8ed95e54.m3u8.tmp' for writing frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:02:00.04 bitrate=N/A speed=2.36e+03x video:0kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [aac @ 0x3f22cc0] Qavg: 180.400 User policy for embyuser: EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True /opt/ffmpeg/ffmpeg -ss 00:02:00.000 -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i file:"/mnt/data/m/VideosOther/Test videos/Drive (2011) Blu-ray VA API test example.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 1116000 -maxrate 1116000 -bufsize 2232000 -level 41 -force_key_frames "expr:if(isnan(prev_forced_t),eq(t,t),gte(t,prev_forced_t+3))" -vf "format=nv12|vaapi,hwupload,scale_vaapi=w=720:h=404" -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 -segment_time_delta -120 -individual_header_trailer 0 -segment_format mpegts -segment_list_type m3u8 -segment_start_number 40 -segment_list "/var/lib/emby-server/transcoding-temp/2795105eaf0b6e530759da5a0803111a.m3u8" -y "/var/lib/emby-server/transcoding-temp/2795105eaf0b6e530759da5a0803111a%d.ts" ffmpeg version N-87642-gcf3d2d5 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.3.0 (Ubuntu/Linaro 6.3.0-18ubuntu2~16.04) 20170519 configuration: --prefix=/home/msrv/ffmpeg_build --pkg-config-flags=--static --extra-cflags='-I/home/msrv/ffmpeg_build/include -ftree-vectorize -march=native' --extra-ldflags=-L/home/msrv/ffmpeg_build/lib --bindir=/home/msrv/bin --enable-hardcoded-tables --cpu=native --enable-gpl --enable-version3 --enable-nonfree --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libopencv --enable-libopenjpeg --enable-libwebp --enable-vaapi --enable-libmfx --enable-ladspa --enable-libgsm --enable-libsmbclient --enable-libsoxr --enable-libspeex --enable-libssh --enable-libwavpack --enable-libxvid --enable-openal --enable-openssl --enable-librtmp --enable-frei0r --enable-libzimg --enable-fontconfig --enable-libfribidi --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libzvbi libavutil 55. 77.101 / 55. 77.101 libavcodec 57.106.104 / 57.106.104 libavformat 57. 82.102 / 57. 82.102 libavdevice 57. 9.101 / 57. 9.101 libavfilter 6.106.100 / 6.106.100 libswscale 4. 7.103 / 4. 7.103 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 libva info: VA-API version 0.40.1 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_0_40 libva info: va_openDriver() returns 0 [matroska,webm @ 0x2b258e0] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options [matroska,webm @ 0x2b258e0] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, matroska,webm, from 'file:/mnt/data/m/VideosOther/Test videos/Drive (2011) Blu-ray VA API test example.mkv': Metadata: title : Drive encoder : libebml v1.3.5 + libmatroska v1.4.8 creation_time : 2017-10-19T20:20:25.000000Z Duration: 00:02:00.04, start: 0.000000, bitrate: 28134 kb/s Chapter #0:0: start 0.000000, end 120.032000 Metadata: title : Chapter 01 Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc Metadata: BPS : 23881840 BPS-eng : 23881840 DURATION : 00:01:59.953000000 DURATION-eng : 00:01:59.953000000 NUMBER_OF_FRAMES: 2876 NUMBER_OF_FRAMES-eng: 2876 NUMBER_OF_BYTES : 358087302 NUMBER_OF_BYTES-eng: 358087302 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1(ger): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p (default) Metadata: title : Surround 5.1 BPS : 2128615 BPS-eng : 2128615 DURATION : 00:02:00.033000000 DURATION-eng : 00:02:00.033000000 NUMBER_OF_FRAMES: 11253 NUMBER_OF_FRAMES-eng: 11253 NUMBER_OF_BYTES : 31938008 NUMBER_OF_BYTES-eng: 31938008 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:2(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s16p Metadata: title : Surround 5.1 BPS : 2126121 BPS-eng : 2126121 DURATION : 00:02:00.033000000 DURATION-eng : 00:02:00.033000000 NUMBER_OF_FRAMES: 11253 NUMBER_OF_FRAMES-eng: 11253 NUMBER_OF_BYTES : 31900600 NUMBER_OF_BYTES-eng: 31900600 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:3(ger): Subtitle: hdmv_pgs_subtitle Metadata: BPS : 51184 BPS-eng : 51184 DURATION : 00:00:36.141000000 DURATION-eng : 00:00:36.141000000 NUMBER_OF_FRAMES: 20 NUMBER_OF_FRAMES-eng: 20 NUMBER_OF_BYTES : 231234 NUMBER_OF_BYTES-eng: 231234 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle Metadata: BPS : 48516 BPS-eng : 48516 DURATION : 00:00:38.559000000 DURATION-eng : 00:00:38.559000000 NUMBER_OF_FRAMES: 24 NUMBER_OF_FRAMES-eng: 24 NUMBER_OF_BYTES : 233843 NUMBER_OF_BYTES-eng: 233843 _STATISTICS_WRITING_APP: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_APP-eng: mkvmerge v17.0.0 ('Be Ur Friend') 64-bit _STATISTICS_WRITING_DATE_UTC: 2017-10-19 20:20:25 _STATISTICS_WRITING_DATE_UTC-eng: 2017-10-19 20:20:25 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi)) Stream #0:1 -> #0:1 (dts (dca) -> aac (native)) Press [q] to stop, [?] for help [segment @ 0x2f27340] Opening '/var/lib/emby-server/transcoding-temp/2795105eaf0b6e530759da5a0803111a40.ts' for writing Output #0, segment, to '/var/lib/emby-server/transcoding-temp/2795105eaf0b6e530759da5a0803111a%d.ts': Metadata: encoder : Lavf57.82.102 Stream #0:0: Video: h264 (h264_vaapi) (High), vaapi_vld, 720x404 [SAR 1:1 DAR 180:101], q=0-31, 1116 kb/s, 23.98 fps, 90k tbn, 23.98 tbc Metadata: encoder : Lavc57.106.104 h264_vaapi Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp (16 bit), 384 kb/s (default) Metadata: encoder : Lavc57.106.104 aac [segment @ 0x2f27340] Opening '/var/lib/emby-server/transcoding-temp/2795105eaf0b6e530759da5a0803111a.m3u8.tmp' for writing frame= 0 fps=0.0 q=0.0 Lsize=N/A time=00:02:00.04 bitrate=N/A speed=2.3e+03x video:0kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [aac @ 0x2f2bca0] Qavg: 180.400 I can create a command line ffmpeg-vaapi transcoded version to view tomorrow using the parameters from your earlier post. Let's see then if there is something that triggers pixelation. ffmpeg: self built git couple of months back libva: 1.8.4 (VA-API 0.40.1) intel-vaapi-driver: 1.8.4 libdrm: 2.4.83 + git beginning of this month Kernel: Intel DRM nightly 4.14.0-994-generic from Oct 1. BR A Link to comment Share on other sites More sharing options...
solabc16 379 Posted October 24, 2017 Share Posted October 24, 2017 Hi @@Burrito78 Stable release 3.2.34.0 is now available and includes the updates (and a few others) that were in the special build we were testing with, so you should switch the custom URL configured in Package Center back to the original. Thanks @@Andy777, really helpful, I'll pickup shortly - once I've got this release out the way. Best - James 1 Link to comment Share on other sites More sharing options...
Andy777 21 Posted October 25, 2017 Share Posted October 25, 2017 No problem. But keep in mind, this is only one example of the problem. Its not a really "problematic" clip at all. Every video played back has some parts that have macro blocking like in the example screen capture video above. https://www.dropbox.com/s/u1y4vr8li3e1wys/Drive%20%282011%29%20Blu-ray%20VA%20API%20test%20example.mkv?dl=0 This file is a 2 Min. sample of a MKV from the Driver Blu-ray that i personally own. It produces Macroblocking while transcoding when the video goes from black to the shot of the map on my DS416play only when using hardware transcoding using VA API. Hi, Here is a link to a version transcoded via vaapi on my system from your original: https://www.dropbox.com/s/9gyty576tu0ouls/drive_1.ts?dl=0 I used the same parameters that were in your transcoding log in one of the earlier logs (but of course omitted the HLS chunking). Attached is also the cmd line and output of the ffmpeg. BR, Andy777 ffmpeg_cmdline.txt Link to comment Share on other sites More sharing options...
Burrito78 15 Posted October 25, 2017 Author Share Posted October 25, 2017 Looking very good. No visible macro-blocking. Interesting! Link to comment Share on other sites More sharing options...
Burrito78 15 Posted October 29, 2017 Author Share Posted October 29, 2017 (edited) Do you have any idea what could be the difference between my transcode with blocking and @@Andy777s transcode that is "as good as it gets" using also the latest versions of VAAPI, @@solabc16? Could we do anything else to help here? It really would be a game-changer for me (and a lot of other people here i think) if the DS416play/similar NAS could transcode this content without issues. Regards, Burrito78 Edited October 29, 2017 by Burrito78 Link to comment Share on other sites More sharing options...
solabc16 379 Posted October 29, 2017 Share Posted October 29, 2017 Hello @@Burrito78 If you configure your package manager to use the special build URL I provided earlier via the private message, you'll be able to pickup a new build : 3.2.35.0-2. Compared to the baseline, the component revisions are as follows:- | Current | New | ----------------------------------- libdrm | 2.4.71 | 2.4.85 | libva | 1.7.2 | 2.0.0 | libmfx | 1.16 | 1.23 | libvainteldrv | 1.7.2 | 2.0.0 | Once installed, can you let us know what differences (if any) this makes and also provide the output from 'vainfo', as per the private message. Best- James Link to comment Share on other sites More sharing options...
Andy777 21 Posted October 30, 2017 Share Posted October 30, 2017 Do you have any idea what could be the difference between my transcode with blocking and @@Andy777s transcode that is "as good as it gets" using also the latest versions of VAAPI, @@solabc16? Could we do anything else to help here? It really would be a game-changer for me (and a lot of other people here i think) if the DS416play/similar NAS could transcode this content without issues. Regards, Burrito78 This is just pure guesswork so please treat it as so: I'm running a pretty new Intel nightly kernel (which contains the kernel level display-driver fixes before the mainland). Your ffmpeg uses /dev/dri/card0 as the Vaapi device. The preferred node is /dev/dri/renderD128. However, that should not affect quality at all (it is related to X and display). There is a still open bug for performance when no monitor is connected. Maybe the GPU in my Skylake is a bit more powerfull, but the Brasswell strugles somehow (you could check with intel_gpu_top). HOWEVER, this is also very unlikely as the test case is fairly easy (1080p h.264 source). The open bug:https://bugs.freedesktop.org/show_bug.cgi?id=100572 and https://patchwork.freedesktop.org/patch/176336/ After that I'm out of guesses. Most likely would be the first one. I really don't believe in the rest my self. The second point would be the easiest to test. BR, Andy777 Link to comment Share on other sites More sharing options...
Burrito78 15 Posted October 30, 2017 Author Share Posted October 30, 2017 This latest update fixes the problems of bad macro-blocking in my test case (Drive Blu-ray MKV rip) using the 720p/4MBit setting! Speed is up also from 50fps to over 70fps!! libva info: VA-API version 1.0.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /var/packages/EmbyServer/target/ffmpeg/lib/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_1_0 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.0 (libva 2.0.0) vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 2.0.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 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 Link to comment Share on other sites More sharing options...
solabc16 379 Posted October 30, 2017 Share Posted October 30, 2017 Hello @@Burrito78 Thanks for the update, that's great news - we'll start work to integrate this into the main releases. Best - James 1 Link to comment Share on other sites More sharing options...
Andy777 21 Posted October 30, 2017 Share Posted October 30, 2017 Hello @@Burrito78 Thanks for the update, that's great news - we'll start work to integrate this into the main releases. Best - James @@solabc16 great work! @@Burrito78 Congrats! You are most likely the first in the emby community to be running libva2 / vaapi 1.0 transcoding! 1 Link to comment Share on other sites More sharing options...
Luke 37063 Posted October 30, 2017 Share Posted October 30, 2017 Great job everyone. 1 Link to comment Share on other sites More sharing options...
Burrito78 15 Posted October 30, 2017 Author Share Posted October 30, 2017 Thanks guys! Great work! This changes my whole usage case as i now can realistically use transcoding for mobile usage on my 400€/$ NAS! Link to comment Share on other sites More sharing options...
solabc16 379 Posted October 31, 2017 Share Posted October 31, 2017 Just a reminder @@Burrito78, to switch your Package Center URL back to the usual one. Best - James 1 Link to comment Share on other sites More sharing options...
Solution solabc16 379 Posted October 31, 2017 Solution Share Posted October 31, 2017 Hello All These updates are now rolled up into release 3.2.35.0-3, which is now available. Please see https://emby.media/community/index.php?/topic/52427-improved-support-for-hardware-transcoding-with-va-api/. Best - James 1 Link to comment Share on other sites More sharing options...
wolfgang 17 Posted October 31, 2017 Share Posted October 31, 2017 (edited) Hooray, thank you so much!!! Edit:When starting a movie, h/w transcoding works just fine. But when resuming a movie (Apple TV 4K), it falls back to s/w transcoding. Strange. Edited November 2, 2017 by wolfgang 1 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