mkalten / reacTIVision

computer vision framework for tangible interactive surfaces
Other
308 stars 65 forks source link

[linux] v4l2loopback support #20

Closed s-light closed 7 years ago

s-light commented 7 years ago

i tried to use reacTIVision in combination with the v4l2loopback (https://github.com/umlaeute/v4l2loopback) module - (just to have more options to preprocess the camera image - for example stitching multiple streams / applying other prefiltering / feeding video files or static images...)

but currently reacTIVision fails to open the v4l2loopback stream. could this be caused by the loopback-device does not offer controls for brightness and such? is there any compile flag other option to enable more debugging output? i found / changed the makefile to reacTIVision/linux/Makefile

# CFLAGS = $(COPTS) $(SDL_CFLAGS) $(INCLUDES) -DLINUX -DOSC_HOST_LITTLE_ENDIAN -DNDEBUG
CFLAGS = $(CDEBUG) $(SDL_CFLAGS) $(INCLUDES) -DLINUX -DOSC_HOST_LITTLE_ENDIAN

but this does not give me more information in the terminal for 'what happens' and 'why it fails to use the cam' (i asked this question first in the forum at https://sourceforge.net/p/reactivision/discussion/user/thread/db710c28/#)

s-light commented 7 years ago

have looked into the code and found that it does build the device name from the id. but the id is not the device name ending in every case... i will look into it some more..

my problem was that my loop-back device was /dev/video42 (so that it did not interfere with other cams on the system) so if there were two other cams in the system reacTIVision / portvideo tried to open /dev/video2 (as it was the 3 item in the 'list')

i will close this one and open another for the count thing..