4

I want to use my DSLR camera as video input for let say Skype / Google talk under Linux and Android.

Is it possible to create a video loop back using v4l2loopback and Canon EDSDK ? how can I pipe the liveview buffer from the camera to the video loop back ?

Thanks

Amit
  • 43
  • 1
  • 4
  • I know you mentioned Linux (and also that this is a four-year-old question), but I just did a Skype job interview a few days ago using my Canon DSLR as a webcam. This ($50) product runs on Windows, installs a virtual webcam driver, and pipes liveview frames to the webcam, presumably using EDSDK: https://sparkosoft.com/sparkocam – Adam Jun 26 '16 at 22:41
  • It also has some support for screensharing overlays, text/image overlays, etc. – Adam Jun 26 '16 at 22:42

4 Answers4

4

As of October 2017, GStreamer has been updated to 1.0 and v4l2loopback has also received some updates.

As such, the old command posted by @Reinaert Albrecht doesn't work anymore, and the new command that works now is:

gphoto2 --stdout --capture-movie | gst-launch-1.0 fdsrc fd=0 ! decodebin name=dec ! queue ! videoconvert ! tee ! v4l2sink device=/dev/video0
  • 1
    In 2020, this seems to fail with: ```ERROR: from element /GstPipeline:pipeline0/GstFdSrc:fdsrc0: Internal data stream error. Additional debug info: gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstFdSrc:fdsrc0: ``` – partofthething Mar 21 '20 at 22:51
  • Hello, this is what could fix it - `modprobe v4l2loopback max_buffers=2`. See also https://github.com/umlaeute/v4l2loopback/issues/83#issuecomment-607471345 – Vlad Dinulescu Apr 19 '20 at 09:31
3

To my understanding Canon's EDSDK is still only available upon request for the Windows and OSX platform (C and Objective-C). On linux, you might want to try and install the SDK under Wine, or resort to a more general purpose gPhoto. Now, the "LiveView" or "EvF" images are individual JPG's. Alternatively, you might want to capture this through the HDMI output port (which will be full res on the EOS 5D Mark III in Spring 2013).

gdh
  • 498
  • 3
  • 14
  • To get back on the use of HDMI for liveview, it currently is low-res (sticks to res of the viewfinder) and it includes the HUD information (e.g. grid, exposure info). No clean signal that I could find (EOS 5d Mark II) – gdh Nov 23 '12 at 17:57
  • Guess this doesn't matter too much for Skype/GTalk as their resolutions are not so high anyway. Of course the result after transcoding is a bit better with a higher base resolution. – david Nov 23 '12 at 18:20
  • As of April 2013 there is "Clean HDMI Output" on the Canon EOS 5dMKIII , see [link](http://www.usa.canon.com/cusa/consumer/standard_display/EOS5DM3_firmware/) – gdh May 17 '13 at 12:33
1

you will need a "producer" application, that writes frames to the loopback device (and which has previously acquired those frames via the canon esdk)

v4l2loopback already comes with a few simple producer examples, and you could have a look at other applications that already have native v4l2loopback output support, e.g. Gem, lives, gmerlin and gstreamer

umläute
  • 28,885
  • 9
  • 68
  • 122
  • I was able to use the libgphoto2 on linux with v4l2loopback to create a virtual camera form my DSLR, So the refine my question, if I create a v4l2loopback device on android other apps (Skype, Gtalk) see it as a camera or there is something more to be done? At the moment I have the HTC One-X without root so... I cant really test it... – Amit Oct 03 '12 at 17:56
  • in theory yes; in practice i never checked whether v4l2loopback works on android – umläute Oct 03 '12 at 18:35
1

You can easily do this with the following commands:

modprobe v4l2loopback

And then issue this:

gphoto2 --stdout --capture-movie | gst-launch-0.10 fdsrc ! decodebin2 name=dec ! queue ! ffmpegcolorspace ! v4l2sink device=/dev/video0

Change the video device appropriately.