kerberos-io / web

(DEPRECATED) An open source GUI to configure the machinery and to view events that were detected by the machinery.
https://www.kerberos.io
225 stars 69 forks source link

Error on start page of last 2.0.0 kerberos-web #25

Closed muten84 closed 8 years ago

muten84 commented 8 years ago

Hi i'm trying to use latest develop branch of kerberos-web. I can see start page but all regions are in loading for ever. I think it breaks due to an error on an HTTP GET Request on "stream" path. In my case it breaks on "http://192.168.1.172:8888/stream?topic=undefined&width=532&height=266&quality=100" request. I can observe two strange things:

I tried to invoke that url with port 80 but it redirects me to the main page and returns the same error visible on the browser console debugger.

Additional info: i'm running latest kerberos.io machinery and it prints out nothing on standard output. Config files are setted to point to my H.264/MJPEG ipcam trough http connection that works fine with last stable release with both streams (h.264 and mjpeg). I want to try latest web develop with latest machinery develop to close issue machinery#33 that i've opened :)

Thanks in advance for all.

Luigi B.

cedricve commented 8 years ago

Hello thank you for testing the develop branch.

The reason why all regions are loading is prolly because no images are available in the /etc/opt/kerberosio/capture directory (empty cache). This issue will normally not break the other parts.

The port :8888 is for the livestreaming, when installed the develop branch of the machinery, an livestream will be available on port 8888 (http://192.168.1.172:8888/stream?topic=undefined&width=532&height=266&quality=100"). The reason why the GET request fails is because you don't have the machinery running (or have the master branch running).

I have justed implemented intensive logging (it's an option from the settings page). Please check it out and let me know what you think about it.

PS: I'm currently finishing some extra features and re-writing the documentation for the next release 2.0.0 at the end of april.

Hope this helps.. Cédric

muten84 commented 8 years ago

Hi thanks for response all I can say is that Machinery was running (imho) correctly compiled by myself from develop branch. I will try enabling logging, stay tuned.

muten84 commented 8 years ago

You was right i didn't clone the develop branch for correct machinery compilation. I compiled it again and started it from new binaries. I can see logging verbosity correctly and setted my ipcam MJPG url stream. Unfortunately machinery crashs when tries to receive stream and throws this error:

02/04/2016 14:39:38.200 INFO [trivial] Logging is set to verbose 02/04/2016 14:39:38.200 INFO [trivial] Starting cloud service: S3 02/04/2016 14:39:38.200 INFO [trivial] Starting capture device: IPCamera Assertion val || !min_size failed at ./libavutil/mem_internal.h:33

cedricve commented 8 years ago

Can you show me the output of ffmpeg -v.

muten84 commented 8 years ago

pi@raspberrypi:~ $ ffmpeg -version ffmpeg version git-2015-12-04-325b593 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (Raspbian 4.9.2-10) configuration: --enable-gpl --enable-nonfree --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib --enable-postproc --enable-swscale --enable-pthreads --enable-libdc1394 --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb libavutil 55. 9.100 / 55. 9.100 libavcodec 57. 16.101 / 57. 16.101 libavformat 57. 19.100 / 57. 19.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 20.100 / 6. 20.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100

cedricve commented 8 years ago

looks good, I've just tested the MJPEG connection and it works well but crashes (i'll check this). Did you tried out RTSP?

muten84 commented 8 years ago

Ok i can try, but I have RTP over HTTP conection, it's the same?

cedricve commented 8 years ago

You can try it but RTP is different than RTSP, I don't think it will work. It's strange that you don't had the error with the master branch. Did you update FFMPEG? I've just pushed some extra checks to the develop branch, which solves the problem on my machine. However the error you get is totally different. The ffmpeg version i'm using:

ffmpeg version n2.8.6 Copyright (c) 2000-2016 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) configuration: --enable-gpl --enable-libx264 libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Missing argument for option 'v'. Error splitting the argument list: Invalid argument

muten84 commented 8 years ago

Nevermind RTSP. I pulled your code and i realized that my IPCAM it can manage one single connection. If you make more than one connection at the same time the streams result as a set of corrupted images. So i changed something in the configuration using a proxy server that serves as MJPEG server on port 8081. The server makes 1 connection to my ipcam. Using the URL 127.0.0.1:8081 on kerberos works well. Unfortunately if i leave machinery working for some minutes sometimes still have "Segmentation fault" or [NULL @ 0x29529b0] error count: 268433452 [NULL @ 0x29529b0] error y=17 x=16 Assertion val || !min_size failed at ./libavutil/mem_internal.h:33 problems and it crashes. But this second problem is not reproducible. Segmentation fault can be probably a race condition problem. The second i think is for corrupted image or no images on stream (don't know why, maybe slow connections or someething similar)

I suggest you to check if it has been captured a valid image before using it. I don't know if opencv provides some methods to check it.

I Hope my infos can help for your project . I'm a developer but i have not too familiar with C++, i don't use it since 8 years because i'm using a lot of Java :) , If i can be of help ( unit test , or whatelse ) let me know how to do it, i like to learn new things.

cedricve commented 8 years ago

Thanks for testing, I'll take a deeper look and let you know where it goes wrong.

cedricve commented 8 years ago

Hey, can you pull latest develop and recompile. I've added a fix for the segmentation fault. Please let me know if this works for you..

muten84 commented 8 years ago

Recompiling.... :)

muten84 commented 8 years ago

Great!! It works :)!!

cedricve commented 8 years ago

Cool :) Does the live-streaming works either? If this solved the problem please close the issues.

muten84 commented 8 years ago

I didn't close issue yet because i can't check images and streaming now. I check it only for segmentation fault from log on stdout, (runned with my smartphone in ssh :) ). Stay tuned i will update as soon as possible, Thanks.

cedricve commented 8 years ago

Any update on this ticket ?

muten84 commented 8 years ago

It works all, have only some corrupted stream on image visualization,it happens sometimes but I have to check if is a problem of my IpCamera.