elsampsa / valkka-live

OpenSource Video Surveillance Program
GNU Affero General Public License v3.0
31 stars 12 forks source link

Valkka-live installation issues. #3

Closed marek0039 closed 5 years ago

marek0039 commented 5 years ago

Hello I am trying to install Valkka-live on my ubuntu machine. I am following all the steps on https://elsampsa.github.io/valkka-live/_build/html/index.html . It is running on Ubuntu 18.04, python 3.6.7 and pip 19.1.1. this is the error message when I try to run valkka-live

valkka.mvision.__init__ : could not import module movement : 'No module named 'cv2''
valkka.mvision.__init__ : could not import module alpr : 'No module named 'cv2''
valkka.mvision.__init__ : could not import module nix : 'No module named 'cv2''
valkka.mvision.__init__ : could not import module yolo3 : 'No module named 'darknet''
valkka.mvision.__init__ : could not import module yolo2 : 'No module named 'darknet''
valkka.mvision.__init__ : could not import module yolo3tiny : 'No module named 'darknet''
mvision scan: submodule valkka.mvision.base missing MVisionProcess
mvision scan: submodule valkka.mvision.multiprocess missing MVisionProcess
valkka.live : initConfigFiles : first start
valkka.live : save_window_layout : container_dic = {'container_list': [], 'mvision_container_list': []}
valkka.live : readDB : first start
DeviceList :  clearSelection
QCheckBoxColumn: state_changed_slot : live_main
SlotFormSet :  showCurrent: current_row= None
QCheckBoxColumn: state_changed_slot : bind
MemoryConfigForm :  no row!
CPUScheme : cores 16
valkka.live : Using default mem config
CPUScheme : cores 16
GPUHandler: findXScreens: true screens: [<PySide2.QtGui.QScreen object at 0x7feb530ff408>]
gpuhandler : GPUHandler: starting OpenGLThread with :0.0
Invalid MIT-MAGIC-COOKIE-1 keyOpenGLThtead: initGLX: cannot connect to X server :0.0
QObject::~QObject: Timers cannot be stopped from another thread

here is my $DISPLAY:

marekn@Bizon-DevBOX:~$ echo $DISPLAY
:2
elsampsa commented 5 years ago

Hi,

Why is your X screen :0.2 ? Are you trying to do multi-gpu / multi-xscreen stuff?

elsampsa commented 5 years ago

A quick & dirty hack, if you only have one X screen: In Valkka Live source code, look at the file gpuhandler.py, and there, search for the line:

x_connection = ":0." + str(n_gpu)

Substitute it with:

x_connection = ":0." + str(n_gpu+2)

However, if you're doing some multi-gpu / multi-xscreen system, then it seems that Valkka Live can't figure out the correct first X Screen (which in your case is :0.2).

If you have multiple GPUs, each running separate screens (to create massive video walls), read this: https://elsampsa.github.io/valkka-examples/_build/html/multi_gpu.html

In Valkka testsuite, there are demo programs that can handle that situation. Valkka Live has been programmed that in mind as well, but never tested / debugged for multi-gpu case.

marek0039 commented 5 years ago

We got it working thank you.

elsampsa commented 4 years ago

@marek0039, someone has a similar issue. Maybe you could of assistance..? Please see here: https://github.com/elsampsa/valkka-live/issues/6