You are not logged in.

#1 2023-01-05 00:45:40

srk
Member
Registered: 2023-01-04
Posts: 10

[SOLVED]Can't find libobs

I need make obs-v4l2sink but it report errors

$>cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..
CMake Error at external/FindLibObs.cmake:98 (include):
  include could not find requested file:

    /home/srk/obs-studio/libobs/../cmake/external/ObsPluginHelpers.cmake
Call Stack (most recent call first):
  CMakeLists.txt:6 (include)


CMake Error at CMakeLists.txt:7 (find_package):
  By not providing "FindLibObs.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "LibObs", but
  CMake did not find one.

  Could not find a package configuration file provided by "LibObs" with any
  of the following names:

    LibObsConfig.cmake
    libobs-config.cmake

  Add the installation prefix of "LibObs" to CMAKE_PREFIX_PATH or set
  "LibObs_DIR" to a directory containing one of the above files.  If "LibObs"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!

I can't find it...

Last edited by srk (2023-01-05 06:11:14)

Offline

#2 2023-01-05 00:52:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [SOLVED]Can't find libobs

Why aren't you using the AUR package?  It includes the solution to this and likely other challenges you would face in building it yourself.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2023-01-05 01:11:21

srk
Member
Registered: 2023-01-04
Posts: 10

Re: [SOLVED]Can't find libobs

Trilby wrote:

Why aren't you using the AUR package?  It includes the solution to this and likely other challenges you would face in building it yourself.

I haven't found a really useful one in aur. I pacman liboobs but its problem remains the same.

Offline

#4 2023-01-05 01:15:32

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: [SOLVED]Can't find libobs

How about the package with the exact name of what you're looking for. https://aur.archlinux.org/packages/obs-v4l2sink

Although it appears to not be needed for most uses.

Last edited by Scimmia (2023-01-05 01:17:49)

Offline

#5 2023-01-05 01:20:06

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [SOLVED]Can't find libobs

srk wrote:

I haven't found a really useful one in aur. I pacman liboobs but its problem remains the same.

What's wrong with obs-v4l2sink or obs-v4l2sink-git? I'm not sure what you mean by their not being useful. Do they fail to build or ...?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#6 2023-01-05 01:42:25

srk
Member
Registered: 2023-01-04
Posts: 10

Re: [SOLVED]Can't find libobs

Scimmia wrote:

How about the package with the exact name of what you're looking for. https://aur.archlinux.org/packages/obs-v4l2sink

Although it appears to not be needed for most uses.

In fact, I used this package from the very beginning, and its error is still the same.

Offline

#7 2023-01-05 01:43:44

srk
Member
Registered: 2023-01-04
Posts: 10

Re: [SOLVED]Can't find libobs

cfr wrote:
srk wrote:

I haven't found a really useful one in aur. I pacman liboobs but its problem remains the same.

What's wrong with obs-v4l2sink or obs-v4l2sink-git? I'm not sure what you mean by their not being useful. Do they fail to build or ...?

They still report errors when compiling.

Offline

#8 2023-01-05 02:36:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [SOLVED]Can't find libobs

Using the aur packages does not result in the same error, but a related one yes.  This is also noted on the comments of the aur package which follow up from the maintainer that this package is no longer needed for current versions of OBS, is this the case?  Why do you (think you) need this package?

The file cmake is looking for does indeed exist in the source tree, but it is just not properly included in CMAKE_MODULE_PATH, which leads me to suspect this could be fixed with a simple patch to src/obs-v4l2sink/external/FindLibObs.cmake, but I don't use cmake, so I couldn't give more specifics than that.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2023-01-05 03:00:22

srk
Member
Registered: 2023-01-04
Posts: 10

Re: [SOLVED]Can't find libobs

Trilby wrote:

Using the aur packages does not result in the same error, but a related one yes.  This is also noted on the comments of the aur package which follow up from the maintainer that this package is no longer needed for current versions of OBS, is this the case?  Why do you (think you) need this package?

The file cmake is looking for does indeed exist in the source tree, but it is just not properly included in CMAKE_MODULE_PATH, which leads me to suspect this could be fixed with a simple patch to src/obs-v4l2sink/external/FindLibObs.cmake, but I don't use cmake, so I couldn't give more specifics than that.

This has become a problem that I want to solve fundamentally. When using OBS, it will report the error "warning: Failed to start virtual camera" big_smile

Offline

#10 2023-01-05 03:06:37

srk
Member
Registered: 2023-01-04
Posts: 10

Re: [SOLVED]Can't find libobs

srk wrote:
Trilby wrote:

Using the aur packages does not result in the same error, but a related one yes.  This is also noted on the comments of the aur package which follow up from the maintainer that this package is no longer needed for current versions of OBS, is this the case?  Why do you (think you) need this package?

The file cmake is looking for does indeed exist in the source tree, but it is just not properly included in CMAKE_MODULE_PATH, which leads me to suspect this could be fixed with a simple patch to src/obs-v4l2sink/external/FindLibObs.cmake, but I don't use cmake, so I couldn't give more specifics than that.

This has become a problem that I want to solve fundamentally. When using OBS, it will report the error "warning: Failed to start virtual camera" big_smile

I saw this when I was dealing with the problem

Offline

#11 2023-01-05 03:40:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [SOLVED]Can't find libobs

That's a 2.5 year old discussion applicable only to older versions of OBS.  According to the upstream author of this pluging it is no longer relevant for current versions of OBS as current versions support virtual cams without this plugin.  So this is the very definition of an X-Y problem.  Whatever error you are having with virtual cams, this plugin is not the solution.  If you want help finding the actual solution, you'll need to start a thread describing the actual problem / errors with attempting to use the virtual camera.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#12 2023-01-05 04:20:51

srk
Member
Registered: 2023-01-04
Posts: 10

Re: [SOLVED]Can't find libobs

Trilby wrote:

That's a 2.5 year old discussion applicable only to older versions of OBS.  According to the upstream author of this pluging it is no longer relevant for current versions of OBS as current versions support virtual cams without this plugin.  So this is the very definition of an X-Y problem.  Whatever error you are having with virtual cams, this plugin is not the solution.  If you want help finding the actual solution, you'll need to start a thread describing the actual problem / errors with attempting to use the virtual camera.

Ok, I open the terminal and run obs on top.

 $>obs
debug: Found portal inhibitor
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/locale.ini
Attempted path: /usr/share/obs/obs-studio/locale.ini
Attempted path: share/obs/obs-studio/locale/zh-CN.ini
Attempted path: /usr/share/obs/obs-studio/locale/zh-CN.ini
info: Using preferred locale 'zh-CN'
Attempted path: share/obs/obs-studio/themes/Yami.qss
Attempted path: /usr/share/obs/obs-studio/themes/Yami.qss
info: Using EGL/X11
info: CPU Name: AMD Ryzen 7 4800H with Radeon Graphics
info: CPU Speed: 3561.790MHz
info: Physical Cores: 8, Logical Cores: 16
info: Physical Memory: 15867MB Total, 4730MB Free
info: Kernel Version: Linux 6.1.2-arch1-1
info: Distribution: "Arch Linux" Unknown
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.21.1
info: Qt Version: 6.4.1 (runtime), 6.4.1 (compiled)
info: Portable mode: false
Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg
qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int)
qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_actionShowTransitionProperties_triggered()
qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_actionHideTransitionProperties_triggered()
info: OBS 28.1.2-2 (linux)
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 1650/PCIe/SSE2
info: OpenGL loaded successfully, version 3.3.0 NVIDIA 525.60.11, shading language 3.30 NVIDIA via Cg compiler
info: ---------------------------------
info: video settings reset:
	base resolution:   1920x1080
	output resolution: 1920x1080
	downscale filter:  Bicubic
	fps:               60/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: 默认
	id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
libDeckLinkAPI.so: 无法打开共享对象文件: 没有那个文件或目录
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [pipewire] No captures available
info: NVENC supported
info: FFMPEG VAAPI supported
info: ---------------------------------
info:   Loaded Modules:
info:     text-freetype2.so
info:     rtmp-services.so
info:     obs-x264.so
info:     obs-vst.so
info:     obs-transitions.so
info:     obs-outputs.so
info:     obs-libfdk.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:     linux-alsa.so
info:     image-source.so
info:     frontend-tools.so
info:     decklink-output-ui.so
info:     decklink-captions.so
info: ---------------------------------
QLayout: Attempting to add QLayout "" to OBSBasic "OBSBasic", which already has a layout
QWidget::setTabOrder: 'first' and 'second' must be in the same window
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.63) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.pci-0000_05_00.6.analog-stereo.monitor' (default)
info: [Loaded global audio device]: '桌面音频'
info: pulse-input: Server name: 'PulseAudio (on PipeWire 0.3.63) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.pci-0000_05_00.6.analog-stereo' (default)
info: [Loaded global audio device]: '麦克风/Aux'
info: xshm-input: Geometry 1920x1080 @ 0,0
info: Switched to scene '场景'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene '场景':
info:     - source: '屏幕采集 (XSHM)' (xshm_input)
info: ------------------------------------------------
Attempted path: share/obs/obs-studio/images/overflow.png
Attempted path: /usr/share/obs/obs-studio/images/overflow.png
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: 桌面音频)

info: adding 21 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: 麦克风/Aux)

info: NV12 texture support not available
info: P010 texture support not available
warning: Failed to start virtual camera
info: NV12 texture support not available
info: P010 texture support not available
warning: Failed to start virtual camera
info: ==== Shutting down ==================================================
info: pulse-input: Stopped recording from 'alsa_output.pci-0000_05_00.6.analog-stereo.monitor'
info: pulse-input: Got 614 packets with 736800 frames
info: pulse-input: Stopped recording from 'alsa_input.pci-0000_05_00.6.analog-stereo'
info: pulse-input: Got 612 packets with 734400 frames
info: All scene data cleared
info: ------------------------------------------------
info: [Scripting] Total detached callbacks: 0
info: Freeing OBS context data
warning: 1 views remain at shutdown
info: == Profiler Results =============================
info: run_program_init: 619.656 ms
info:  ┣OBSApp::AppInit: 5.667 ms
info:  ┃ ┗OBSApp::InitLocale: 2.106 ms
info:  ┗OBSApp::OBSInit: 550.364 ms
info:    ┣obs_startup: 0.994 ms
info:    ┗OBSBasic::OBSInit: 474.963 ms
info:      ┣OBSBasic::InitBasicConfig: 0.074 ms
info:      ┣OBSBasic::ResetAudio: 0.312 ms
info:      ┣OBSBasic::ResetVideo: 64.545 ms
info:      ┣OBSBasic::InitOBSCallbacks: 0.002 ms
info:      ┣OBSBasic::InitHotkeys: 0.032 ms
info:      ┣obs_load_all_modules2: 299.6 ms
info:      ┃ ┣obs_init_module(decklink-captions.so): 0 ms
info:      ┃ ┣obs_init_module(decklink-output-ui.so): 0 ms
info:      ┃ ┣obs_init_module(decklink.so): 0.101 ms
info:      ┃ ┣obs_init_module(frontend-tools.so): 93.389 ms
info:      ┃ ┣obs_init_module(image-source.so): 0.008 ms
info:      ┃ ┣obs_init_module(linux-alsa.so): 0.003 ms
info:      ┃ ┣obs_init_module(linux-capture.so): 0.465 ms
info:      ┃ ┣obs_init_module(linux-jack.so): 0.002 ms
info:      ┃ ┣obs_init_module(linux-pipewire.so): 0.869 ms
info:      ┃ ┣obs_init_module(linux-pulseaudio.so): 0.003 ms
info:      ┃ ┣obs_init_module(linux-v4l2.so): 0.125 ms
info:      ┃ ┣obs_init_module(obs-ffmpeg.so): 0.949 ms
info:      ┃ ┃ ┗nvenc_check: 0.839 ms
info:      ┃ ┣obs_init_module(obs-filters.so): 0.025 ms
info:      ┃ ┣obs_init_module(obs-libfdk.so): 0.001 ms
info:      ┃ ┣obs_init_module(obs-outputs.so): 0.002 ms
info:      ┃ ┣obs_init_module(obs-transitions.so): 0.009 ms
info:      ┃ ┣obs_init_module(obs-vst.so): 0.003 ms
info:      ┃ ┣obs_init_module(obs-x264.so): 0.002 ms
info:      ┃ ┣obs_init_module(rtmp-services.so): 0.183 ms
info:      ┃ ┗obs_init_module(text-freetype2.so): 0.009 ms
info:      ┣OBSBasic::ResetOutputs: 0.107 ms
info:      ┣OBSBasic::CreateHotkeys: 0.028 ms
info:      ┣OBSBasic::InitService: 1.801 ms
info:      ┣OBSBasic::InitPrimitives: 0.092 ms
info:      ┗OBSBasic::Load: 31.224 ms
info: obs_hotkey_thread(25 ms): min=0.06 ms, median=0.195 ms, max=9.77 ms, 99th percentile=3.556 ms, 100% below 25 ms
info: audio_thread(Audio): min=0.014 ms, median=0.062 ms, max=1.739 ms, 99th percentile=0.156 ms
info: obs_graphics_thread(16.6667 ms): min=0.051 ms, median=3.894 ms, max=55.928 ms, 99th percentile=7.458 ms, 99.2608% below 16.667 ms
info:  ┣tick_sources: min=0 ms, median=2.817 ms, max=19.792 ms, 99th percentile=4.683 ms
info:  ┣output_frame: min=0.032 ms, median=0.287 ms, max=2.025 ms, 99th percentile=0.406 ms
info:  ┃ ┗gs_context(video->graphics): min=0.032 ms, median=0.286 ms, max=2.025 ms, 99th percentile=0.371 ms
info:  ┃   ┣render_video: min=0.018 ms, median=0.219 ms, max=1.971 ms, 99th percentile=0.315 ms
info:  ┃   ┃ ┗render_main_texture: min=0.014 ms, median=0.202 ms, max=1.952 ms, 99th percentile=0.299 ms
info:  ┃   ┗gs_flush: min=0.005 ms, median=0.017 ms, max=0.078 ms, 99th percentile=0.064 ms
info:  ┗render_displays: min=0.009 ms, median=0.647 ms, max=49.114 ms, 99th percentile=1.01 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25.13 ms, median=25.282 ms, max=34.849 ms, 78.115% within ±2% of 25 ms (0% lower, 21.885% higher)
info: obs_graphics_thread(16.6667 ms): min=6.21 ms, median=16.667 ms, max=55.933 ms, 97.6744% within ±2% of 16.667 ms (1.16279% lower, 1.16279% higher)
info: =================================================
info: Number of memory leaks: 0

In the middle I try to launch its virtual camera

info: NV12 texture support not available
info: P010 texture support not available
warning: Failed to start virtual camera
info: NV12 texture support not available
info: P010 texture support not available
warning: Failed to start virtual camerap

Offline

#13 2023-01-05 04:57:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [SOLVED]Can't find libobs

I did say that should be a different thread, right?  But be sure you've followed the OBS page of the wiki first.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2023-01-05 06:10:08

srk
Member
Registered: 2023-01-04
Posts: 10

Re: [SOLVED]Can't find libobs

Trilby wrote:

I did say that should be a different thread, right?  But be sure you've followed the OBS page of the wiki first.

Thank you for your help. Now the problem has been solved.
I pacman v4l2loopback-dkms and reboot
run

$ sudo modprobe v4l2loopback

(If you do not restart, an error will be reported.)

Offline

Board footer

Powered by FluxBB