fzwoch / obs-vaapi

OBS Studio VAAPI support via GStreamer
GNU General Public License v2.0
118 stars 3 forks source link

Invalid text rendering after June 23 updates #14

Closed GloriousEggroll closed 1 year ago

GloriousEggroll commented 1 year ago

Last working: c750f12d324147a5b3643ea51de219b0226b047a

After that it broke, the entries for the else statement in obs-vaapi.c get_name look like this:

PXL_20230624_084924800

fzwoch commented 1 year ago

Can you please post the output for gst-inspect-1.0 va?

I may have screwed up the naming of the encoders in some cases. Since I don't have such a system it is a bit tough to do the right right it seems..

GloriousEggroll commented 1 year ago

Sure thing:

$ gst-inspect-1.0 va
Plugin Details:
  Name                     va
  Description              VA-API codecs plugin
  Filename                 /lib64/gstreamer-1.0/libgstva.so
  Version                  1.22.3
  License                  LGPL
  Source module            gst-plugins-bad
  Documentation            https://gstreamer.freedesktop.org/documentation/va/
  Source release date      2023-05-19
  Binary package           Fedora GStreamer-plugins-bad package
  Origin URL               http://download.fedoraproject.org

  vaav1dec: VA-API AV1 Decoder
  vaav1enc: VA-API AV1 Encoder
  vacompositor: VA-API Video Compositor
  vadeinterlace: VA-API Deinterlacer
  vah264dec: VA-API H.264 Decoder
  vah264enc: VA-API H.264 Encoder
  vah265dec: VA-API H.265 Decoder
  vah265enc: VA-API H.265 Encoder
  vajpegdec: VA-API JPEG Decoder
  vapostproc: VA-API Video Postprocessor
  varenderD129av1dec: VA-API AV1 Decoder in renderD129
  varenderD129compositor: VA-API Video Compositor in renderD129
  varenderD129deinterlace: VA-API Deinterlacer in renderD129
  varenderD129h264dec: VA-API H.264 Decoder in renderD129
  varenderD129h264enc: VA-API H.264 Encoder in renderD129
  varenderD129h265dec: VA-API H.265 Decoder in renderD129
  varenderD129h265enc: VA-API H.265 Encoder in renderD129
  varenderD129jpegdec: VA-API JPEG Decoder in renderD129
  varenderD129postproc: VA-API Video Postprocessor in renderD129
  varenderD129vp9dec: VA-API VP9 Decoder in renderD129
  vavp9dec: VA-API VP9 Decoder

  21 features:
  +-- 21 elements
GloriousEggroll commented 1 year ago

Regarding the above, I'm not sure why its only listing info for D129, D128 is my primary card, D129 is my igpu (this is a desktop system -- 7950x cpu/igpu 7900xtx dgpu):

$ vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.18 (libva 2.18.2)
vainfo: Driver version: Mesa Gallium driver 23.1.3 for AMD Radeon Graphics (gfx1100, LLVM 15.0.7, DRM 3.52, 6.3.7-200.fsync.fc38.x86_64)
vainfo: Supported profile and entrypoints
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointEncSlice
      VAProfileNone                   : VAEntrypointVideoProc

$ vainfo --display drm --device /dev/dri/renderD129
Trying display: drm
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.18 (libva 2.18.2)
vainfo: Driver version: Mesa Gallium driver 23.1.3 for AMD Radeon Graphics (raphael_mendocino, LLVM 15.0.7, DRM 3.52, 6.3.7-200.fsync.fc38.x86_64)
vainfo: Supported profile and entrypoints
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileAV1Profile0            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
fzwoch commented 1 year ago

Thanks, I hope I have tackled it.

I can already see there is some more work required for better multi gpu regarding the post processor. But that's something down the road..

GloriousEggroll commented 1 year ago

looks good now, thanks again!

fzwoch commented 1 year ago

Regarding the above, I'm not sure why its only listing info for D129, D128 is my primary card, D129 is my igpu (this is a desktop system -- 7950x cpu/igpu 7900xtx dgpu):

I it seems that only non-D128 devices get a special named device as D128 is the default and therefore the default names apply.

Since I don't have multiple devices, I have never seen the additional ones, and never realized how multiple devices are being handled by the new plugin.

GloriousEggroll commented 1 year ago

Regarding the above, I'm not sure why its only listing info for D129, D128 is my primary card, D129 is my igpu (this is a desktop system -- 7950x cpu/igpu 7900xtx dgpu):

I it seems that only non-D128 devices get a special named device as D128 is the default and therefore the default names apply.

Since I don't have multiple devices, I have never seen the additional ones, and never realized how multiple devices are being handled by the new plugin.

if you were wondering how the iteration looks (dont mind the naming scheme, I have a patch for the plugin and OBS that renamed everything uniformly): PXL_20230624_104221427

GloriousEggroll commented 1 year ago

I think there is also code I previously committed to OBS to get the device name rather than having it print "renderD129", might be helpful here: (lines 881-884) https://github.com/obsproject/obs-studio/blob/dd418c1f354fa6cf25de2bed0af4ff048ab61fb2/plugins/obs-ffmpeg/obs-ffmpeg-vaapi.c#L881

fzwoch commented 1 year ago

Yeah, there is something in this plugin already for the legacy plugin. Needs to move to the new one at some point.