From owner-freebsd-multimedia@freebsd.org Wed Feb 27 11:32:01 2019 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46B97151A250 for ; Wed, 27 Feb 2019 11:32:01 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D813C729DD; Wed, 27 Feb 2019 11:32:00 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id C907F16C9F; Wed, 27 Feb 2019 11:32:00 +0000 (UTC) From: Jan Beich To: Cc: Subject: Re: FFmpeg hardware transcoding References: <005401d4c957$c6bbc840$543358c0$@gmail.com> <002801d4ce0a$75c29bf0$6147d3d0$@gmail.com> Date: Wed, 27 Feb 2019 12:31:57 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: D813C729DD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.91 / 15.00]; TAGGED_RCPT(0.00)[]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_SHORT(-0.92)[-0.915,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-0.997,0] X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2019 11:32:01 -0000 writes: > Hi Multimedia mailing list, > > Here I am again with a follow-up question to this. > I was wondering if hardware acceleration is possible even if I am building > all ports with X11 unset (off). X11=off is generally untested territory. Please, make sure VAAPI works in your environment (e.g., headless) before fiddling with port options. > I noticed that when building ports related to hardware acceleration, more > specifically, libva-utils to check if driver etc is detected with vainfo, it > fails with this; > > [~]$ vainfo > ld-elf.so.1: Shared object "libva-x11.so.2" not found, required by "vainfo" After disabling X11 or WAYLAND in libva make sure to rebuild all direct consumers e.g., libva-utils, libva-intel-driver, ffmpeg. poudriere should have done that for you. If you're building manually or via portmaster don't expect handholding. > This fails because I build libva without X11 support. Is vainfo only > supported to work on platforms that are running an X11 server? Dependency on X11 libraries doesn't imply dependency on a running X11 server. I don't maintain libva-utils, so no clue if X11 can be disabled at compile time. > When I reinstall libva with X11 support vainfo works, although it does say > its not detecting X11 server (which I'm not interested in). > I am interested however in the capabilities of the detected driver and if it > is detected at all. > > Output of vainfo: > [~]$ vainfo > error: XDG_RUNTIME_DIR not set in the environment. XDG_RUNTIME_DIR is only required when running in Wayland compositor. It's a result of WAYLAND option enabled by default and is safe to ignore. > error: can't connect to X server! > vainfo: VA-API version: 1.4 (libva 2.4.0) > vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.3.0 I'm on Skylake as well, so what works for me is very likely to work for you. ;) > vainfo: Supported profile and entrypoints > VAProfileMPEG2Simple : VAEntrypointVLD > VAProfileMPEG2Simple : VAEntrypointEncSlice > VAProfileMPEG2Main : VAEntrypointVLD > VAProfileMPEG2Main : VAEntrypointEncSlice > VAProfileH264ConstrainedBaseline: VAEntrypointVLD > VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice > VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP > VAProfileH264ConstrainedBaseline: VAEntrypointFEI > VAProfileH264ConstrainedBaseline: VAEntrypointStats > VAProfileH264Main : VAEntrypointVLD > VAProfileH264Main : VAEntrypointEncSlice > VAProfileH264Main : VAEntrypointEncSliceLP > VAProfileH264Main : VAEntrypointFEI > VAProfileH264Main : VAEntrypointStats > VAProfileH264High : VAEntrypointVLD > VAProfileH264High : VAEntrypointEncSlice > VAProfileH264High : VAEntrypointEncSliceLP > VAProfileH264High : VAEntrypointFEI > VAProfileH264High : VAEntrypointStats > 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 libva-intel-driver can be built with partial VP9 (8bit) decoding support. Maybe useful for transcoding 4K videos obtained from YouTube. > VAProfileHEVCMain : VAEntrypointVLD > VAProfileHEVCMain : VAEntrypointEncSlice Compared to H264 encoder HEVC requires more GPU power. Check GPU usage via intel_gpu_top (not in ports) if you need to achieve certain speed. https://github.com/markjdb/intel-gpu-tools > > Possible solution (although I'm really just guessing here and are probably > not correct in many ways); > - Try build vainfo without linking against libva-x11.so > - Remove X11 option from libva and always enable it (only a few extra > libraries that get pulled in by this) Another option: - Don't install libva-utils