Package Details: obs-gphoto 0.5.0-3

Git Clone URL: https://aur.archlinux.org/obs-gphoto.git (read-only, click to copy)
Package Base: obs-gphoto
Description: Allows connect DSLR cameras with obs-studio through gPhoto on Linux
Upstream URL: https://github.com/maaleske/obs-gphoto
Keywords: gphoto obs obs-studio photo plugin video
Licenses: GPL2
Submitter: Atterratio
Maintainer: tytan652
Last Packager: tytan652
Votes: 9
Popularity: 0.000000
First Submitted: 2017-10-22 18:54 (UTC)
Last Updated: 2022-09-30 07:43 (UTC)

Pinned Comments

tytan652 commented on 2021-06-09 08:48 (UTC) (edited on 2021-08-12 06:39 (UTC) by tytan652)

I could try to fork and maintain it the but I don't have any DSLR cameras to test the code.

Sorry

Note: I use the maaleske fork, if you feel like to fork and maintain it seriously, please remove libcaption dependency.

Latest Comments

1 2 Next › Last »

Sandelinos commented on 2022-09-29 20:44 (UTC)

The package doesn't currently compile properly because of changes in the obs-studio package.

LibObs name has changed to libobs and the cmake files have changed so they don't set the LIBOBS_INCLUDE_DIRS variable anymore. Also the library name gets passed to ld with -llibobs, which results in ld looking for "liblibobs" and failing. Here's my patched PKGBUILD.

# Maintainer: tytan652 <tytan652@tytanium.xyz>
# Contributor: Atterratio
# Contributor: Omar Pakker <archlinux@opakker.nl>

pkgname=obs-gphoto
pkgver=0.5.0
pkgrel=2
pkgdesc="Allows connect DSLR cameras with obs-studio through gPhoto on Linux"
arch=("i686" "x86_64" "aarch64")
url="https://github.com/maaleske/obs-gphoto"
license=("GPL2")
depends=("obs-studio" "libgphoto2")
makedepends=("cmake" "git" "libcaption")
source=("$pkgname-$pkgver.tar.gz::https://github.com/maaleske/$pkgname/archive/v$pkgver.tar.gz")
sha256sums=("6f1303582ea89f2f3203f86620ff5aeba66b5c83a8924c69e648845ae9fe2ba7")

build() {
  cd "$pkgname-$pkgver"

  sed -i -e 's/LibObs/libobs/' -e 's/${LIBOBS_LIBRARIES}/obs/' CMakeLists.txt
  cmake -B build \
  -DLIBOBS_INCLUDE_DIRS=/usr/include/obs \
  -DCMAKE_INSTALL_PREFIX='/usr' \
  -DSYSTEM_INSTALL=1

  make -C build
}

package() {
  cd "$pkgname-$pkgver"

  make -C build DESTDIR="$pkgdir/" install
}

Omar007 commented on 2021-08-24 12:30 (UTC)

With that switch and libcaption dependency the PKGBUILD can be greatly simplified as well and the workaround is also not needed. Here's the simplified version I now use locally:

# Maintainer: tytan652 <tytan652@tytanium.xyz>
# Contributor: Omar Pakker <archlinux@opakker.nl>

pkgname=obs-gphoto
pkgver=0.5.0
pkgrel=1
pkgdesc="Allows connect DSLR cameras with obs-studio through gPhoto on Linux"
arch=("i686" "x86_64" "aarch64")
url="https://github.com/maaleske/obs-gphoto"
license=("GPL2")
depends=("obs-studio" "libgphoto2")
makedepends=("cmake" "git" "libcaption")
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/maaleske/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=("6f1303582ea89f2f3203f86620ff5aeba66b5c83a8924c69e648845ae9fe2ba7")

build() {
    cd "${pkgname}-${pkgver}"
    cmake -B build \
        -DCMAKE_INSTALL_PREFIX='/usr' \
        -DSYSTEM_INSTALL=1
    make -C build
}

package() {
    cd "$pkgname-$pkgver"
    make -C build DESTDIR="$pkgdir/" install
}

jcelerier commented on 2021-08-11 20:26 (UTC)

Hi, this fork seems to fix a bunch of issues with this package:

https://github.com/maaleske/obs-gphoto

it tagged a v0.5 ; maybe it would be worth updating to it instead of staying on upstream (which hasn't had a sign of life for 3 years)

tytan652 commented on 2021-06-09 08:48 (UTC) (edited on 2021-08-12 06:39 (UTC) by tytan652)

I could try to fork and maintain it the but I don't have any DSLR cameras to test the code.

Sorry

Note: I use the maaleske fork, if you feel like to fork and maintain it seriously, please remove libcaption dependency.

Omar007 commented on 2021-06-08 19:48 (UTC) (edited on 2021-06-08 19:57 (UTC) by Omar007)

@mxr: just hit the same thing when trying to build it and looks like it is indeed a hack but it will also solve the immediate problem.

A quick glance at this project's source code, it looks like it is referencing an internal OBS header (obs-internal.h) instead of the appropriate headers for the required information (e.g. util/threading.h, obs(-source).h, etc.). A proper fix would need some work on the source code.

Cleaning that stuff up though would also make it possible to streamline this PKGBUILD and eliminate the need to download obs-studio in sources=(..) to get access to that caption.h file, nor needing to pin obs-studio to a version (afaik).

mxr commented on 2021-06-07 11:21 (UTC)

While compiling I git an error that <caption/caption.h> could not be found (included in obs but apearently cmake does not set the include path)

I added replaced the last line of the build() function with:

C_INCLUDE_PATH=${srcdir}/obs-studio-$_obsver/deps/libcaption make -C build

(probably only a hack but I was able to compile the package)

adambrinek commented on 2021-01-21 18:37 (UTC)

I got this package working with imagemagick 7. I had to only apply thist patch before building package from AUR.

diff --unified --recursive --text obs-gphoto-0.3.0/src/gphoto-preview.c obs-gphoto-0.3.0-patched/src/gphoto-preview.c
--- obs-gphoto-0.3.0/src/gphoto-preview.c   2017-10-24 17:29:31.000000000 +0200
+++ obs-gphoto-0.3.0-patched/src/gphoto-preview.c   2021-01-21 19:19:03.212192386 +0100
@@ -1,4 +1,4 @@
-#include <magick/MagickCore.h>
+#include <MagickCore/MagickCore.h>

 #include "gphoto-preview.h"
 #include "gphoto-utils.h"
@@ -383,4 +383,4 @@
     .hide           = capture_hide,
     .get_width      = capture_getwidth,
     .get_height     = capture_getheight,
-};
\ No newline at end of file
+};
diff --unified --recursive --text obs-gphoto-0.3.0/src/gphoto-utils.c obs-gphoto-0.3.0-patched/src/gphoto-utils.c
--- obs-gphoto-0.3.0/src/gphoto-utils.c 2017-10-24 17:29:31.000000000 +0200
+++ obs-gphoto-0.3.0-patched/src/gphoto-utils.c 2021-01-21 19:19:15.005310869 +0100
@@ -1,7 +1,7 @@
 #include <obs-module.h>
 #include <obs-internal.h>
 #include <gphoto2/gphoto2-camera.h>
-#include <magick/MagickCore.h>
+#include <MagickCore/MagickCore.h>

 #include "gphoto-preview.h"

@@ -539,4 +539,4 @@
         gp_widget_free(widget);
     }
     return ret;
-}
\ No newline at end of file
+}
diff --unified --recursive --text obs-gphoto-0.3.0/src/timelapse.c obs-gphoto-0.3.0-patched/src/timelapse.c
--- obs-gphoto-0.3.0/src/timelapse.c    2017-10-24 17:29:31.000000000 +0200
+++ obs-gphoto-0.3.0-patched/src/timelapse.c    2021-01-21 19:19:25.108460498 +0100
@@ -1,4 +1,4 @@
-#include <magick/MagickCore.h>
+#include <MagickCore/MagickCore.h>

 #include "timelapse.h"
 #include "gphoto-utils.h"
@@ -513,4 +513,4 @@
         .get_height     = timelapse_getheight,
         .video_render   = timelapse_render,
         .video_tick     = timelapse_tick,
-};
\ No newline at end of file
+};

tauboga commented on 2020-08-27 15:25 (UTC)

Install libmagick6 and edit the PKGBUILD between line 15 and 16: ln -s /usr/include/ImageMagick-6/magick ${srcdir}/${pkgname}-${pkgver}/src/magick

Works like a charm.

archmylinux commented on 2020-03-17 18:43 (UTC) (edited on 2020-03-17 18:51 (UTC) by archmylinux)

Am-I mistaken or is there no imagemagick6 package available ? I tried installing libmagick6 but I does not seem to be enough to compile.

anonfunc commented on 2018-02-20 17:54 (UTC)

This won't build with imagemagick, instead it builds with imagemagick6, seems there is no support of imagemagick 7.x upstream yet.