Coder Social home page Coder Social logo

obs-gphoto's People

Contributors

atterratio avatar geefr avatar m1ga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

obs-gphoto's Issues

Add options to set liveviewsize and/or camera output for better resolution

Hi there,

first I have to thank you a lot for building this awesome peace of software. I was struggling getting my Canon M50 into OBS. I tried several ways, but your plugin is the best solution so far!

That said, I'd like to make a wish... Would it be possible to add the settings for liveviewsize and (camera) output? These settings are needed to get the video resolution to about 720p. Otherwise gphoto always seem to use the settings "camera output"=MOBILE2 (instead of PC) and liveviewsize=Small (instead of Large).

So by default I only get a resolution of 512x288, and that's not very satisfying.

Just to be mentioned, I tried gphoto2 directly piping to v4l2 via ffmpeg but it seemed that gphoto2 couldn't save the options of liveviewsize etc. But somehow in entangle it works awesomely well although both use the same library... But entangle isn't a good option to work with obs.

Thank you very much in advance!

Plugin uses more CPU than gphoto2/v4lloopback

First of all thanks for a great plugin which has the potential to make things much easier.

So far I have been using a pipeline like
gphoto2 --stdout --capture-movie | gst-launch-1.0 fdsrc ! decodebin3 name=dec ! queue ! videoconvert ! v4l2sink device=/dev/video11
and the v4l source in obs. In sum this uses up rougly 40% to 50% CPU time on my system (including obs), about half of that for gphoto2.

The plugin is much more convenient (and potentially gives more controls), of course, and I expected it to be more efficient because it bypasses v4l. Alas obs uses up rougly 50% with it. This is not much more but still surprising. Is ImageMagick the bottle-neck here?

Provide support non Canon cameras

I only have a Canon camera, I took into account some of the features of other cameras that I've seen in gPhoto's examples, but I'm pretty sure that with cameras from other manufacturers it will not work very well.
It is necessary to check on any other camera from the list of supported cameras which supporting «Image Capture» and «Liveview», and if possible modify code.

Integrate gphoto2 audio cap

I have a pretty low-end mic.
So low-end that even my camera can capture better audio.
gphoto2 has an ability to capture audio - I checked.

It's only logical to try to capture audio in addition to video.

Unable to build with imagemagick 7.x

Imagemagick 7.x is stable for a while now and has replaced version 6, which is required to build obs-gphoto, on several distros. Since version 7 has some API changes and legacy 6.x-packages are being removed more and more it is quite hard to build this software on most modern systems. According to the official guide porting should be quite straightforward, however I (and others) got incorrect image sizes when just switching headers, so if imagemagick should be used more work seems to be required.
As an alternative libjpeg, which is preinstalled on most systems, can be used. Dunkelstern already ported the code. I haven't really tested it yet, but the code compiles and obs manages to display a proper image.

build issues on manjaro

happens in terminal (shown) and from pamac-manager

[ed@ed-kde obs-gphoto]$ make
[sudo] password for ed:
[ 16%] Building C object CMakeFiles/obs-gphoto.dir/src/gphoto-utils.c.o
/home/ed/obs-gphoto/src/gphoto-utils.c:4:10: fatal error: magick/MagickCore.h: No such file or directory
4 | #include <magick/MagickCore.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/obs-gphoto.dir/build.make:76: CMakeFiles/obs-gphoto.dir/src/gphoto-utils.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/obs-gphoto.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
[ed@ed-kde obs-gphoto]$

[Canon EOS 100D] OBS Studio crashes when toggling the gphoto2 camera off and on again

If I add this plugin as a video source with my DSLR plugged in so I can use it in obs studio, if I temporarily disable the source (with the "eye" icon in the sources list) and then try to turn it on again, OBS will freeze or crash with the following:

double free or corruption (out)
Aborted (core dumped)

If I try to run it in gdb, it looks like this when the crash is triggered:

[New Thread 0x7fff56b3e700 (LWP 27020)]
[Thread 0x7fff56b3e700 (LWP 27020) exited]
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
[New Thread 0x7fff56b3e700 (LWP 27021)]
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
[New Thread 0x7fff56256700 (LWP 27023)]
Attempted path: share/obs/obs-studio/images/overflow.png
Attempted path: /usr/share/obs/obs-studio/images/overflow.png
[New Thread 0x7fff55404700 (LWP 27024)]
[Thread 0x7fff56256700 (LWP 27023) exited]
[Thread 0x7fff56b3e700 (LWP 27021) exited]
double free or corruption (out)

Thread 23 "libobs: graphic" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff82f16700 (LWP 27005)]
0x00007ffff519fe35 in raise () from /lib64/libc.so.6
(gdb) bt full
#0  0x00007ffff519fe35 in raise () at /lib64/libc.so.6
#1  0x00007ffff518a895 in abort () at /lib64/libc.so.6
#2  0x00007ffff51e323f in __libc_message () at /lib64/libc.so.6
#3  0x00007ffff51ea7bc in  () at /lib64/libc.so.6
#4  0x00007ffff51ec1a8 in _int_free () at /lib64/libc.so.6
#5  0x00007fff816e8264 in capture_terminate () at /usr//lib64/obs-plugins/obs-gphoto.so
#6  0x00007fff816e8cdd in capture_show () at /usr//lib64/obs-plugins/obs-gphoto.so
#7  0x00007ffff617091b in obs_source_video_tick () at /lib64/libobs.so.0
#8  0x00007ffff61a837c in obs_graphics_thread () at /lib64/libobs.so.0
#9  0x00007ffff53364c0 in start_thread () at /lib64/libpthread.so.0
#10 0x00007ffff5264553 in clone () at /lib64/libc.so.6

Windows support

Add Windows support through digiCamControl, or EOSDK as backup solution.

caption/caption.h missing

I've tried building it on Ubuntu 20.04 and it errored out with this:

$ make
Scanning dependencies of target obs-gphoto
[ 16%] Building C object CMakeFiles/obs-gphoto.dir/src/obs-gphoto.c.o
[ 33%] Building C object CMakeFiles/obs-gphoto.dir/src/gphoto-utils.c.o
In file included from /home/aresminos/Software/source/obs-gphoto/src/gphoto-utils.c:2:
/usr/include/obs/obs-internal.h:39:10: fatal error: caption/caption.h: No such file or directory
   39 | #include <caption/caption.h>
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/obs-gphoto.dir/build.make:76: CMakeFiles/obs-gphoto.dir/src/gphoto-utils.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/obs-gphoto.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Neither configuration option functional for Snap package

On Ubuntu 18.04 LTS with OBS Studio in the snap" package.

Compilation of this plugin succeeds without incident, but neither cmake . -DSYSTEM_INSTALL=1 nor cmake . -DSYSTEM_INSTALL=0 will produce a workign configuration.

First, the non-system installation places the plugin binary in ~/.config/obs-studio/plugins/obs-gphoto/bin/64bit/obs-gphoto.so -- which is not where the OBS snap binary looks. However, if you copy the plugin binary to the correct spot for the OBS snap to see it, /snap/obs-studio/NNNN/.config/obs-studio/plugins/obs-gphoto/bin/64bit/obs-gphoto.so (where NNNN is some snap revision/hash or something), then the plugin still does not load. The log reports this as a failure to find the gphoto library:

os_dlopen(/home/username/snap/obs-studio/NNNN/.config/obs-studio/plugins/obs-gphoto/bin/64bit/obs-gphoto.so->/home/username/snap/obs-studio/NNNN/.config/obs-studio/plugins/obs-gphoto/bin/64bit/obs-gphoto.so): libgphoto2.so.6: cannot open shared object file: No such file or directory

Module '/home/username/snap/obs-studio/NNNN/.config/obs-studio/plugins/obs-gphoto/bin/64bit/obs-gphoto.so' not loaded

The system-install option just puts the plugin binary in a location that the snap doesn't look.

It's possible that there's some way to adjust the snap sandbox so that it can find the libgphoto2 library, but I am not clear if that would be the preferred way to work around the problem (much less do I actually know what the change would be).

ERROR: A failure occurred in build() Arch linux

yaourt -S obs-gphoto


==> Downloading obs-gphoto PKGBUILD from AUR...
x .SRCINFO
x PKGBUILD
Atterratio commented on <a href="#comment-617638" class="date">2017-10-22 19:02</a>			 
At now it's tested only on Canon cameras see bug: https://github.com/Atterratio/obs-gphoto/issues/1

IdleGandalf commented on <a href="#comment-634626" class="date">2018-02-20 17:54</a>			 

archmylinux commented on <a href="#comment-734262" class="date">2020-03-17 18:43</a>			 

obs-gphoto 0.3.0-1  (2017-10-24 15:49)
( Unsupported package: Potentially dangerous ! )
==> Edit PKGBUILD ? [Y/n] ("A" to abort)
==> ------------------------------------
==> 
Please add $VISUAL to your environment variables
for example:
export VISUAL="vim" (in ~/.bashrc)
(replace vim with your favorite editor)

==> Edit PKGBUILD with:  
/usr/lib/yaourt/util.sh: line 227: PKGBUILD: command not found
==> obs-gphoto dependencies:
 - obs-studio (already installed)
 - libgphoto2 (already installed)
 - imagemagick (already installed)
 - cmake (already installed) [makedepend]


==> Continue building obs-gphoto ? [Y/n]
==> ------------------------------------
==> 
==> Building and installing package
==> Making package: obs-gphoto 0.3.0-1 (Fri 20 Mar 2020 19:55:25 CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading v0.3.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   129  100   129    0     0    116      0  0:00:01  0:00:01 --:--:--   116
100 22556    0 22556    0     0   8722      0 --:--:--  0:00:02 --:--:-- 22623
==> Validating source files with sha256sums...
    v0.3.0.tar.gz ... Passed
==> Extracting sources...
  -> Extracting v0.3.0.tar.gz with bsdtar
==> Starting build()...
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- LibObs FOUND
-- Found GPHOTO2: /usr/lib/libgphoto2.so  
-- Gphoto2 FOUND
-- Found ImageMagick: /usr/lib/libMagickCore-6.Q16HDRI.so (found version "7.0.10-1") 
-- MagickCore FOUND
-- Checking for module 'libudev'
--   Found libudev, version 245
-- Found UDEV: /usr/lib/libudev.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/yaourt-tmp-marcos/aur-obs-gphoto/src/obs-gphoto-0.3.0
make[1]: Entering directory '/tmp/yaourt-tmp-marcos/aur-obs-gphoto/src/obs-gphoto-0.3.0'
make[2]: Entering directory '/tmp/yaourt-tmp-marcos/aur-obs-gphoto/src/obs-gphoto-0.3.0'
Scanning dependencies of target obs-gphoto
make[2]: Leaving directory '/tmp/yaourt-tmp-marcos/aur-obs-gphoto/src/obs-gphoto-0.3.0'
make[2]: Entering directory '/tmp/yaourt-tmp-marcos/aur-obs-gphoto/src/obs-gphoto-0.3.0'
[ 16%] Building C object CMakeFiles/obs-gphoto.dir/src/obs-gphoto.c.o
[ 33%] Building C object CMakeFiles/obs-gphoto.dir/src/gphoto-utils.c.o
/tmp/yaourt-tmp-marcos/aur-obs-gphoto/src/obs-gphoto-0.3.0/src/gphoto-utils.c:4:10: fatal error: magick/MagickCore.h: No such file or directory
    4 | #include <magick/MagickCore.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/obs-gphoto.dir/build.make:76: CMakeFiles/obs-gphoto.dir/src/gphoto-utils.c.o] Error 1
make[2]: Leaving directory '/tmp/yaourt-tmp-marcos/aur-obs-gphoto/src/obs-gphoto-0.3.0'
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/obs-gphoto.dir/all] Error 2
make[1]: Leaving directory '/tmp/yaourt-tmp-marcos/aur-obs-gphoto/src/obs-gphoto-0.3.0'
make: *** [Makefile:130: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build obs-gphoto.
==> Restart building obs-gphoto ? [y/N]
==> -----------------------------------

[Canon EOS 80D, maybe not specific] clarify interaction between camera modes and plugin controls

In principle, the camera can be in either live view photo mode (960x640) or live view video mode (1024x576). In addition the programme dial can be in one of several modes (P/Av/Tv/M), plus the ISO and AF modes.

It's not clear how this interacts with the plugin settings. For example, in live view photo mode the "AF" button of the plugin causes AF to operate once, not continuously (probably expected but not useful). In video mode it does not seem to turn off AF.

The plugin's exposure setting are available in live view photo mode only, but I have not found a programme mode yet in which they have any effect. (On camera, only M allows choosing the aperture in video mode, for example, not Av.)

On the other hand, white balance settings work and are quite welcome!

So, it would help to know what (plugin setting) is expected to work when (in which mode) to judge whether there is an issue to be solved or just a specific combination to choose.

openSUSE

Is there a way to install it on this distro. I've tried what README file says but it doesn't work, maybe cos it's for ArchLinux.

Canon 100D - No resolution controls?

Trying out this plugin by installing it from git (as per your instructions) on Fedora 30's version of OBS, and quite impressed that it manages to see and composite the camera through gphoto2, which is more than anything else I've seen outside the Linux world...

There's a a couple of problems though: it crashes if I toggle the source on and off in OBS (I'll file another ticket about that) and it doesn't let me specify the resolution in the settings, so the image always shows up as something that looks like 4:3 or 3:2 aspect ratio, instead of the 1920x1080 that is the camera's native video recording resolution. Is it supposed to be able to let me specify a capture resolution?

free(): invalid pointer

If I set up a scene that uses the obs-gphoto plugin to display my Canon EOS 80D, and another scene that does not have the gphoto source in it, when I switch from the scene with the gphoto plugin to the one without and back again, OBS crashes and in the logs it says free(): invalid pointer.

The same happens even if I just toggle visibility of the gphoto source.

No Capture on Canon EOS 1200D

I created gPhoto live preview capture and it gets the Camera and stuff but it doesn't show a video capture.
In my terminal there is the following:
error: glMapBuffer failed, glGetError returned 0x505
error: gs_texture_map (GL) failed

Versions:
aur/obs-gphoto 0.3.0-1
community/obs-studio 21.0.2-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.