5

Situation

Ubuntu 16.04, skypeforlinux 8.53.0.85 and 8.58.0.93 (latest to date from the Skype website)

  • The external webcam works with Cheese
  • The external webcam is recognized by Skype as per screenshot below

    • the vendor and product ID given by lsusb show up in the Skype dialogue window (in hexadecimals)
    • the webcam is on but the screen is not activated: black screen

      enter image description here

Research

This is not on the official list of known issues of Skype for Linux: https://support.skype.com/en/faq/FA34713/faq-and-known-issues-with-skype

A tack of old posts suggests checking whether the libraries v4l and gstreamer are installed. They are:

ii  libv4l-0:amd64  1.10.0-1  amd64  Collection of video4linux support libraries  
ii  libv4l-dev:amd64  1.10.0-1  amd64  Collection of video4linux support libraries (development files)
ii  libv4l2rds0:amd64  1.10.0-1  amd64  Video4Linux Radio Data System (RDS) decoding library
ii  libv4lconvert0:amd64  1.10.0-1  amd64 Video4linux frame format conversion library
ii  gir1.2-gst-plugins-base-1.0  1.8.3-1ubuntu0.3  amd64  GObject introspection data for the GStreamer Plugins Base library
ii  gir1.2-gstreamer-1.0  1.8.3-1~ubuntu0.1  amd64  GObject introspection data for the GStreamer library
ii  gnome-video-effects  0.4.1-3ubuntu1  all  Collection of GStreamer effects
ii  gstreamer1.0-alsa:amd64  1.8.3-1ubuntu0.3  amd64  GStreamer plugin for ALSA
ii  gstreamer1.0-clutter-3.0  3.0.18-1  amd64  Clutter PLugin for GStreamer 1.0
ii  gstreamer1.0-libav:amd64  1.8.3-1ubuntu0.2  amd64  libav plugin for GStreamer
ii  gstreamer1.0-plugins-base:amd64  1.8.3-1ubuntu0.3  amd64  GStreamer plugins from the "base" set
ii  gstreamer1.0-plugins-base-apps  1.8.3-1ubuntu0.3  amd64  GStreamer helper programs from the "base" set
ii  gstreamer1.0-plugins-good:amd64  1.8.3-1ubuntu0.4  amd64  GStreamer plugins from the "good" set
ii  gstreamer1.0-plugins-ugly:amd64  1.8.3-1ubuntu0.1  amd64  GStreamer plugins from the "ugly" set
ii  gstreamer1.0-plugins-ugly-amr:amd64  1.8.3-1ubuntu0.1  amd64  GStreamer plugins from the "ugly" set
ii  gstreamer1.0-pulseaudio:amd64  1.8.3-1ubuntu0.4  amd64  GStreamer plugin for PulseAudio
ii  gstreamer1.0-tools  1.8.3-1~ubuntu0.1  amd64  Tools for use with GStreamer
ii  gstreamer1.0-x:amd64  1.8.3-1ubuntu0.3  amd64  GStreamer plugins for X11 and Pango
ii  libclutter-gst-3.0-0:amd64  3.0.18-1  amd64  Open GL based interactive canvas library GStreamer elements
ii  libgstreamer-plugins-base1.0-0:amd64  1.8.3-1ubuntu0.3  amd64  GStreamer libraries from the "base" set
ii  libgstreamer-plugins-good1.0-0:amd64  1.8.3-1ubuntu0.4  amd64  GStreamer development files for libraries from the "good" set
ii  libgstreamer1.0-0:amd64  1.8.3-1~ubuntu0.1  amd64  Core GStreamer libraries and elements
ii  libreoffice-avmedia-backend-gstreamer  1:5.1.6~rc2-0ubuntu1~xenial10  amd64  GStreamer backend for LibreOffice
ii  phonon-backend-gstreamer:amd64  4:4.8.2-0ubuntu2  amd64  Phonon GStreamer 1.0 backend
ii  phonon-backend-gstreamer-common:amd64  4:4.8.2-0ubuntu2  amd64  Phonon GStreamer 1.0.x backend icons
ii  totem  3.18.1-1ubuntu4  amd64  Simple media player for the GNOME desktop based on GStreamer

Directing the launch towards the compatibility or conversion libraries either with

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l2convert.so /usr/share/skypeforlinux/skypeforlinux

or

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so /usr/share/skypeforlinux/skypeforlinux

launches Skype but doesn't fix the issue. Note that /usr/bin/skype is a bash script launching /usr/share/skypeforlinux/skypeforlinux, which I have used above as test.

Question

Any suggestion on how to have Skype actually send signals through the webcam?

2

I had the same issue and tried a lot of things. I'm using Ubuntu 19.10(eoan), Skype version 8.59.76.73 and libv4l version is 1.16.7-1. My solution to this problem is based on this Ubuntuforums link.

  1. Remove skype completely from your system with

    sudo apt-get purge skype*
    

    or

    snap remove skype
    
  2. Install the libv4l-dev packages

    sudo apt install libv4l-dev
    
  3. Find where the lib4l packages downloaded with the following command,

    find / -iname "*libv4l*" 2>/dev/null
    
  4. Re-install the latest version of skypeforlinux preview version from this Skype repository.

  5. Reboot your system.

  6. With the path for libv4l you found, use the following command to run skypeforlinux

    LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l2convert.so skypeforlinux
    

I hope this helps, I solved my problem with these steps.

3
  • I have also been trying the same Skype version but with version 1.10 of libv4l as supported by Ubuntu 16.04. For your suggestion does not work for me, I then suspect that there could be something wrong in the (communication with) that library, whereby Skype does not activate the webcam. Please note that using Skype pre-release versions implies particular terms and conditions of use, see skype.com/en/legal/skype-preview-program-terms Apr 13 '20 at 8:47
  • are you able to download dev version of the libv4l package on your system? Maybe you can also try with that version. Also you can try to download v4l-utils with sudo apt install v4l-utils .My other suggestion is try to find the correct path for libv4l package to use with *LD_PRELOAD* , try other directories from the result of the 3rd step to find correct v4l2convert.so or v4l2compat.so . I also think same way you do about the communication because other applications such as Zoom and guvcview work well with my external webcam.Thank you to inform me about skype policies
    – galiperkin
    Apr 13 '20 at 10:06
  • Yes I had downloaded the dev packages and updated my post; the same now with v4l-utils (apt show v4l-utils for description) but to no avail. All libv4l-* are set at version 1.10 for Ubuntu 16. Off-note: rather than find ... I often use locate libv4l, which is up to date after having run sudo updatedb Apr 13 '20 at 12:00
2

I know of 2 ways to make your webcam work for skypeforlinux.

  1. Preload one of the Video For Linux compatibility libraries.

    galiperkin mentioned one of them, v4l2convert.so; if that doesn't work, you can search for the other one, v4l1compat.so, and preload it in your command for starting Skype. For example, if you find that library in /usr/lib/x86_64-linux-gnu/libv4l/, close Skype and try this command to start it again:

    LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so skypeforlinux
    

    If it gives you messages about an incompatible ELF version, you might be loading the 64-bit libraries for a 32-bit Skype, or something like that: search for the other version.

  2. Convert exotic webcam output to an accepted format.

    If Skype detects your webcam, but only shows a black rectangle when you open it, then chances are that it just cannot understand the output of the webcam. My own webcam streams in motion jpeg, in a pixel format "yuvj422p" that I never heard of before. Try if ffplay can handle it; if it can, ffmpeg can too, and that might rescue you.

    First list the available inputs

     $ v4l2-ctl --list-devices
    

    My output reads:

     BT878 video (Hauppauge (bt878)) (PCI:0000:05:01.0):
         /dev/video0
         /dev/vbi0
     USB Camera (041e:401f) (usb-0000:00:14.0-11.2):
         /dev/video1
    

    So I select the second one to test:

     $ ffplay -hide_banner -f v4l2 -i /dev/video1
    

    -hide_banner is a convenience parameter, -f v4l2 chooses the demuxer format, -i /dev/video1 my webcam.

    If ffplay handles your webcam well, you can stop it by typing 'q' on it's video window, and then proceed. Install the loopback driver of Video For Linux; you have to do this only once, but you need sudo rights:

     $ sudo apt-get update
     $ sudo apt-get install v4l2loopback-dkms
    

    This puts slightly more than 100kB extra on your disk: the kernel module v4l2loopback. You have to load that into your kernel, another sudo activity:

     $ sudo modprobe v4l2loopback
    

    after which you can immediately detect an extra video input:

     $ v4l2-ctl --list-devices
    

    should now show something like this:

     BT878 video (Hauppauge (bt878)) (PCI:0000:05:01.0):
         /dev/video0
         /dev/vbi0
     USB Camera (041e:401f) (usb-0000:00:14.0-11.2):
         /dev/video1
     Dummy video device (0x0000) (platform:v4l2loopback-000):
         /dev/video2
    

    All that is left to do, is to let ffmpeg take the input from your exotic webcam, convert it to a common format like yuv420p, and output it through the loopback module to the dummy video device. Sounds complicated, but it 's nothing more than this command: input format - input - filter - output format - output

     $ ffmpeg -hide_banner -f v4l2 -i /dev/video1 -vf format=yuv420p -f v4l2 /dev/video2
    

    You can test its working with ffplay again:

     $ ffplay -hide_banner -f v4l2 -i /dev/video2
    

    Note that I am taking the input from the new video device, the dummy; video1 would be occupied while ffmpeg is reading from it.

    I would like to remark that the ff-combo consumes less than 1% of cpu capacity on my 5-year old. If all goes well, stop ffplay by typing 'q' in it's video window, but let ffmpeg continue.

    Now go to your Skype, and in the Audio and Video settings select the loopback device named as above: Dummy video device. If that works well, all that is left to do is to fine tune, and clean up after you. If it does not, I am as sorry as you are.

    Close off ffmpeg when you're ready, by typing q in the terminal it is running in. You might give it another try, and give your good old webcam a virtual update by adding filters to ffmpeg; those can go in additional -vf parameters, or you can add them before or after the format=yuv420p, separated by comma's. Mine needs quite a boost:

     -vf format=yuv420p,spp=quality=3:mode=hard:qp=5,unsharp=3:3:0.7:5:5:-0.5,hqdn3d,eq=saturation=1.8:gamma=1.4
    

    but I am sure you can find your own ffmpeg filters and how to use them. You can try them out with ffplay before adding them to your ffmpeg commandline

    Now you don't want to read this text and type its commands every time you receive or make a Skype call. I've put mine in ~/.bash_aliases as follows, under the alias name videoskype:

     alias videoskype="xterm -e /bin/bash -ic 'sudo modprobe v4l2loopback;echo Ready for video call, press q to stop;ffmpeg -hide_banner -f v4l2 -i /dev/video1 -vf format=yuv420p -f v4l2 /dev/video2;sudo modprobe --remove v4l2loopback'&"
    

    From now on, the single command videoforskype, given in an interactive shell (a normal terminal, or a launcher for something like bash -ic videoskype) will open a terminal that asks for your sudo password to load the loopback module, keeps ffmpeg running until you stop it, and unloads the loopback module.

    Note that the kernel module loader is quite robust: it handles trying to load an already loaded module gracefully. But if you start videoskype again while another instance is running in another terminal, the ffmpeg in the new one can not read from its input, and stops, causing the loopback module to be unloaded and the first ffmpeg to stop as well.

Success!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.