roflcoopter / viseron

Self-hosted, local only NVR and AI Computer Vision software. With features such as object detection, motion detection, face recognition and more, it gives you the power to keep an eye on your home, office or any other place you want to monitor.
MIT License
1.78k stars 182 forks source link

Black Record file #832

Closed lio00lio closed 1 week ago

lio00lio commented 2 weeks ago

Hi all,

I just implemented Viseron on my system. I use casaOS for the hostOS (Debian 12).

I have 5 cameras configured but all records files are completely black.

Config:

ffmpeg:
  camera:
    camera_1:
        name: camera_1
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

    camera_2:
        name: camera_2
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

    camera_3:
        name: camera_3
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

    camera_4:
        name: camera_4
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

    camera_5:
        name: camera_5
        host: HostIP
        port: 554
        path: /Preview_01_main
        fps: 20
        username: username
        password: password
        substream:
            port: 554
            path: /Preview_01_sub
            fps: 10

mog2:
  motion_detector:
    cameras:
      camera_1:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true
      camera_2:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true
      camera_3:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true
      camera_4:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true
      camera_5:  # Attach detector to the configured camera_2 above
        fps: 10
        trigger_recorder: true

nvr:
  camera_1:  # Run NVR for camera_1
  camera_2:  # Run NVR for camera_2
  camera_3:  # Run NVR for camera_1
  camera_4:  # Run NVR for camera_2
  camera_5:  # Run NVR for camera_1

The live view is ok, I can see the correct camera immage

lio00lio commented 2 weeks ago

image

lio00lio commented 2 weeks ago

image

roflcoopter commented 1 week ago

Do you get any errors in the browser console? If not, could you play the video in VLC for instance and check the Media Information/Codec Information?

lio00lio commented 1 week ago

Thanks a lot for the answer. If I download the file and check it with VLC, I can see the record section. From VLC I can see: image

lio00lio commented 1 week ago

Sorry, i change the language on VLC in EN to re-share the codec information: image

roflcoopter commented 1 week ago

Thanks!

And no errors in the browser console?

lio00lio commented 1 week ago

only this https://github.com/roflcoopter/viseron/issues/832#issuecomment-2467955028

roflcoopter commented 1 week ago

I meant in the browser devtools console, in chrome you can open it with F12

lio00lio commented 1 week ago

image

No, no error for the networks tab and no mistake in the console, only this on the setTime method: image

lio00lio commented 1 week ago

image

roflcoopter commented 1 week ago

If it's possible to change your cameras encoding to h264 instead of hevc, please try if that works

lio00lio commented 1 week ago

unlike i cannot do it: https://community.reolink.com/topic/2961/codec-rlc-810a

Reolink cameras mainstream is only h265 and I cannot be changed

roflcoopter commented 1 week ago

Ahh i see, can you run a quick test with the substream instead then? If it still produces black video we can rule out the encoding.

lio00lio commented 1 week ago

with the substream, the file is visible from the web interface. but is in 640p

lio00lio commented 1 week ago

sorry, it is just an issue with the browser, with google chrome last version (compatible with V9 video stream) is working as expected