Viseron v3.0.0b1 - Self-hosted, local only NVR and AI Computer Vision software

No.
Doesnt work either. Needs to be root to work even with the privileged flat

Okay, too bad.

I will leave it at that for now, permissions can be a real rabbit hole and as i dont have a device to test with it will be very hard to figure out.

Just one more thing, does dev work fine aswell when running as root?

yes. tried :dev with root and it loads the edgetpu.

Im now trying to load a second camera and getting this error

[2021-06-18 11:40:02] [DEBUG   ] [viseron.camera.stream.bruno] - FFMPEG decoder command: bruno -hide_banner -loglevel error -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts -use_wallclock_as_timestamps 1 -vsync 0 -stimeout 5000000 -c:v h264_cuvid -rtsp_transport tcp -i rtsp://*****:*****@192.168.1.11:554/videoMain -f segment -segment_time 5 -reset_timestamps 1 -strftime 1 -c:v copy -c:a copy /segments/bruno/%Y%m%d%H%M%S.mp4 -filter:v fps=1 -f rawvideo -pix_fmt nv12 pipe:1
[2021-06-18 11:40:03] [DEBUG   ] [viseron.nvr.office.object] - All objects: []
[2021-06-18 11:40:04] [ERROR   ] [viseron.camera.stream.bruno] - [mp4 @ 0x5649cc4ab4c0] Could not find tag for codec pcm_mulaw in stream #1, codec not currently supported in container
[2021-06-18 11:40:04] [ERROR   ] [viseron.camera.stream.bruno] - Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
[2021-06-18 11:40:04] [ERROR   ] [viseron.camera.stream.bruno] - Error initializing output stream 0:1 -- 
[2021-06-18 11:40:04] [ERROR   ] [viseron.camera.stream.bruno] - 
[2021-06-18 11:40:04] [ERROR   ] [viseron.camera.bruno    ] - FFmpeg process has exited

I’ve set it up with this config:

  - name: bruno
    mqtt_name: viseron_bruno
    host: 192.168.1.11
    port: 554
    username: admin
    password: passwd
    path: /videoMain
    width: 1280
    height: 720
    fps: 15
    motion_detection:
      interval: 1
      trigger_detector: false
    object_detection:
      interval: 1
      labels:
        - label: person
          confidence: 0.7
        - label: pottedplant
          confidence: 0.9
    static_mjpeg_streams:
      bruno-stream:
        width: 1280
        height: 720
        draw_objects: True
        draw_motion: False

whiich is the same I have for the first camera currently working.
Difference is this is foscam, first one is ezviz.

Ok, quick google. seems sound encoding problem.

Yes its a problem with the audio codec not being supported in .mp4 container.
You can swap to .mkv to get around this:

recorder:
  extension: mkv

Perfect. Thank you.

I wanted to try viseron, because it incorporates face recognition and using the coral + gpu will be much more efficient than running 3 or 4 containers to sort of achieve the same.

Is there a ui in future plans? i.e. to monitor cameras, check recordings, etc?

Thats the idea of Viseron really to incorporate as much computer vision functionality as possible.
The built-in face recognition is not super accurate tho, and the next version includes DeepStack face recognition which is far superior.

Yes a UI is in the works already but its quite a lot of work and so far I am doing this alone.
It will probably take a few months before i get there unfortunately.

1 Like

Thank you for your response and all your guidance.
Much appreciated.

1 Like

1.9.0 - DeepStack, Jetson Nano and stability improvements

This release brings support for DeepStack object detection aswell as face detection.
Another exciting feature is the support for the Jetson Nano!

Other than that I have spent a lot of effort to increase the stability of Viseron.
Viseron now handles missbehaving cameras in a much better way.

If a camera is unavailable during startup, Viseron will continue to try and reconnect. This is to help against temporarily unavailable cameras.
Viseron carefully monitors any subprocesses or threads that are started, and in the case of one crashing, it will be restarted accordingly.

There are a few more goodies in this one, aswell as some breaking changes. Make sure to read the changelog .

Enjoy!

5 Likes

I finally got around to installing Viseron, using the docker compose sample script with portainer. After a bit of fiddling, it seems to start up nicely, and keeps running - even recording on the one camera I’m testing it with. However … it seems like none of the hardware accelerations options is being detected/used (no OpenCL, no cuda, no nothing), despite having capable hardware available. Output of nvidia-smi as follows:


I already replaced the old standard debian nvidia driver with the most recent backported, but that doesn’t seem to help. Do you think it would help installing the latest and greatest from Nvidia itself ? Or any other suggestions ?
Thanks for looking into this - and even more for what seems to be a very promising NVR platform with unequalled support …

Thanks for checking out Viseron!
Sorry for the late reply, I am in the process of moving right now.

Can you show me the logs from when the container starts?
It outputs information on what hardware acceleration methods are available

Of course - I did not initially, because as I said it simply seems to not detect any method - especially not the CUDA I was hoping for. Anyway, here goes :

2021-08-06T07:27:19.793828000Z [s6-init] making user provided files available at /var/run/s6/etc…exited 0.,
2021-08-06T07:27:19.833905000Z [s6-init] ensuring user provided files have correct perms…exited 0.,
2021-08-06T07:27:19.835346000Z [fix-attrs.d] applying ownership & permissions fixes…,
2021-08-06T07:27:19.836479000Z [fix-attrs.d] done.,
2021-08-06T07:27:19.837479000Z [cont-init.d] executing container initialization scripts…,
2021-08-06T07:27:19.838872000Z [cont-init.d] 10-adduser: executing… ,
2021-08-06T07:27:19.852075000Z usermod: no changes,
2021-08-06T07:27:19.855825000Z ************************ UID/GID *************************,
2021-08-06T07:27:19.859087000Z User uid: 0,
2021-08-06T07:27:19.859225000Z User gid: 0,
2021-08-06T07:27:19.859337000Z ************************** Done **************************,
2021-08-06T07:27:19.859638000Z [cont-init.d] 10-adduser: exited 0.,
2021-08-06T07:27:19.860674000Z [cont-init.d] 20-gid-video-device: executing… ,
2021-08-06T07:27:19.865604000Z [cont-init.d] 20-gid-video-device: exited 0.,
2021-08-06T07:27:19.866535000Z [cont-init.d] 30-edgetpu-permission: executing… ,
2021-08-06T07:27:19.868902000Z ************** Setting EdgeTPU permissions ***************,
2021-08-06T07:27:19.889405000Z Coral Vendor IDs:,
2021-08-06T07:27:19.889582000Z “1a6e”,
2021-08-06T07:27:19.889690000Z “18d1”,
2021-08-06T07:27:19.889797000Z No EdgeTPU USB device was found,
2021-08-06T07:27:19.889900000Z ************************** Done **************************,
2021-08-06T07:27:19.890098000Z [cont-init.d] 30-edgetpu-permission: exited 0.,
2021-08-06T07:27:19.891054000Z [cont-init.d] 40-set-env-vars: executing… ,
2021-08-06T07:27:19.894388000Z ****** Checking for hardware acceleration platforms ******,
2021-08-06T07:27:19.899819000Z OpenCL cannot be used,
2021-08-06T07:27:19.902588000Z VA-API cannot be used,
2021-08-06T07:27:20.109842000Z CUDA cannot be used,
2021-08-06T07:27:20.109988000Z *********************** Done *****************************,
2021-08-06T07:27:20.110254000Z [cont-init.d] 40-set-env-vars: exited 0.,
2021-08-06T07:27:20.111064000Z [cont-init.d] 50-check-if-rpi: executing… ,
2021-08-06T07:27:20.112936000Z ********** Checking if we are running on an RPi **********,
2021-08-06T07:27:20.115135000Z Not running on any supported RPi,
2021-08-06T07:27:20.115297000Z *********************** Done *****************************,
2021-08-06T07:27:20.115698000Z [cont-init.d] 50-check-if-rpi: exited 0.,
2021-08-06T07:27:20.116817000Z [cont-init.d] 55-check-if-jetson: executing… ,
2021-08-06T07:27:20.118511000Z ****** Checking if we are running on a Jetson Board ******,
2021-08-06T07:27:20.119819000Z Not running on any supported Jetson board,
2021-08-06T07:27:20.119948000Z *********************** Done *****************************,
2021-08-06T07:27:20.120377000Z [cont-init.d] 55-check-if-jetson: exited 0.,
2021-08-06T07:27:20.121378000Z [cont-init.d] 60-ffmpeg-path: executing… ,
2021-08-06T07:27:20.123409000Z ****************** Getting FFmpeg path *******************,
2021-08-06T07:27:20.124636000Z FFmpeg path: /usr/local/bin/ffmpeg,
2021-08-06T07:27:20.124877000Z *********************** Done *****************************,
2021-08-06T07:27:20.125343000Z [cont-init.d] 60-ffmpeg-path: exited 0.,
2021-08-06T07:27:20.126252000Z [cont-init.d] done.,
2021-08-06T07:27:20.127280000Z [services.d] starting services,
2021-08-06T07:27:20.132564000Z [services.d] done.,
2021-08-06T07:27:20.541446000Z [2021-08-06 07:27:20] [INFO ] [viseron ] - -------------------------------------------,
2021-08-06T07:27:20.541624000Z [2021-08-06 07:27:20] [INFO ] [viseron ] - Initializing…,
2021-08-06T07:27:20.615370000Z [2021-08-06 07:27:20] [INFO ] [viseron.mqtt ] - Initializing MQTT connection,
2021-08-06T07:27:20.697740000Z [2021-08-06 07:27:20] [INFO ] [viseron ] - Initializing NVR threads,
2021-08-06T07:27:22.837607000Z [2021-08-06 07:27:22] [INFO ] [viseron ] - Initialization complete,
2021-08-06T07:27:27.717155000Z [2021-08-06 07:27:27] [INFO ] [viseron.camera.babyphone] - FFMPEG frame grabber stopped,

Interesting, could you show me your docker-compose as well?

Sure. I simply used the one in your readme under the ‘Linux machine with NVIDIA GPU’ heading, i.e.

version: "2.4"

services:
  viseron:
    image: roflcoopter/amd64-cuda-viseron:latest
    container_name: viseron
    volumes:
      - <recordings path>:/recordings
      - <config path>:/config
      - /etc/localtime:/etc/localtime:ro
    runtime: nvidia

which I dropped in Portainer to build the container.
It however initially refused to do so, complaining about the ‘runtime’ line (saying something about ‘invalid option’ I think). And TBH, I do not remember whether I then simply removed the offending line, or (probably) just removed its indent.
Anyway, after that Portainer did its thing without further ado, and I could start the container - alas without CUDA.

Of course, it seems suspicious that the initial failure had to do with an nvidia-related setting …

As an aside: is it normal that the container’s size is a whopping 7.4 GB ?

runtime: nvidia is required to get GPU support in the container, not sure how portainer handles that.

Have you used other applications in docker with GPU support?

Regarding the size, yes it is normal since it includes all the CUDA libraries

Sorry if this has been asked but I was curious if this would work with my arlo cameras? You mentioned arlo but it wasn’t clear to me if you got new cameras or just a new app. I like the cameras but I am not paying for a subscription as I have the older pro 2s that don’t require one but still give me 7 days cloud storage. Thanks

Arlo is not supported atm, sorry for the confusion!
Its on my todo list tho, i think it could be useful to a lot of people

Is there support to install Viseron directly on linux without docker? I’m interested in installing it in an LXD container.

There is not unfortunately.
There is no reason it wouldnt work tho, you could look through the Dockerfile and see whats being installed.
The Docker image does run some scripts on startup, to enable automatic detection of hardware accelerations, so that is something to consider as well

1 Like

I might have missed some details, but unfortunately was not able to install it inside Home Assistant OS, for the docker command it says that not recognized, is there any tutorial/guide available how to make this work inside HAOS? Would be nice to try this out. Thanks!

I am not familiar with HAOS unfortunately.
What is the command you are running and whats the error message?