Jitsi Linux Embedded webcam /dev/video0 no video, dev build


I’ve build the Jitsi from source in Ubuntu Linux.
Jitsi Installed from apt-get can show the video from the internal webcam (/dev/video0) in Tools - Options Window tab Video, but the dev build fails to do it and fails with error:

2018-07-12 16:38:46.750 SEVERE: [80] util.UtilActivator.uncaughtException().122 An uncaught exception occurred in thread=Thread[FMJ Thread: net.sf.fmj.media.ProcessEngine@d8294b[ net.sf.fmj.media.ProcessEngine@d8294b ] ( realizeThread),9,system] and message was: Could not initialize class org.jitsi.impl.neomedia.codec.FFmpeg
java.lang.NoClassDefFoundError: Could not initialize class org.jitsi.impl.neomedia.codec.FFmpeg
	at org.jitsi.impl.neomedia.codec.video.HFlip.doOpen(HFlip.java:150)
	at org.jitsi.impl.neomedia.codec.AbstractCodec2.open(AbstractCodec2.java:412)
	at net.sf.fmj.media.BasicFilterModule.doRealize(BasicFilterModule.java:83)
	at net.sf.fmj.media.PlaybackEngine.buildTrackFromGraph(PlaybackEngine.java:579)
	at net.sf.fmj.media.ProcessEngine$ProcGraphBuilder.buildTrackFromGraph(ProcessEngine.java:262)
	at net.sf.fmj.media.ProcessEngine$ProcGraphBuilder.buildCustomGraph(ProcessEngine.java:239)
	at net.sf.fmj.media.ProcessEngine$ProcGraphBuilder.buildGraph(ProcessEngine.java:252)
	at net.sf.fmj.media.ProcessEngine$ProcTControl.buildTrack(ProcessEngine.java:688)
	at net.sf.fmj.media.PlaybackEngine.doRealize1(PlaybackEngine.java:1135)
	at net.sf.fmj.media.ProcessEngine.doRealize(ProcessEngine.java:1197)
	at net.sf.fmj.media.RealizeWorkThread.process(BasicController.java:1145)
	at net.sf.fmj.media.StateTransitionWorkThread.run(BasicController.java:1224)

If I switch between tabs and return to the Video tab I see another error in console log:

2018-07-12 16:39:09.347 SEVERE: [44] org.jitsi.impl.neomedia.MediaServiceImpl.log    () Failed to create video preview
    java.io.IOException: ioctl: request= VIDIOC_S_FMT, size= 640x480, pixelformat= 1448695129
    	at org.jitsi.impl.neomedia.jmfext.media.protocol.video4linux2.Video4Linux2Stream.setFdFormat(Video4Linux2Stream.java:736)
    	at org.jitsi.impl.neomedia.jmfext.media.protocol.video4linux2.Video4Linux2Stream.setFdFormat(Video4Linux2Stream.java:695)
    	at org.jitsi.impl.neomedia.jmfext.media.protocol.video4linux2.Video4Linux2Stream.setFd(Video4Linux2Stream.java:604)
    	at org.jitsi.impl.neomedia.jmfext.media.protocol.video4linux2.DataSource.doConnect(DataSource.java:136)
    	at org.jitsi.impl.neomedia.jmfext.media.protocol.AbstractPullBufferCaptureDevice$1.doConnect(AbstractPullBufferCaptureDevice.java:71)
    	at org.jitsi.impl.neomedia.jmfext.media.protocol.AbstractBufferCaptureDevice.connect(AbstractBufferCaptureDevice.java:133)
    	at org.jitsi.impl.neomedia.jmfext.media.protocol.AbstractPullBufferCaptureDevice.connect(AbstractPullBufferCaptureDevice.java:161)
    	at javax.media.Manager.createDataSource(Manager.java:384)
    	at org.jitsi.impl.neomedia.MediaServiceImpl.getVideoPreviewComponent(MediaServiceImpl.java:1075)
    	at net.java.sip.communicator.impl.neomedia.MediaConfigurationImpl.createVideoPreview(MediaConfigurationImpl.java:880)
    	at net.java.sip.communicator.impl.neomedia.MediaConfigurationImpl.createPreview(MediaConfigurationImpl.java:1824)
    	at net.java.sip.communicator.impl.neomedia.MediaConfigurationImpl.access$800(MediaConfigurationImpl.java:60)
    	at net.java.sip.communicator.impl.neomedia.MediaConfigurationImpl$8.onAction(MediaConfigurationImpl.java:1353)
    	at net.java.sip.communicator.impl.neomedia.MediaConfigurationImpl$9$1.run(MediaConfigurationImpl.java:1401)
    	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

How to build or configure the Jitsi to show internal cam video?


I suppose your pixfmt is not supported by our ffmpeg binary.
There are number of formats currently supported.

You can check with v4l-info command.
There is a workaround using LD_PRELOAD and v4l2convert. You can search the archives here, there are several threads about it.


I’ve only pulled jitsi/jitsi master branch from github. I didn’t take any from jitsi/jitsi-lgpl-dependencies. Should download and put somewhere to compile jitsi?

And here my v4l-info:

### v4l2 device info [/dev/video0] ###
general info
	driver                  : "uvcvideo"
	card                    : "USB 2.0 Camera"
	bus_info                : "usb-0000:00:1d.0-1.2"
	version                 : 4.2.8
	capabilities            : 0x84200001 [VIDEO_CAPTURE,?,STREAMING,(null)]


	index                   : 0
	name                    : "Camera 1"
	type                    : CAMERA
	audioset                : 0
	tuner                   : 0
	std                     : 0x0 []
	status                  : 0x0 []

video capture
	index                   : 0
	type                    : VIDEO_CAPTURE
	flags                   : 1
	description             : "Motion-JPEG"
	pixelformat             : 0x47504a4d [MJPG]
	index                   : 1
	type                    : VIDEO_CAPTURE
	flags                   : 0
	description             : "YUYV 4:2:2"
	pixelformat             : 0x56595559 [YUYV]
	type                    : VIDEO_CAPTURE
	fmt.pix.width           : 640
	fmt.pix.height          : 480
	fmt.pix.pixelformat     : 0x47504a4d [MJPG]
	fmt.pix.field           : NONE
	fmt.pix.bytesperline    : 0
	fmt.pix.sizeimage       : 614989
	fmt.pix.colorspace      : unknown
	fmt.pix.priv            : 4276996862

	id                      : 9963776
	type                    : INTEGER
	name                    : "Brightness"
	minimum                 : -64
	maximum                 : 64
	step                    : 1
	default_value           : 0
	flags                   : 0
	id                      : 9963777
	type                    : INTEGER
	name                    : "Contrast"
	minimum                 : 0
	maximum                 : 64
	step                    : 1
	default_value           : 32
	flags                   : 0
	id                      : 9963778
	type                    : INTEGER
	name                    : "Saturation"
	minimum                 : 0
	maximum                 : 128
	step                    : 1
	default_value           : 64
	flags                   : 0
	id                      : 9963779
	type                    : INTEGER
	name                    : "Hue"
	minimum                 : -40
	maximum                 : 40
	step                    : 1
	default_value           : 0
	flags                   : 0
	id                      : 9963788
	type                    : BOOLEAN
	name                    : "White Balance Temperature, Auto"
	minimum                 : 0
	maximum                 : 1
	step                    : 1
	default_value           : 1
	flags                   : 0
	id                      : 9963792
	type                    : INTEGER
	name                    : "Gamma"
	minimum                 : 72
	maximum                 : 500
	step                    : 1
	default_value           : 100
	flags                   : 0
	id                      : 9963795
	type                    : INTEGER
	name                    : "Gain"
	minimum                 : 0
	maximum                 : 100
	step                    : 1
	default_value           : 0
	flags                   : 0
	id                      : 9963800
	type                    : MENU
	name                    : "Power Line Frequency"
	minimum                 : 0
	maximum                 : 2
	step                    : 1
	default_value           : 1
	flags                   : 0
	id                      : 9963802
	type                    : INTEGER
	name                    : "White Balance Temperature"
	minimum                 : 2800
	maximum                 : 6500
	step                    : 1
	default_value           : 4600
	flags                   : 16
	id                      : 9963803
	type                    : INTEGER
	name                    : "Sharpness"
	minimum                 : 0
	maximum                 : 6
	step                    : 1
	default_value           : 3
	flags                   : 0
	id                      : 9963804
	type                    : INTEGER
	name                    : "Backlight Compensation"
	minimum                 : 0
	maximum                 : 2
	step                    : 1
	default_value           : 1
	flags                   : 0

it looks like PIX_FMT yuyv422 supported by Jitsi and my webcam. Jitsi support my cam absolutely because the apt-get version from ubuntu repository can show the cam preview.


Which version do you install from jitsi, which works? The debian packages for the current master and in unstable, is that repo that you are testing and you say it works?
If the preview works, than it is supported.


It seems to me, that I did run in a similar error. But I am not as technical skilled like the posters before me. I have installed Jitsi on my Lubuntu 18.04, but Jitsi could not access the webcam of that notebook, allthough GUVCVIEW has access successfully and does show preview correctly!
I even tried with a USB camera Logitech C270 getting the same results: Jitsi cannot access any webcam.
In Jitsi I can select the webcam via drop down list successfully, but Jitsi preview remains black and camera control light keeps dark.
Because of these observations, I suppose, that it is not a wrong or missing codec, but the unability of Jitsi to simply switch on the webcam.

BTW: I even tried to let Jitsi get access to the webcam, by starting Jitsi with sudo, but I had no success.

Would anybody be so kind to give me a hint, to get rid of this problem?


The preload thing I mentioned earlier maybe solution for you @micro-user. You need to install v4l2convert and then use the correct file in the path and launch jitsi like:
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l2convert.so jitsi


Sorry, I have warned: I am a beginner with Linux! :roll_eyes:
Via Synaptics I found out, that libv4l and v4l2convert is installed allready and it is located in the path, you proposed in your command line.
After I have typed in the complete line
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l2convert.so jitsi
the webcam still remains unactivated.

In the terminal, I got th following lines:

LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l2convert.so jitsi
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender (file:/usr/share/jitsi/lib/felix.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of org.apache.felix.framework.ext.ClassPathExtenderFactory$DefaultClassLoaderExtender
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
    java.lang.UnsatisfiedLinkError: /tmp/jna-857122937/jna11321205994825938460.tmp: libavformat.so.56: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden

I have checked in Synaptic, wether libavformat is installed and yes, it is, but it is named:
libavformat57 and there is nothing with 56 at the end.

Do I perhaps have to edit “v4l-info”? And if so, where do I find it?

Did I miss something?


Please start separate thread and put link to this thread inside to divide DEV an user questions.


I have Jitsi v 2.10.5550 from deb http://download.jitsi.org stable repository (can show webcam image).
And Dev version is Jitsi v 2.11.build.by.SVN form github/jitsi/jitsi/ commit/848ef195b2481c67d4766c6efebb9132570acb07 (the last available commit) - this fails with.
java.lang.NoClassDefFoundError: Could not initialize class org.jitsi.impl.neomedia.codec.FFmpeg

How should Install org.jitsi.impl.neomedia.codec.FFmpeg ?


Have you install openh264 from video settings panel?