QuantumEntangledAndy / neolink

An RTSP bridge to Reolink IP cameras
GNU Affero General Public License v3.0
297 stars 44 forks source link

neolink image dont work in docker container #99

Closed xmow49 closed 1 year ago

xmow49 commented 1 year ago

Describe the bug When I run neolink image --config=/etc/neolink.toml --file-path=snap cam05 in the neolink container I have this error msg:

bash-5.1# neolink image --config=/etc/neolink.toml --file-path=snap cam05
[2023-06-03T09:28:32Z INFO  neolink] Neolink 384a0271bdbcf3227d4160859c052e8c1cb9d1f8 release
[2023-06-03T09:28:32Z INFO  neolink::utils] cam05: Connecting to camera at UID: XXXXXXXXXXXXNKV
[2023-06-03T09:28:32Z INFO  neolink_core::bc_protocol] cam05: Trying local discovery
[2023-06-03T09:28:33Z INFO  neolink_core::bc_protocol] cam05: Local discovery success XXXXXXXXXXXXNKV at 192.168.X.XX:42054
[2023-06-03T09:28:33Z INFO  neolink::utils] cam05: Logging in
[2023-06-03T09:28:33Z INFO  neolink::utils] cam05: Connected and logged in
[2023-06-03T09:28:36Z INFO  neolink::image::gst] appsrc name=thesource ! h264parse ! decodebin ! jpegenc snapshot=TRUE
                    ! filesink location=snap.jpeg
[2023-06-03T09:28:41Z WARN  neolink::image::gst] Error from gstreamer when setting the play state Error(Message { ptr: 0x7efda4001a00, type: "error", seqnum: 77, src: Some("decodebin0"), structure: Some(GstMessageError { gerror: (GError) ((GError*) 0x7efda402f850), debug: (gchararray) "../gst/playback/gstdecodebin2.c(4719): gst_decode_bin_expose (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0:\nno suitable plugins found:\nMissing decoder: H.264 (High Profile) (video/x-h264, width=(int)1920, height=(int)1072, framerate=(fraction)0/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, codec_data=(buffer)01640028ffe1000a67640028ace8078021e401000468ee3cb0)\n" }) }) setting to Null instead
thread 'tokio-runtime-worker' panicked at 'A Tokio 1.x context was found, but it is being shutdown.', /github/home/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.27.0/src/runtime/time/entry.rs:553:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

To Reproduce Docker-compose:

services:
  neolink:
    image: quantumentangledandy/neolink:v0.5.12
    container_name: neolink
    ports:
      - 9002:8554
    volumes:
      - /home/test/mnt:/etc/
    restart: unless-stopped
    network_mode: host

config.toml

bind = "0.0.0.0"
[[users]]
name = "admin"
pass = "XXXXXXXXXXX"

[[cameras]]
name = "cam05"
username = "admin"
password = "XXXXXXXXXX"
uid = "XXXXXXXXXXXXXXXXXXX"
mqtt.broker_addr = "192.168.X.XX"
mqtt.port = 1883
mqtt.credentials = ["admin", "XXXXXXXX"]
stream = "subStream"
  [cameras.pause]
  on_motion = true # Should pause when no motion
  on_client = true # Should pause when no rtsp client
  timeout = 2.1 # How long to wait after motion stops before pausing

Expected behavior Get a snapshot from the cam.

Versions Neolink software: 0.5.12 Reolink camera model and firmware: Argus Eco

QuantumEntangledAndy commented 1 year ago

There seems to be no decoder for h264 in the docker image. Should probably see what package that is in and add it

QuantumEntangledAndy commented 1 year ago

This is being addressed in #106

QuantumEntangledAndy commented 1 year ago

Should be fixed now please tell me if not