From nobody Sun Jan 07 05:06:37 2024 X-Original-To: multimedia@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T74tq0ZClz56WPL for ; Sun, 7 Jan 2024 05:07:15 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T74tp4L1Bz52NK for ; Sun, 7 Jan 2024 05:07:14 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-7811db57cb4so76659985a.0 for ; Sat, 06 Jan 2024 21:07:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704604034; x=1705208834; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XuBIokBkSTByrh29Ecz83OlPUTtwjdUu9ABDRwHql80=; b=GL/lhLfm6szrN9w2U+/gwsrPW7GPrKTR5hz581mvJ1lCJs6Yde6r41ShrWmsJRejhq beRQM8EADNJ386C0xoGYn5FXZZgjQS+gLSwJN0bduFXl4FQFxvfsSsd7YQ/uL7vHF6x/ oBczdZ5xrMzGwboXEZgEKzWt5++k+knCiE9p+fSk/ZGE7LQD7FLNguK6bsvSn5Ez9yZm SobubS2bVs3xmI+cEFk0fTojGT+aF37UE9ynW3x34zL734sc+1w+N8cU5VQNw4KBWsG+ 4UR6p93SEdsBTzuxG/YU4RZVM4x2RdBv3tKWbnmapIRqXBXcvj1h8ZE4rww75tjZd7s/ vKUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704604034; x=1705208834; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XuBIokBkSTByrh29Ecz83OlPUTtwjdUu9ABDRwHql80=; b=dpixnQNZy3KP7cuw3uQxQBBUNRLJWHwmo3owd2llqno78j7vlUzPOOySIw/sBohPMg oQmVdSdN92PCvOH7oEiZXTgovR4oeBfCgb9AGmo4uV37UehPSkLNV1QsdkQZb9BMxcfl HwJwDZUxgKZ4eUph9KwAXqI8MIXVaZXGhLcfQGglos/TzIlSHycsN+924zq8lUizKJPG ViWfLwZifIUHH3CJ5pMMautnOKFg/mOGCn6hLijl5Wm0hoD5iFJ8o45MZSV7/Q6ocrjK C7c2fSf+td+pW3G6qxbn7BciNqj2nhVmHO13zqFAAYJ8uVEzReVtyVwzCyuPWYt9f5yh iZpA== X-Gm-Message-State: AOJu0YwyQ+455ct6ZfuQQjESbpGaFQtpLcAmzDyK8xmrAbjUYGgbUpv7 bSiqyFfeHZGhmUXD0sx9LtnmfcJpsbUFsJpLM1lAWujzGrk= X-Google-Smtp-Source: AGHT+IGbn1aQen/erO8Jyq6OBH3ym/FTSsJXtxdh8DWsLXDxy/CjAgTkvoZ/8mbYXnIp49d/mfAX1qOenqSYC4SDung= X-Received: by 2002:a05:620a:298b:b0:781:e4cd:785a with SMTP id r11-20020a05620a298b00b00781e4cd785amr7108482qkp.21.1704604033617; Sat, 06 Jan 2024 21:07:13 -0800 (PST) List-Id: Multimedia discussions List-Archive: https://lists.freebsd.org/archives/freebsd-multimedia List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-multimedia@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Mehmet Erol Sanliturk Date: Sun, 7 Jan 2024 08:06:37 +0300 Message-ID: Subject: Re: FFmpeg VAAPI H264 /HEVC encoding not supported To: Mario Marietto Cc: Kevin Oberman , multimedia@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e81553060e540d8c" X-Rspamd-Queue-Id: 4T74tp4L1Bz52NK X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] --000000000000e81553060e540d8c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable H264 and HEVC are patented and require a license to use them : https://www.google.com/search?q=3Dis+h264+patented+or+not&sca_esv=3D5962985= 80&sxsrf=3DAM9HkKkCbasJ_rZxhBZ0CfT-WedIb0IxqA%3A1704601707318&source=3Dhp&e= i=3DayiaZevMEfSFxc8PuIePiAM&iflsig=3DAO6bgOgAAAAAZZo2ex_xUaqw07FHPI8bDgaMJd= 3jqyo-&ved=3D0ahUKEwirrvyZuMqDAxX0QvEDHbjDAzEQ4dUDCAo&uact=3D5&oq=3Dis+h264= +patented+or+not&gs_lp=3DEgdnd3Mtd2l6IhdpcyBoMjY0IHBhdGVudGVkIG9yIG5vdDIFEC= EYoAFI6H5QAFjjYHAAeACQAQCYAYUBoAG5EqoBBDguMTW4AQPIAQD4AQHCAgwQIxiABBiKBRgTG= CfCAgQQIxgnwgIFEAAYgATCAgsQLhiABBjHARjRA8ICChAjGIAEGIoFGCfCAgUQLhiABMICBxAA= GIAEGArCAggQABgWGB4YCsICBhAAGBYYHsICCxAAGIAEGIoFGIYDwgIIEAAYFhgeGA8&sclient= =3Dgws-wiz is h264 patented or not https://en.wikipedia.org/wiki/Advanced_Video_Coding Advanced Video Coding https://www.google.com/search?q=3Dis+hevc+patented+or+not&sca_esv=3D5962985= 80&sxsrf=3DAM9HkKny-qeovZ7VtTHG1QfE01reA-dGmA%3A1704601726231&ei=3DfiiaZbvh= DYuGxc8PmompiA0&ved=3D0ahUKEwi7mICjuMqDAxULQ_EDHZpECtEQ4dUDCBA&uact=3D5&oq= =3Dis+hevc+patented+or+not&gs_lp=3DEgxnd3Mtd2l6LXNlcnAiF2lzIGhldmMgcGF0ZW50= ZWQgb3Igbm90MggQABiABBiiBDIIEAAYgAQYogRItaYTUJv6EljLkRNwBHgBkAEAmAF4oAGCBao= BAzIuNLgBA8gBAPgBAcICChAAGEcY1gQYsAPCAggQABgIGAcYHsICCxAAGIAEGIoFGIYD4gMEGA= AgQYgGAZAGCA&sclient=3Dgws-wiz-serp is hevc patented or not https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding High Efficiency Video Coding In your FFmpeg configuration : --disable-nonfree Therefore FFmpeg will not be applicable to these codecs . You may test your system by working with .webm , .vp8 , or .vp9 codecs . These are patent-free . I do not know OBS . It is also necessary to check its documentation and configuration whether it ignores non-free codecs or passes them to the used program for handling them . Another point is GPU hardware . If GPU is able to handle patented codecs ( obviously this requires required licenses are available to hardware for GPU ) , then configuration of your FFmpeg and encompassing programs using the FFmpeg can be configured to use GPU supplied facilities . I do not know exactly if FFmpeg has a facility for this case . Please check FFmpeg documentation . Mehmet Erol Sanliturk On Sun, Jan 7, 2024 at 3:46=E2=80=AFAM Mario Marietto wrote: > if VAAPI should be enabled should be defined when I compile OBS ? because > vaapi is enabled in ffmpeg but not in OBS and not in mpv : > > nano /home/marietto/.config/mpv/mpv.conf > > vo=3Dgpu > hwdec=3Dvaapi > > > nano /root/.config/mpv/mpv.conf > > vo=3Dgpu > hwdec=3Dvaapi > > # mpv ciao.mp4 > > (+) Video --vid=3D1 (*) (h264 640x480 25.000fps) > (+) Audio --aid=3D1 (*) (aac 2ch 24000Hz) > Title: ciao.mp4 > AO: [oss] 24000Hz stereo 2ch s32 > VO: [gpu] 640x480 =3D> 640x511 yuv420p > Exiting... (Quit) > > > # ffmpeg -codecs | grep vaapi > > > ffmpeg version 6.1 Copyright (c) 2000-2023 the FFmpeg developers > built with FreeBSD clang version 16.0.6 ( > https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0 > -g7cbf1a259152) > configuration: --prefix=3D/usr/local --mandir=3D/usr/local/man > --datadir=3D/usr/local/share/ffmpeg --doc > dir=3D/usr/local/share/doc/ffmpeg > --pkgconfigdir=3D/usr/local/libdata/pkgconfig --disable-static --disab > le-libcelt --enable-shared --enable-pic --enable-gpl --cc=3Dcc --cxx=3Dc+= + > --disable-alsa --disable-libo > pencore-amrnb --disable-libopencore-amrwb --enable-libaom > --disable-libaribb24 --disable-libaribcapt > ion --enable-asm --enable-libass --disable-libbs2b --disable-libcaca > --disable-libcdio --disable-lib > codec2 --enable-libdav1d --disable-libdavs2 --disable-libdc1394 > --disable-debug --enable-htmlpages - > -enable-libdrm --disable-libfdk-aac --disable-libflite --enable-fontconfi= g > --enable-libfreetype --en > able-frei0r --disable-libfribidi --disable-gcrypt --disable-libglslang > --disable-libgme --enable-gmp > --enable-gnutls --enable-version3 --disable-libgsm --enable-libharfbuzz > --enable-iconv --disable-li > bilbc --disable-libjack --enable-libjxl --disable-libklvanc > --disable-libkvazaar --disable-ladspa -- > enable-libmp3lame --enable-lcms2 --disable-liblensfun --disable-libbluray > --enable-libplacebo --disa > ble-librsvg --disable-librtmp --enable-libxml2 --disable-lv2 > --disable-mbedtls --disable-libmfx --di > sable-libmodplug --disable-libmysofa --enable-network --disable-nonfree > --enable-nvenc --disable-ope > nal --disable-opencl --disable-opengl --disable-libopenh264 > --disable-libopenjpeg --disable-libopenm > pt --disable-openssl --disable-libopenvino --enable-optimizations > --enable-libopus --disable-pockets > phinx --disable-libpulse --disable-librabbitmq --disable-librav1e > --disable-librist --enable-runtime > -cpudetect --disable-librubberband --disable-sdl2 --enable-libshaderc > --disable-libsmbclient --disab > le-libsnappy --disable-sndio --disable-libsoxr --disable-libspeex > --disable-libsrt --disable-libssh > --enable-libsvtav1 --disable-libtensorflow --disable-libtesseract > --disable-libtheora --disable-libt > wolame --disable-libuavs3d --enable-libv4l2 --enable-vaapi > --disable-vapoursynth --enable-vdpau --di > sable-libvidstab --enable-libvmaf --enable-libvorbis > --disable-libvo-amrwbenc --disable-libvpl --ena > ble-libvpx --enable-vulkan --enable-libwebp --enable-libx264 > --enable-libx265 --disable-libxavs2 --e > nable-libxcb --disable-libxvid --disable-outdev=3Dxv --disable-libzimg > --disable-libzmq --disable-libz > vbi > > > libavutil 58. 29.100 / 58. 29.100 > libavcodec 60. 31.102 / 60. 31.102 > libavformat 60. 16.100 / 60. 16.100 > libavdevice 60. 3.100 / 60. 3.100 > libavfilter 9. 12.100 / 9. 12.100 > libswscale 7. 5.100 / 7. 5.100 > libswresample 4. 12.100 / 4. 12.100 > libpostproc 57. 3.100 / 57. 3.100 > > > DEV.L. av1 Alliance for Open Media AV1 (decoders: > libdav1d libaom-av1 av1 av1_cuvi > d) (encoders: libaom-av1 libsvtav1 av1_nvenc av1_vaapi) > > DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 > (decoders: h264 h264_v4l2m2m > h264_cuvid) (encoders: libx264 libx264rgb h264_nvenc h264_v4l2m2m > h264_vaapi) > > DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) > (decoders: hevc hevc_v4l2m2 > m hevc_cuvid) (encoders: libx265 hevc_nvenc hevc_v4l2m2m hevc_vaapi) > > DEVIL. mjpeg Motion JPEG (decoders: mjpeg mjpeg_cuvid) > (encoders: mjpeg mjpeg_vaapi) > > DEV.L. mpeg2video MPEG-2 video (decoders: mpeg2video mpegvideo > mpeg2_v4l2m2m mpeg2_cuvid) > (encoders: mpeg2video mpeg2_vaapi) > > DEV.L. vp8 On2 VP8 (decoders: vp8 vp8_v4l2m2m libvpx > vp8_cuvid) (encoders: libvpx > vp8_v4l2m2m vp8_vaapi) > > DEV.L. vp9 Google VP9 (decoders: vp9 vp9_v4l2m2m > libvpx-vp9 vp9_cuvid) (encoders: > libvpx-vp9 vp9_vaapi) > > On Sun, Jan 7, 2024 at 1:17=E2=80=AFAM Mario Marietto > wrote: > >> Very thanks. >> >> root@marietto:/usr/ports/graphics # glxinfo >> >> https://pastebin.ubuntu.com/p/RryNptHvsk/ >> >> I don't see "Accelerated:'' >> >> On Sat, Jan 6, 2024 at 11:58=E2=80=AFPM Kevin Oberman >> wrote: >> >>> On Sat, Jan 6, 2024 at 9:57=E2=80=AFAM Mario Marietto >>> wrote: >>> >>>> Thanks, >>>> >>>> =D9=84=D9=83=D9=86 =D8=A7=D9=84=D9=85=D8=B9=D9=84=D9=88=D9=85=D8=A7=D8= =AA =D8=A7=D9=84=D8=AA=D9=8A =D9=82=D8=AF=D9=85=D8=AA=D9=87=D8=A7 =D9=84=D9= =8A =D8=B9=D8=A7=D9=85=D8=A9. =D9=85=D8=A7 =D8=B2=D9=84=D8=AA =D9=84=D8=A7 = =D8=A3=D8=B9=D8=B1=D9=81 =D9=85=D8=A7 =D8=A5=D8=B0=D8=A7 =D9=83=D8=A7=D9=86= =D9=84=D8=AF=D9=8A =D8=AE=D8=B7=D8=A3 >>>> =D9=88=D9=85=D8=A7 =D8=A5=D8=B0=D8=A7 =D9=83=D8=A7=D9=86 =D8=A8=D8=A5= =D9=85=D9=83=D8=A7=D9=86=D9=8A =D8=A5=D8=B5=D9=84=D8=A7=D8=AD=D9=87 =D8=A8= =D8=B7=D8=B1=D9=8A=D9=82=D8=A9 =D9=85=D8=A7. >>>> >>>> (but the information that you gave to me is generic. I still don't kno= w >>>> if I have a bug and if I can fix it,in some way). >>>> >>>> On Sat, Jan 6, 2024 at 5:23=E2=80=AFPM Mehmet Erol Sanliturk < >>>> m.e.sanliturk@gmail.com> wrote: >>>> >>>>> >>>>> Perhaps the following pages may be useful : >>>>> >>>>> https://trac.ffmpeg.org/wiki/HWAccelIntro >>>>> >>>>> Another issue about video encoders and decoders is patents . >>>>> >>>>> >>>>> >>>>> https://www.google.com/search?q=3Dis+VAAPI+HEVC+encoding+patented+or+= not&sca_esv=3D596226834&sxsrf=3DAM9HkKnkHnL5dsq45dd5uDNCjL9Olnwl_A%3A170455= 7479981&ei=3Dp3uZZZXGOLbjxc8P9e66mAU&ved=3D0ahUKEwjVtdy4k8mDAxW2cfEDHXW3DlM= Q4dUDCBA&uact=3D5&oq=3Dis+VAAPI+HEVC+encoding+patented+or+not&gs_lp=3DEgxnd= 3Mtd2l6LXNlcnAiJmlzIFZBQVBJIEhFVkMgZW5jb2RpbmcgcGF0ZW50ZWQgb3Igbm90SO6EAVDy= CliigQFwAXgBkAEAmAGiAaAB9xGqAQQwLjE5uAEDyAEA-AEBwgIKEAAYRxjWBBiwA8ICBxAjGLA= CGCfCAggQABgIGB4YDcICCxAAGIAEGIoFGIYDwgIKECEYChigARjDBMICCBAhGKABGMMEwgIFEC= EYoAHCAgQQIRgV4gMEGAAgQYgGAZAGCA&sclient=3Dgws-wiz-serp >>>>> is VAAPI HEVC encoding patented or not >>>>> >>>>> >>>>> https://www.google.com/search?q=3Dis+VAAPI+H264+encoding+patented+or+= not&sca_esv=3D596226834&sxsrf=3DAM9HkKl4fSR7Myk6mZQSftwHYdNbZhnr4Q%3A170455= 7529388&ei=3D2XuZZYKcF8m9xc8Pj6u0OA&ved=3D0ahUKEwjC7KbQk8mDAxXJXvEDHY8VDQcQ= 4dUDCBA&uact=3D5&oq=3Dis+VAAPI+H264+encoding+patented+or+not&gs_lp=3DEgxnd3= Mtd2l6LXNlcnAiJmlzIFZBQVBJIEgyNjQgZW5jb2RpbmcgcGF0ZW50ZWQgb3Igbm90MggQABiAB= BiiBEiP0wZQ5psGWLu5BnADeAGQAQCYAaoBoAGiBqoBAzAuNrgBA8gBAPgBAcICChAAGEcY1gQY= sAPiAwQYACBBiAYBkAYI&sclient=3Dgws-wiz-serp >>>>> is VAAPI H264 encoding patented or not >>>>> >>>>> >>>>> >>>>> Mehmet Erol Sanliturk >>>>> >>>>> >>>>> >>>>> On Sat, Jan 6, 2024 at 5:51=E2=80=AFPM Mario Marietto >>>>> wrote: >>>>> >>>>>> Hello to everyone. >>>>>> >>>>>> I'm using FreeBSD 14.0-p3 with the latest packages and I'm trying to >>>>>> enable the VAAPI H264 / HEVC encoding for obs-studio,but it says tha= t they >>>>>> aren't supported. There may be a bug somewhere ? >>>>>> >>>>>> start-obs : >>>>>> >>>>>> sh << EOF >>>>>> env LD_LIBMAP=3D"`nv-sglrun printenv LD_LIBMAP | grep -v libGL`" obs >>>>>> EOF >>>>>> >>>>>> root@marietto:/compat # ./start-obs >>>>>> shim init >>>>>> >>>>>> info: Using EGL/X11 >>>>>> info: CPU Name: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz >>>>>> info: CPU Speed: 3600.00MHz >>>>>> info: Physical Cores: 8, Logical Cores: 16 >>>>>> info: Physical Memory: 31734MB Total, 19859MB Free >>>>>> info: Kernel Version: FreeBSD 14.0-RELEASE-p3 >>>>>> info: Distribution: FreeBSD "14.0" >>>>>> info: Window System: X11.0, Vendor: The X.Org Foundation, Version: >>>>>> 1.21.1 >>>>>> info: Qt Version: 6.6.1 (runtime), 6.6.1 (compiled) >>>>>> info: Portable mode: false >>>>>> info: OBS 30.0.2 (freebsd) >>>>>> info: --------------------------------- >>>>>> info: --------------------------------- >>>>>> info: audio settings reset: >>>>>> samples per sec: 48000 >>>>>> speakers: 2 >>>>>> max buffering: 960 milliseconds >>>>>> buffering type: dynamically increasing >>>>>> info: --------------------------------- >>>>>> info: Initializing OpenGL... >>>>>> info: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce >>>>>> GTX 1060 3GB/PCIe/SSE2 >>>>>> info: OpenGL loaded successfully, version 3.3.0 NVIDIA 535.146.02, >>>>>> shading language 3.30 NVIDIA via Cg compiler >>>>>> >>>>>> info: --------------------------------- >>>>>> info: video settings reset: >>>>>> base resolution: 1920x1080 >>>>>> output resolution: 1280x720 >>>>>> downscale filter: Bicubic >>>>>> fps: 30/1 >>>>>> format: NV12 >>>>>> YUV mode: Rec. 709/Partial >>>>>> info: NV12 texture support not available >>>>>> info: P010 texture support not available >>>>>> info: Audio monitoring device: >>>>>> name: Default >>>>>> id: default >>>>>> info: --------------------------------- >>>>>> info: [pipewire] No captures available >>>>>> warning: v4l2loopback not installed, virtual camera disabled >>>>>> info: NVENC supported >>>>>> >>>>>> >>>>>> *info: FFmpeg VAAPI H264 encoding not supported info: FFmpeg VAAPI >>>>>> HEVC encoding not supported* >>>>>> >>>>>> info: [obs-websocket] [obs_module_load] you can haz websockets >>>>>> (Version: 5.0.1 | RPC Version: 1) >>>>>> info: [obs-websocket] [obs_module_load] Qt version (compile-time): >>>>>> 6.6.1 | Qt version (run-time): 6.6.1 >>>>>> info: [obs-websocket] [obs_module_load] Linked ASIO Version: 101201 >>>>>> info: [obs-websocket] [obs_module_load] Module loaded. >>>>>> info: [vlc-video]: VLC 3.0.20 Vetinari found, VLC video source enabl= ed >>>>>> info: --------------------------------- >>>>>> info: Loaded Modules: >>>>>> info: vlc-video.so >>>>>> info: text-freetype2.so >>>>>> info: sndio.so >>>>>> info: rtmp-services.so >>>>>> info: oss-audio.so >>>>>> info: obs-x264.so >>>>>> info: obs-websocket.so >>>>>> info: obs-webrtc.so >>>>>> info: obs-transitions.so >>>>>> info: obs-outputs.so >>>>>> info: obs-filters.so >>>>>> info: obs-ffmpeg.so >>>>>> info: linux-v4l2.so >>>>>> info: linux-pulseaudio.so >>>>>> info: linux-pipewire.so >>>>>> info: linux-jack.so >>>>>> info: linux-capture.so >>>>>> info: image-source.so >>>>>> info: frontend-tools.so >>>>>> info: --------------------------------- >>>>>> info: =3D=3D=3D=3D Startup complete >>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>>> info: All scene data cleared >>>>>> info: ------------------------------------------------ >>>>>> info: Switched to scene 'Scene' >>>>>> info: ------------------------------------------------ >>>>>> info: Loaded scenes: >>>>>> info: - scene 'Scene': >>>>>> info: ------------------------------------------------ >>>>>> info: =3D=3D=3D=3D Shutting down >>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>>>> info: All scene data cleared >>>>>> info: ------------------------------------------------ >>>>>> info: [obs-websocket] [obs_module_unload] Shutting down... >>>>>> error: Tried to call obs_frontend_remove_event_callback with no >>>>>> callbacks! >>>>>> error: Tried to call obs_frontend_get_global_config with no callback= s! >>>>>> error: [obs-websocket] [Config::Save] Unable to fetch OBS config! >>>>>> info: [obs-websocket] [obs_module_unload] Finished shutting down. >>>>>> info: [Scripting] Total detached callbacks: 0 >>>>>> info: Freeing OBS context data >>>>>> info: =3D=3D Profiler Results =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>>> info: run_program_init: 663.636 ms >>>>>> info: =E2=94=A3OBSApp::AppInit: 3.125 ms >>>>>> info: =E2=94=83 =E2=94=97OBSApp::InitLocale: 0.784 ms >>>>>> info: =E2=94=97OBSApp::OBSInit: 626.884 ms >>>>>> info: =E2=94=A3obs_startup: 1.247 ms >>>>>> info: =E2=94=97OBSBasic::OBSInit: 598.145 ms >>>>>> info: =E2=94=A3OBSBasic::InitBasicConfig: 0.085 ms >>>>>> info: =E2=94=A3OBSBasic::ResetAudio: 0.149 ms >>>>>> info: =E2=94=A3OBSBasic::ResetVideo: 92.565 ms >>>>>> info: =E2=94=83 =E2=94=97obs_init_graphics: 92.317 ms >>>>>> info: =E2=94=83 =E2=94=97shader compilation: 22.654 ms >>>>>> info: =E2=94=A3OBSBasic::InitOBSCallbacks: 0.005 ms >>>>>> info: =E2=94=A3OBSBasic::InitHotkeys: 0.022 ms >>>>>> info: =E2=94=A3obs_load_all_modules2: 365.069 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(frontend-tools.so): 27.908 = ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(image-source.so): 0.009 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(linux-capture.so): 0.374 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(linux-jack.so): 0.004 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(linux-pipewire.so): 3.652 m= s >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(linux-pulseaudio.so): 0.003= ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(linux-v4l2.so): 0.856 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(obs-ffmpeg.so): 5.617 ms >>>>>> info: =E2=94=83 =E2=94=83 =E2=94=97nvenc_check: 5.362 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(obs-filters.so): 0.029 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(obs-outputs.so): 0.007 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(obs-transitions.so): 0.009 = ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(obs-webrtc.so): 0.029 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(obs-websocket.so): 4.649 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(obs-x264.so): 0.003 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(oss-audio.so): 0.004 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(rtmp-services.so): 0.993 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(sndio.so): 0.005 ms >>>>>> info: =E2=94=83 =E2=94=A3obs_init_module(text-freetype2.so): 0.035 m= s >>>>>> info: =E2=94=83 =E2=94=97obs_init_module(vlc-video.so): 0.635 ms >>>>>> info: =E2=94=A3OBSBasic::InitService: 0.773 ms >>>>>> info: =E2=94=A3OBSBasic::ResetOutputs: 0.509 ms >>>>>> info: =E2=94=A3OBSBasic::CreateHotkeys: 0.026 ms >>>>>> info: =E2=94=A3OBSBasic::InitPrimitives: 0.162 ms >>>>>> info: =E2=94=97OBSBasic::Load: 67.014 ms >>>>>> info: obs_hotkey_thread(25 ms): min=3D0.03 ms, median=3D0.17 ms, >>>>>> max=3D10.834 ms, 99th percentile=3D8.279 ms >>>>>> , 100% below 25 ms >>>>>> info: audio_thread(Audio): min=3D0.005 ms, median=3D0.036 ms, max=3D= 0.149 >>>>>> ms, 99th percentile=3D0.101 ms >>>>>> info: obs_graphics_thread(33.3333 ms): min=3D0.084 ms, median=3D0.98= 7 ms, >>>>>> max=3D22.184 ms, 99th percentile >>>>>> =3D22.184 ms, 100% below 33.333 ms >>>>>> info: =E2=94=A3tick_sources: min=3D0.001 ms, median=3D0.009 ms, max= =3D0.658 ms, >>>>>> 99th percentile=3D0.658 ms >>>>>> info: =E2=94=A3output_frame: min=3D0.041 ms, median=3D0.212 ms, max= =3D8.411 ms, >>>>>> 99th percentile=3D8.411 ms >>>>>> info: =E2=94=83 =E2=94=97gs_context(video->graphics): min=3D0.04 ms,= median=3D0.211 ms, >>>>>> max=3D8.41 ms, 99th percentile=3D8. >>>>>> 41 ms >>>>>> info: =E2=94=83 =E2=94=A3render_video: min=3D0.02 ms, median=3D0.125= ms, max=3D8.379 ms, >>>>>> 99th percentile=3D8.379 ms >>>>>> info: =E2=94=83 =E2=94=83 =E2=94=97render_main_texture: min=3D0.015 = ms, median=3D0.098 ms, >>>>>> max=3D8.356 ms, 99th percentile=3D8.35 >>>>>> 6 ms >>>>>> info: =E2=94=83 =E2=94=97gs_flush: min=3D0.003 ms, median=3D0.018 ms= , max=3D7.648 ms, 99th >>>>>> percentile=3D7.648 ms >>>>>> info: =E2=94=97render_displays: min=3D0.009 ms, median=3D0.603 ms, m= ax=3D22.032 ms, >>>>>> 99th percentile=3D22.032 ms >>>>>> info: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >>>>>> info: =3D=3D Profiler Time Between Calls =3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>>> info: obs_hotkey_thread(25 ms): min=3D25.037 ms, median=3D25.19 ms, >>>>>> max=3D65.219 ms, 91.0569% within =C2=B12% o >>>>>> f 25 ms (0% lower, 8.94309% higher) >>>>>> info: obs_graphics_thread(33.3333 ms): min=3D12.188 ms, median=3D33.= 322 >>>>>> ms, max=3D52.604 ms, 78.8889% with >>>>>> in =C2=B12% of 33.333 ms (10% lower, 11.1111% higher) >>>>>> info: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >>>>>> info: Number of memory leaks: 0 >>>>>> >>>>>> >>>>>> * but the vaapi codecs are recognized correctly :* >>>>>> >>>>>> >>>>>> # ffmpeg -codecs | grep vaapi >>>>>> >>>>>> ffmpeg version 6.1 Copyright (c) 2000-2023 the FFmpeg developers >>>>>> built with FreeBSD clang version 16.0.6 ( >>>>>> https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0 >>>>>> -g7cbf1a259152) >>>>>> >>>>>> configuration: --prefix=3D/usr/local --mandir=3D/usr/local/man >>>>>> --datadir=3D/usr/local/share/ffmpeg --doc >>>>>> dir=3D/usr/local/share/doc/ffmpeg >>>>>> --pkgconfigdir=3D/usr/local/libdata/pkgconfig --disable-static --dis= ab >>>>>> le-libcelt --enable-shared --enable-pic --enable-gpl --cc=3Dcc >>>>>> --cxx=3Dc++ --disable-alsa --disable-libo >>>>>> pencore-amrnb --disable-libopencore-amrwb --enable-libaom >>>>>> --disable-libaribb24 --disable-libaribcapt >>>>>> ion --enable-asm --enable-libass --disable-libbs2b --disable-libcaca >>>>>> --disable-libcdio --disable-lib >>>>>> codec2 --enable-libdav1d --disable-libdavs2 --disable-libdc1394 >>>>>> --disable-debug --enable-htmlpages - >>>>>> -enable-libdrm --disable-libfdk-aac --disable-libflite >>>>>> --enable-fontconfig --enable-libfreetype --en >>>>>> able-frei0r --disable-libfribidi --disable-gcrypt >>>>>> --disable-libglslang --disable-libgme --enable-gmp >>>>>> --enable-gnutls --enable-version3 --disable-libgsm >>>>>> --enable-libharfbuzz --enable-iconv --disable-li >>>>>> bilbc --disable-libjack --enable-libjxl --disable-libklvanc >>>>>> --disable-libkvazaar --disable-ladspa -- >>>>>> enable-libmp3lame --enable-lcms2 --disable-liblensfun >>>>>> --disable-libbluray --enable-libplacebo --disa >>>>>> ble-librsvg --disable-librtmp --enable-libxml2 --disable-lv2 >>>>>> --disable-mbedtls --disable-libmfx --di >>>>>> sable-libmodplug --disable-libmysofa --enable-network >>>>>> --disable-nonfree --enable-nvenc --disable-ope >>>>>> nal --disable-opencl --disable-opengl --disable-libopenh264 >>>>>> --disable-libopenjpeg --disable-libopenm >>>>>> pt --disable-openssl --disable-libopenvino --enable-optimizations >>>>>> --enable-libopus --disable-pockets >>>>>> phinx --disable-libpulse --disable-librabbitmq --disable-librav1e >>>>>> --disable-librist --enable-runtime >>>>>> -cpudetect --disable-librubberband --disable-sdl2 --enable-libshader= c >>>>>> --disable-libsmbclient --disab >>>>>> le-libsnappy --disable-sndio --disable-libsoxr --disable-libspeex >>>>>> --disable-libsrt --disable-libssh >>>>>> --enable-libsvtav1 --disable-libtensorflow --disable-libtesseract >>>>>> --disable-libtheora --disable-libt >>>>>> wolame --disable-libuavs3d --enable-libv4l2 --enable-vaapi >>>>>> --disable-vapoursynth --enable-vdpau --di >>>>>> sable-libvidstab --enable-libvmaf --enable-libvorbis >>>>>> --disable-libvo-amrwbenc --disable-libvpl --ena >>>>>> ble-libvpx --enable-vulkan --enable-libwebp --enable-libx264 >>>>>> --enable-libx265 --disable-libxavs2 --e >>>>>> nable-libxcb --disable-libxvid --disable-outdev=3Dxv --disable-libzi= mg >>>>>> --disable-libzmq --disable-libz >>>>>> vbi >>>>>> libavutil 58. 29.100 / 58. 29.100 >>>>>> libavcodec 60. 31.102 / 60. 31.102 >>>>>> libavformat 60. 16.100 / 60. 16.100 >>>>>> libavdevice 60. 3.100 / 60. 3.100 >>>>>> libavfilter 9. 12.100 / 9. 12.100 >>>>>> libswscale 7. 5.100 / 7. 5.100 >>>>>> libswresample 4. 12.100 / 4. 12.100 >>>>>> libpostproc 57. 3.100 / 57. 3.100 >>>>>> >>>>>> DEV.L. av1 Alliance for Open Media AV1 (decoders: libdav1d libaom-av= 1 >>>>>> av1 av1_cuvi >>>>>> d) (encoders: libaom-av1 libsvtav1 av1_nvenc av1_vaapi) >>>>>> DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: >>>>>> h264 h264_v4l2m2m >>>>>> h264_cuvid) (encoders: libx264 libx264rgb h264_nvenc h264_v4l2m2m >>>>>> h264_vaapi) >>>>>> DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (decoders: >>>>>> hevc hevc_v4l2m2 >>>>>> m hevc_cuvid) (encoders: libx265 hevc_nvenc hevc_v4l2m2m hevc_vaapi) >>>>>> DEVIL. mjpeg Motion JPEG (decoders: mjpeg mjpeg_cuvid) (encoders: >>>>>> mjpeg mjpeg_vaapi) >>>>>> DEV.L. mpeg2video MPEG-2 video (decoders: mpeg2video mpegvideo >>>>>> mpeg2_v4l2m2m mpeg2_cuvid) >>>>>> (encoders: mpeg2video mpeg2_vaapi) >>>>>> DEV.L. vp8 On2 VP8 (decoders: vp8 vp8_v4l2m2m libvpx vp8_cuvid) >>>>>> (encoders: libvpx >>>>>> vp8_v4l2m2m vp8_vaapi) >>>>>> DEV.L. vp9 Google VP9 (decoders: vp9 vp9_v4l2m2m libvpx-vp9 >>>>>> vp9_cuvid) (encoders: >>>>>> libvpx-vp9 vp9_vaapi) >>>>>> >>>>>> -- >>>>>> Mario. >>>>>> >>>>> >>>> >>>> -- >>>> Mario. >>>> >>> First, VAAPI is not a codec. It is Video Acceleration-API and is >>> supported by some tools directly, but most often using Mesa or >>> libva-VADPAU. Without VA-API support, the graphics will be handled by t= he >>> CPU, not the GPU. Both H.264 (AVC) nd H.265 (HVEC) are supported by VAA= PI. >>> >>> Are you building ffmpeg from source or installing a package? Patented >>> ports need to be built "NONFREE=3Don" for patented codecs. I am not sur= e what >>> options the ffmpeg package is built with. >>> >>> Are you sure that Video Acceleration is working on your GPU? I have an >>> Alder Lake Intel GPU and, as of last week, the device in FreeBSD's driv= ers. >>> (New GPU firmware was added this week, but I have yet to try it to conf= irm >>> whether it fixes the issue.) Easy check is to play a high res (780 or >>> higher) video. If you have VA-API working, CPU usage will not change mu= ch. >>> With VA-API support, it will increase significantly. More accurate chec= k is >>> to install graphics/xdpiinfo and run it (no args) or graphics/glx-util= s >>> and run "glxinfo into a pager (more, less, or most). glxinfo is quite >>> verbose. You want to look for "Accelerated:'' about 50 lines from the t= op. >>> >>> I am not an expert on all of this, but I've learned a bit trying to get >>> my Alder Lake work properly on FreeBSD. >>> -- >>> Kevin Oberman, Part time kid herder and retired Network Engineer >>> E-mail: rkoberman@gmail.com >>> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 >>> >> >> >> -- >> Mario. >> > > > -- > Mario. > --000000000000e81553060e540d8c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


H264 and HEVC are patented and r= equire a license to use them :

=
In your FFmpeg configuration :

--disabl= e-nonfree


Therefore FFmpeg will not be a= pplicable to these codecs .


You may test you= r system by working with=C2=A0=C2=A0 .webm , .vp8 , or .vp9=C2=A0 codecs . = These are patent-free .


I do not know OBS . = It is also necessary to check its documentation and configuration whether= =C2=A0
it ignores non-free codecs=C2=A0 or passes them to the u= sed program for handling them .

Another point is GPU= hardware . If GPU is able to handle patented codecs ( obviously this requi= res required
licenses are available to hardware for GPU ) , the= n configuration of your FFmpeg and encompassing programs
using = the FFmpeg can be configured to use GPU supplied facilities .
I do n= ot know exactly if FFmpeg has a facility for this case . Please check FFmpe= g documentation .


Mehmet Erol Sanliturk
<= /div>




On Sun, Jan 7, 2024 at 3:46=E2=80=AFAM Mar= io Marietto <marietto2008@gmai= l.com> wrote:
if VAAPI should be enabled should be defined whe= n I compile OBS ? because vaapi is enabled in ffmpeg but not in OBS and not= in mpv :

nano /home/marietto/.config/mpv/mpv.conf=
=09 =09
vo=3Dgpu
hwdec=3Dvaapi

=09 =09
nano /root/.config/mpv/mpv.conf
vo=3Dgpu
hwdec=3Dvaapi
# mpv ciao.mp4

(+) Video --vid=3D1 (*) (h264 640x480 25.000fps)
(+) Audio --aid=3D1 (*) (aac 2ch 24000Hz)
Title: ciao.mp4
AO: [oss] 24000Hz stereo 2ch s32
VO: [gpu] 640x480 =3D> 640x511 yuv420p
Exiting... (Quit)

# ffmpeg -codecs |= grep vaapi


<= span style=3D"font-family:monospace">ffmpeg version 6.1 Copyright (c) 2000-= 2023 the FFmpeg developers
=C2=A0built with FreeBSD clang version 16.0.6 (https://github.com/llvm/llv= m-project.git llvmorg-16.0.6-0
-g7cbf1a259152)
=C2=A0configuration: --prefix=3D/usr/local --mandir=3D/usr/local/man -= -datadir=3D/usr/local/share/ffmpeg --doc
dir=3D/usr/local/share/doc/ffmp= eg --pkgconfigdir=3D/usr/local/libdata/pkgconfig --disable-static --disable-libcelt --enable-shared --enable-pic --enable-gpl --cc=3Dcc --cxx=3Dc+= + --disable-alsa --disable-libo
pencore-amrnb --disable-libopencore-amrw= b --enable-libaom --disable-libaribb24 --disable-libaribcapt
ion --enabl= e-asm --enable-libass --disable-libbs2b --disable-libcaca --disable-libcdio= --disable-lib
codec2 --enable-libdav1d --disable-libdavs2 --disable-lib= dc1394 --disable-debug --enable-htmlpages -
-enable-libdrm --disable-lib= fdk-aac --disable-libflite --enable-fontconfig --enable-libfreetype --enable-frei0r --disable-libfribidi --disable-gcrypt --disable-libglslang --d= isable-libgme --enable-gmp
--enable-gnutls --enable-version3 --disable-= libgsm --enable-libharfbuzz --enable-iconv --disable-li
bilbc --disable-= libjack --enable-libjxl --disable-libklvanc --disable-libkvazaar --disable-= ladspa --
enable-libmp3lame --enable-lcms2 --disable-liblensfun --disabl= e-libbluray --enable-libplacebo --disa
ble-librsvg --disable-librtmp --e= nable-libxml2 --disable-lv2 --disable-mbedtls --disable-libmfx --di
sabl= e-libmodplug --disable-libmysofa --enable-network --disable-nonfree --enabl= e-nvenc --disable-ope
nal --disable-opencl --disable-opengl --disable-li= bopenh264 --disable-libopenjpeg --disable-libopenm
pt --disable-openssl = --disable-libopenvino --enable-optimizations --enable-libopus --disable-poc= kets
phinx --disable-libpulse --disable-librabbitmq --disable-librav1e -= -disable-librist --enable-runtime
-cpudetect --disable-librubberband --d= isable-sdl2 --enable-libshaderc --disable-libsmbclient --disab
le-libsna= ppy --disable-sndio --disable-libsoxr --disable-libspeex --disable-libsrt -= -disable-libssh
--enable-libsvtav1 --disable-libtensorflow --disable-li= btesseract --disable-libtheora --disable-libt
wolame --disable-libuavs3d= --enable-libv4l2 --enable-vaapi --disable-vapoursynth --enable-vdpau --di<= br>sable-libvidstab --enable-libvmaf --enable-libvorbis --disable-libvo-amr= wbenc --disable-libvpl --ena
ble-libvpx --enable-vulkan --enable-libwebp= --enable-libx264 --enable-libx265 --disable-libxavs2 --e
nable-libxcb -= -disable-libxvid --disable-outdev=3Dxv --disable-libzimg --disable-libzmq -= -disable-libz
vbi


=C2=A0libavutil =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A058. 29.100 / 58. 29.100
=C2=A0libavcodec =C2=A0=C2=A0=C2=A0=C2=A060. 31.102 / 60. 31.102
=C2=A0libavformat =C2=A0=C2=A0=C2=A060. 16.100 / 60. 16.100
=C2=A0libavdevice =C2=A0=C2=A0=C2=A060. =C2=A03.100 / 60. =C2=A03.100
=C2=A0libavfilter =C2=A0=C2=A0=C2=A0=C2=A09. 12.100 / =C2=A09. 12.100
=C2=A0libswscale =C2=A0=C2=A0=C2=A0=C2=A0=C2=A07. =C2=A05.100 / =C2=A0= 7. =C2=A05.100
=C2=A0libswresample =C2=A0=C2=A04. 12.100 / =C2=A04. 12.100
=C2=A0libpostproc =C2=A0=C2=A0=C2=A057. =C2=A03.100 / 57. =C2=A03.100 =


DEV.L. av1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Allian= ce for Open Media AV1 (decoders: libdav1d libaom-av1 av1 av1_cuvi
d) (en= coders: libaom-av1 libsvtav1 av1_nvenc av1_vaapi)

DEV.LS h264 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0H.264 / AVC / MPEG-4 = AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m
h264_cuvid) (encoders= : libx264 libx264rgb h264_nvenc h264_v4l2m2m h264_vaapi)

DEV.L. hevc =C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0H.265 / HEVC (High Efficiency Video Coding) (decoders: hevc hevc_v4l2= m2
m hevc_cuvid) (encoders: libx265 hevc_nvenc hevc_v4l2m2m hevc_vaapi)

DEVIL. mjpeg =C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Motion JPEG (decoders: mjpeg mjpeg_cuvid) (encoders: mjpeg mjpeg_vaapi)

DEV.L. mpeg2video =C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0MPEG-2 video (decoders: = mpeg2video mpegvideo mpeg2_v4l2m2m mpeg2_cuvid)
(encoders: mpeg2video m= peg2_vaapi)

DEV.L. vp8 =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0On2 VP8 (decoders: vp8 vp8_v4l2m2m libvpx vp8_cuvid) (encoders: li= bvpx
vp8_v4l2m2m vp8_vaapi)

DEV.L. vp9 =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Google VP9 (decoders: vp9 vp9_v4l2m2m libvpx-vp9 vp9_cuvid) (encod= ers:
libvpx-vp9 vp9_vaapi)

On Sun, Jan 7, 2024 at 1:17= =E2=80=AFAM Mario Marietto <marietto2008@gmail.com> wrote:
Very thanks.

root@mariett=
o:/usr/ports/graphics # glxinfo

I don't see "Accel= erated:''

On Sat, Jan 6, 2024 at 11:58=E2=80=AFPM Kevin Oberma= n <rkoberman@gm= ail.com> wrote:
On Sat, Jan 6, 2024 at 9= :57=E2=80=AFAM Mario Marietto <marietto2008@gmail.com> wrote:
Thanks,

=D9=84=D9=83=D9=86 =D8=A7= =D9=84=D9=85=D8=B9=D9=84=D9=88=D9=85=D8=A7=D8=AA =D8=A7=D9=84=D8=AA=D9=8A = =D9=82=D8=AF=D9=85=D8=AA=D9=87=D8=A7 =D9=84=D9=8A =D8=B9=D8=A7=D9=85=D8=A9.= =D9=85=D8=A7 =D8=B2=D9=84=D8=AA =D9=84=D8=A7 =D8=A3=D8=B9=D8=B1=D9=81 =D9= =85=D8=A7 =D8=A5=D8=B0=D8=A7 =D9=83=D8=A7=D9=86 =D9=84=D8=AF=D9=8A =D8=AE= =D8=B7=D8=A3 =D9=88=D9=85=D8=A7 =D8=A5=D8=B0=D8=A7 =D9=83=D8=A7=D9=86 =D8= =A8=D8=A5=D9=85=D9=83=D8=A7=D9=86=D9=8A =D8=A5=D8=B5=D9=84=D8=A7=D8=AD=D9= =87 =D8=A8=D8=B7=D8=B1=D9=8A=D9=82=D8=A9 =D9=85=D8=A7.

=
(but the information that you gave to me is generic. I still don't= know if I have a bug and if I can fix it,in some way).

=
On Sat, Jan 6, 2024 at 5:51=E2=80= =AFPM Mario Marietto <marietto2008@gmail.com> wrote:
Hello to everyone.<= /div>

I'm using FreeBSD 14.0-p3 with the latest pack= ages and I'm trying to enable the VAAPI H264 / HEVC encoding for obs-st= udio,but it says that they aren't supported. There may be a bug somewhe= re ?

start-obs :

sh << EOF
env LD_LIBMAP=3D"`nv-sglrun printenv LD_LIBMAP | grep -v libGL`" = obs
EOF

root@marietto:/compat # ./start-obs
shim init

info: Using EGL/X11
info: CPU Name: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
info: CPU Speed: 3600.00MHz
info: Physical Cores: 8, Logical Cores: 16
info: Physical Memory: 31734MB Total, 19859MB Free
info: Kernel Version: FreeBSD 14.0-RELEASE-p3
info: Distribution: FreeBSD "14.0"
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1 info: Qt Version: 6.6.1 (runtime), 6.6.1 (compiled)
info: Portable mode: false
info: OBS 30.0.2 (freebsd)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
samples per sec: 48000
speakers: 2
max buffering: 960 milliseconds
buffering type: dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce GTX 10= 60 3GB/PCIe/SSE2
info: OpenGL loaded successfully, version 3.3.0 NVIDIA 535.146.02, shading = language 3.30 NVIDIA via Cg compiler

info: ---------------------------------
info: video settings reset:
base resolution: 1920x1080
output resolution: 1280x720
downscale filter: Bicubic
fps: 30/1
format: NV12
YUV mode: Rec. 709/Partial
info: NV12 texture support not available
info: P010 texture support not available
info: Audio monitoring device:
name: Default
id: default
info: ---------------------------------
info: [pipewire] No captures available
warning: v4l2loopback not installed, virtual camera disabled
info: NVENC supported

info: FFmpeg VAAPI H264 encoding not supported
info: FFmpeg VAAPI HEVC encoding not supported


info: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.= 0.1 | RPC Version: 1)
info: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.6.1 | = Qt version (run-time): 6.6.1
info: [obs-websocket] [obs_module_load] Linked ASIO Version: 101201
info: [obs-websocket] [obs_module_load] Module loaded.
info: [vlc-video]: VLC 3.0.20 Vetinari found, VLC video source enabled
info: ---------------------------------
info: Loaded Modules:
info: vlc-video.so
info: text-freetype2.so
info: sndio.so
info: rtmp-services.so
info: oss-audio.so
info: obs-x264.so
info: obs-websocket.so
info: obs-webrtc.so
info: obs-transitions.so
info: obs-outputs.so
info: obs-filters.so
info: obs-ffmpeg.so
info: linux-v4l2.so
info: linux-pulseaudio.so
info: linux-pipewire.so
info: linux-jack.so
info: linux-capture.so
info: image-source.so
info: frontend-tools.so
info: ---------------------------------
info: =3D=3D=3D=3D Startup complete =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D
info: All scene data cleared
info: ------------------------------------------------
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info: ------------------------------------------------
info: =3D=3D=3D=3D Shutting down =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
info: All scene data cleared
info: ------------------------------------------------
info: [obs-websocket] [obs_module_unload] Shutting down...
error: Tried to call obs_frontend_remove_event_callback with no callbacks!<= br> error: Tried to call obs_frontend_get_global_config with no callbacks!
error: [obs-websocket] [Config::Save] Unable to fetch OBS config!
info: [obs-websocket] [obs_module_unload] Finished shutting down.
info: [Scripting] Total detached callbacks: 0
info: Freeing OBS context data
info: =3D=3D Profiler Results =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
info: run_program_init: 663.636 ms
info: =E2=94=A3OBSApp::AppInit: 3.125 ms
info: =E2=94=83 =E2=94=97OBSApp::InitLocale: 0.784 ms
info: =E2=94=97OBSApp::OBSInit: 626.884 ms
info: =E2=94=A3obs_startup: 1.247 ms
info: =E2=94=97OBSBasic::OBSInit: 598.145 ms
info: =E2=94=A3OBSBasic::InitBasicConfig: 0.085 ms
info: =E2=94=A3OBSBasic::ResetAudio: 0.149 ms
info: =E2=94=A3OBSBasic::ResetVideo: 92.565 ms
info: =E2=94=83 =E2=94=97obs_init_graphics: 92.317 ms
info: =E2=94=83 =E2=94=97shader compilation: 22.654 ms
info: =E2=94=A3OBSBasic::InitOBSCallbacks: 0.005 ms
info: =E2=94=A3OBSBasic::InitHotkeys: 0.022 ms
info: =E2=94=A3obs_load_all_modules2: 365.069 ms
info: =E2=94=83 =E2=94=A3obs_init_module(frontend-tools.so): 27.908 ms=
info: =E2=94=83 =E2=94=A3obs_init_module(image-source.so): 0.009 ms info: =E2=94=83 =E2=94=A3obs_init_module(linux-capture.so): 0.374 ms info: =E2=94=83 =E2=94=A3obs_init_module(linux-jack.so): 0.004 ms
info: =E2=94=83 =E2=94=A3obs_init_module(linux-pipewire.so): 3.652 ms<= br> info: =E2=94=83 =E2=94=A3obs_init_module(linux-pulseaudio.so): 0.003 m= s
info: =E2=94=83 =E2=94=A3obs_init_module(linux-v4l2.so): 0.856 ms
info: =E2=94=83 =E2=94=A3obs_init_module(obs-ffmpeg.so): 5.617 ms
info: =E2=94=83 =E2=94=83 =E2=94=97nvenc_check: 5.362 ms
info: =E2=94=83 =E2=94=A3obs_init_module(obs-filters.so): 0.029 ms
info: =E2=94=83 =E2=94=A3obs_init_module(obs-outputs.so): 0.007 ms
info: =E2=94=83 =E2=94=A3obs_init_module(obs-transitions.so): 0.009 ms=
info: =E2=94=83 =E2=94=A3obs_init_module(obs-webrtc.so): 0.029 ms
info: =E2=94=83 =E2=94=A3obs_init_module(obs-websocket.so): 4.649 ms info: =E2=94=83 =E2=94=A3obs_init_module(obs-x264.so): 0.003 ms
info: =E2=94=83 =E2=94=A3obs_init_module(oss-audio.so): 0.004 ms
info: =E2=94=83 =E2=94=A3obs_init_module(rtmp-services.so): 0.993 ms info: =E2=94=83 =E2=94=A3obs_init_module(sndio.so): 0.005 ms
info: =E2=94=83 =E2=94=A3obs_init_module(text-freetype2.so): 0.035 ms<= br> info: =E2=94=83 =E2=94=97obs_init_module(vlc-video.so): 0.635 ms
info: =E2=94=A3OBSBasic::InitService: 0.773 ms
info: =E2=94=A3OBSBasic::ResetOutputs: 0.509 ms
info: =E2=94=A3OBSBasic::CreateHotkeys: 0.026 ms
info: =E2=94=A3OBSBasic::InitPrimitives: 0.162 ms
info: =E2=94=97OBSBasic::Load: 67.014 ms
info: obs_hotkey_thread(25 ms): min=3D0.03 ms, median=3D0.17 ms, max=3D10.8= 34 ms, 99th percentile=3D8.279 ms
, 100% below 25 ms
info: audio_thread(Audio): min=3D0.005 ms, median=3D0.036 ms, max=3D0.149 m= s, 99th percentile=3D0.101 ms
info: obs_graphics_thread(33.3333 ms): min=3D0.084 ms, median=3D0.987 ms, m= ax=3D22.184 ms, 99th percentile
=3D22.184 ms, 100% below 33.333 ms
info: =E2=94=A3tick_sources: min=3D0.001 ms, median=3D0.009 ms, max=3D0.65= 8 ms, 99th percentile=3D0.658 ms
info: =E2=94=A3output_frame: min=3D0.041 ms, median=3D0.212 ms, max=3D8.41= 1 ms, 99th percentile=3D8.411 ms
info: =E2=94=83 =E2=94=97gs_context(video->graphics): min=3D0.04 ms, me= dian=3D0.211 ms, max=3D8.41 ms, 99th percentile=3D8.
41 ms
info: =E2=94=83 =E2=94=A3render_video: min=3D0.02 ms, median=3D0.125 ms,= max=3D8.379 ms, 99th percentile=3D8.379 ms
info: =E2=94=83 =E2=94=83 =E2=94=97render_main_texture: min=3D0.015 ms, = median=3D0.098 ms, max=3D8.356 ms, 99th percentile=3D8.35
6 ms
info: =E2=94=83 =E2=94=97gs_flush: min=3D0.003 ms, median=3D0.018 ms, ma= x=3D7.648 ms, 99th percentile=3D7.648 ms
info: =E2=94=97render_displays: min=3D0.009 ms, median=3D0.603 ms, max=3D2= 2.032 ms, 99th percentile=3D22.032 ms
info: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D
info: =3D=3D Profiler Time Between Calls =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D
info: obs_hotkey_thread(25 ms): min=3D25.037 ms, median=3D25.19 ms, max=3D6= 5.219 ms, 91.0569% within =C2=B12% o
f 25 ms (0% lower, 8.94309% higher)
info: obs_graphics_thread(33.3333 ms): min=3D12.188 ms, median=3D33.322 ms,= max=3D52.604 ms, 78.8889% with
in =C2=B12% of 33.333 ms (10% lower, 11.1111% higher)
info: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D
info: Number of memory leaks: 0


but the vaapi codecs are recognized correctly :


# ffmpeg -codecs | grep vaapi

ffmpeg version 6.1 Copyright (c) 2000-2023 the FFmpeg developers
built with FreeBSD clang version 16.0.6 (https:= //github.com/llvm/llvm-project.git llvmorg-16.0.6-0
-g7cbf1a259152)

configuration: --prefix=3D/usr/local --mandir=3D/usr/local/man --datadir= =3D/usr/local/share/ffmpeg --doc
dir=3D/usr/local/share/doc/ffmpeg --pkgconfigdir=3D/usr/local/libdata/pkgco= nfig --disable-static --disab
le-libcelt --enable-shared --enable-pic --enable-gpl --cc=3Dcc --cxx=3Dc++ = --disable-alsa --disable-libo
pencore-amrnb --disable-libopencore-amrwb --enable-libaom --disable-libarib= b24 --disable-libaribcapt
ion --enable-asm --enable-libass --disable-libbs2b --disable-libcaca --disa= ble-libcdio --disable-lib
codec2 --enable-libdav1d --disable-libdavs2 --disable-libdc1394 --disable-d= ebug --enable-htmlpages -
-enable-libdrm --disable-libfdk-aac --disable-libflite --enable-fontconfig = --enable-libfreetype --en
able-frei0r --disable-libfribidi --disable-gcrypt --disable-libglslang --di= sable-libgme --enable-gmp
--enable-gnutls --enable-version3 --disable-libgsm --enable-libharfbuzz --= enable-iconv --disable-li
bilbc --disable-libjack --enable-libjxl --disable-libklvanc --disable-libkv= azaar --disable-ladspa --
enable-libmp3lame --enable-lcms2 --disable-liblensfun --disable-libbluray -= -enable-libplacebo --disa
ble-librsvg --disable-librtmp --enable-libxml2 --disable-lv2 --disable-mbed= tls --disable-libmfx --di
sable-libmodplug --disable-libmysofa --enable-network --disable-nonfree --e= nable-nvenc --disable-ope
nal --disable-opencl --disable-opengl --disable-libopenh264 --disable-libop= enjpeg --disable-libopenm
pt --disable-openssl --disable-libopenvino --enable-optimizations --enable-= libopus --disable-pockets
phinx --disable-libpulse --disable-librabbitmq --disable-librav1e --disable= -librist --enable-runtime
-cpudetect --disable-librubberband --disable-sdl2 --enable-libshaderc --dis= able-libsmbclient --disab
le-libsnappy --disable-sndio --disable-libsoxr --disable-libspeex --disable= -libsrt --disable-libssh
--enable-libsvtav1 --disable-libtensorflow --disable-libtesseract --disable= -libtheora --disable-libt
wolame --disable-libuavs3d --enable-libv4l2 --enable-vaapi --disable-vapour= synth --enable-vdpau --di
sable-libvidstab --enable-libvmaf --enable-libvorbis --disable-libvo-amrwbe= nc --disable-libvpl --ena
ble-libvpx --enable-vulkan --enable-libwebp --enable-libx264 --enable-libx2= 65 --disable-libxavs2 --e
nable-libxcb --disable-libxvid --disable-outdev=3Dxv --disable-libzimg --di= sable-libzmq --disable-libz
vbi
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100

DEV.L. av1 Alliance for Open Media AV1 (decoders: libdav1= d libaom-av1 av1 av1_cuvi
d) (encoders: libaom-av1 libsvtav1 av1_nvenc av1_vaapi)
DEV.LS h264 = H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_cuvid) (encoders: libx264 libx264rgb h264_nvenc h264_v4l2m2m h264_vaap= i)
DEV.L. hevc H.265 / HEVC (High Efficiency Video Coding) (d= ecoders: hevc hevc_v4l2m2
m hevc_cuvid) (encoders: libx265 hevc_nvenc hevc_v4l2m2m hevc_vaapi)
DEVIL. mjpeg Motion JPEG (decoders: mjpeg mjpeg_cuvid) (enc= oders: mjpeg mjpeg_vaapi)
DEV.L. mpeg2video MPEG-2 video (decoders: mpeg2video mpegvideo m= peg2_v4l2m2m mpeg2_cuvid)
(encoders: mpeg2video mpeg2_vaapi)
DEV.L. vp8 On2 VP8 (decoders: vp8 vp8_v4l2m2m libvpx vp8_= cuvid) (encoders: libvpx
vp8_v4l2m2m vp8_vaapi)
DEV.L. vp9 Google VP9 (decoders: vp9 vp9_v4l2m2m libvpx-v= p9 vp9_cuvid) (encoders:
libvpx-vp9 vp9_vaapi)

--
Mario.


--
Mario.
First, VAAPI=C2=A0 is not a co= dec. It is Video Acceleration-API and is supported by some tools directly, = but most often using Mesa or libva-VADPAU. Without VA-API support, the grap= hics will be handled by the CPU, not the GPU. Both H.264 (AVC) nd H.265 (HV= EC) are supported by VAAPI.

Are you b= uilding ffmpeg from source or installing a package? Patented ports need to = be built "NONFREE=3Don" for patented codecs. I am not sure what o= ptions the ffmpeg package is built with.

Are you sure that Video Acceleration is working on your GPU? I have an Ald= er Lake Intel GPU and, as of last week, the device in FreeBSD's drivers= . (New GPU firmware was added this week, but I have yet to try it to confir= m whether it fixes the issue.) Easy check is to play a high res (780 or hig= her) video. If you have VA-API working, CPU usage will not change much. Wit= h VA-API support, it will increase significantly. More accurate check is to= install graphics/xdpiinfo=C2=A0 and run it (no args) or graphics/glx-utils= and run "glxinfo into a pager (more, less, or most). glxinfo is quite= verbose. You want to look for "Accelerated:'' about 50 lines = from the top.

I am not an expert on = all of this, but I've learned a bit trying to get my Alder Lake work pr= operly on FreeBSD.
--=
Kevin Oberma= n, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683


--
Mario.


--
Mario.
--000000000000e81553060e540d8c--