QuantumEntangledAndy / neolink

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

GStreamer plugin missing #23

Closed anthonws closed 1 year ago

anthonws commented 1 year ago

Docker, main version.

Not sure if expected or not.

[2023-01-08T18:11:00Z WARN neolink::rtsp::gst] Missing the gstreamer plugin x264 (gst-plugins-ugly) for x264enc element. Required to paused certain cameras [2023-01-08T18:11:00Z WARN neolink::rtsp::gst] Missing the gstreamer plugin libav (gst-libav) for avdec_h264 element. Required to paused certain cameras [2023-01-08T18:11:00Z WARN neolink::rtsp::gst] Missing the gstreamer plugin libav (gst-libav) for avdec_h265 element. Required to paused certain cameras

QuantumEntangledAndy commented 1 year ago

Yea it's expected. One of the most common issues on GitHub is related to missing gstreamer plugins. I added a feature where it would report if any plugins were missing to help diagnose issues. These plugins in your log are optional and only used if you use the pause feature.

I'm not sure how you installed gstreamer but some plugins are omitted from some installation methods for license reasons. So it might be that.

anthonws commented 1 year ago

Thanks for the reply! I installed neolink using the docker method, so gstreamer should be bundled in the image, correct? I do intend to use the pause feature, given I have several battery cameras (Argus 2E). Right now I have it working solely for an E1 Pro (non-battery powered).

QuantumEntangledAndy commented 1 year ago

Yeah should work all bundle together in the docker. For battery you will need UDP which is easiest to do by putting the docker on host network mode.

QuantumEntangledAndy commented 1 year ago

I think you can still use the pause feature without these plugins as long as the pause mode is "none". That mode doesn't do a decode so it dosent need those plugins.

thatguyinoz commented 1 year ago

Hi

Thanks for all your effort working on this project. I'm hitting a similar issue. I have a bare metal ubuntu install. Linux Office 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Im getting Fatal ERRORs, not WARNings that can be ignored:

Office:~/reolink$ neolink_linux_x86_64_ubuntu/neolink rtsp --config=test_config.toml [2023-03-28T03:23:53Z INFO neolink] Neolink 4fcaf4d538dc6e05434690bdf7f3a3bc22b077e3 release [2023-03-28T03:23:53Z ERROR neolink::rtsp::gst] Missing required gstreamer plugin "videoparsersbad (gst-plugins-bad)" for "h264parse" element. Required for certain types of camera [2023-03-28T03:23:53Z ERROR neolink::rtsp::gst] Missing required gstreamer plugin "videoparsersbad (gst-plugins-bad)" for "h265parse" element. Required for certain types of camera [2023-03-28T03:23:53Z WARN neolink::rtsp::gst] Missing the gstreamer plugin "x265 (gst-plugins-bad)" for "x265enc" element. Required to paused certain cameras Error: Required Gstreamer Elements are missing. Ensure gstreamer is installed correctly

Office:~/reolink$ dpkg -l|grep gstreamer ii gir1.2-gstreamer-1.0:amd64 ii gstreamer1.0-alsa:amd64 ii gstreamer1.0-clutter-3.0:amd64 ii gstreamer1.0-gl:amd64 ii gstreamer1.0-gtk3:amd64 ii gstreamer1.0-libav:amd64 ii gstreamer1.0-packagekit ii gstreamer1.0-pipewire:amd64 ii gstreamer1.0-plugins-bad:amd64 ii gstreamer1.0-plugins-base:amd64 ii gstreamer1.0-plugins-base-apps ii gstreamer1.0-plugins-good:amd64 ii gstreamer1.0-plugins-ugly:amd64 ii gstreamer1.0-pulseaudio:amd64 ii gstreamer1.0-tools ii gstreamer1.0-x:amd64 ii libgstreamer-gl1.0-0:amd64 ii libgstreamer-plugins-bad1.0-0:amd64 ii libgstreamer-plugins-base1.0-0:amd64 ii libgstreamer-plugins-good1.0-0:amd64 ii libgstreamer1.0-0:amd64

I was initially using the neolink repo from thirtythreeforty successfully, but switched to your repo for the MQTT support. it seems that you are looking for additional/different libs? ( Im guessing here as its a bit past my skillset :-) ) I have tried installing various additional gstreamer and libgstreamer packages, including the :386 versions with no success. Can you please confirm what package the h265parse and h264parse modules were in?

regards

QuantumEntangledAndy commented 1 year ago

It might be best to check with

gst-inspect-1.0

That should list all plugins it can load. If it fails to list the parsers but you have installed the bad plugin then you might not have your environment setup right. I believe gstreamer searches for the plugins in certain places and perhaps Ubuntu changed something that stops them from being found.

thatguyinoz commented 1 year ago

Hi All hopefully this is useful to others. it seems that although the plugin was installed correctly, that module was blacklisted for some reason. running Office:~/reolink$ gst-inspect-1.0 returned this as the last line of output. 261 plugins (10 blacklist entry not shown), 1560 features

enabling debug output and inspecting the actual library file

Office:~/reolink$ GST_DEBUG=4 gst-inspect-1.0 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgst_some_plugin.so returned no relevant info.

Clearing the gstreamer cache file appeared to remove all the blacklist entries Office:~/reolink$ rm ~/.cache/gstreamer-1.0/registry.x86_64.bin

Office:~/reolink$ gst-inspect-1.0 now shows this as the last line of output. 261 plugins (1 blacklist entry not shown), 1560 features

neolink now connectes to the camera with no errors :-)

Office:~/reolink$ neolink_linux_x86_64_ubuntu/neolink rtsp --config=test_config.toml

[2023-03-29T02:08:01Z INFO neolink] Neolink 4fcaf4d538dc6e05434690bdf7f3a3bc22b077e3 release [2023-03-29T02:08:01Z INFO neolink::rtsp] Starting RTSP Server at 0.0.0.0:8554 [2023-03-29T02:08:01Z INFO neolink::rtsp::states] D500: Connecting to camera at Address: 192.168.150.114:9000 [2023-03-29T02:08:01Z INFO neolink::rtsp::states] D500: Logging in [2023-03-29T02:08:01Z INFO neolink::rtsp::states] D500: Successfully logged in [2023-03-29T02:08:01Z INFO neolink::rtsp::states] D500: Camera time is already set: 2023-03-29 10:08:01 +8 [2023-03-29T02:08:01Z INFO neolink::rtsp::states] D500: Camera reports firmware version v3.0.0.108_20092315 [2023-03-29T02:08:01Z INFO neolink::rtsp::states] D500: Starting stream [2023-03-29T02:08:01Z INFO neolink::rtsp::states::streaming] D500: Starting video stream Main Stream (Clear) [2023-03-29T02:08:01Z INFO neolink::rtsp::states] D500: Successfully started streaming

Thanks for the prompt response to my query.

QuantumEntangledAndy commented 1 year ago

I'm going to close this now since the method that plugins are detected now has changed to be on first attempted usage rather then per-emptivly. This means that if you don't use a certain plugin (like h264 if you have a h265 camera) you won't get an error at the beginning or the app but rather when you first start to stream