thirtythreeforty / neolink

An RTSP bridge to Reolink IP cameras
https://www.thirtythreeforty.net/posts/2020/05/hacking-reolink-cameras-for-fun-and-profit/
GNU Affero General Public License v3.0
893 stars 151 forks source link

Unable to view stream using vlc - "Failed to connect", "Failed to setup RTSP session" #333

Open mailq opened 1 year ago

mailq commented 1 year ago

Describe the bug Preface: This is an exact duplicate of issue #42 - as explicitly requested.

Neolink does not work with VLC as it fails with the stated exception.

To Reproduce

  1. Create this configuration file:
    
    bind = "0.0.0.0"

[[cameras]] name = "one" username = "user" password = "MY PASSWORD" address = "10.0.0.21:9000"

2. Launch Neolink on docker:

docker run \ -p 8554:8554 \ --restart=on-failure \ --volume=$PWD/config.toml:/etc/neolink.toml \ thirtythreeforty/neolink

4. Start vlc (on Linux)
`vlc rtsp://10.0.0.25:8554/one`
5. Experience the following error on the console
`[00007f3434001650] satip stream error: Failed to setup RTSP session`

**Expected behavior**
One should at least see video playing. Audio would be bonus.

So the question of issue #42 is still valid: Do I need more vlc command line flags?

**Versions**
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
Neolink software: Docker image (latest, 0.4.0)
Reolink camera model and firmware: Reolink E1 v3.0.0.115_20102200

**Addistional information**
With the workaround specified in #42 (format) one can see this error in the neolink protocol:

[2023-01-07T22:09:48Z INFO neolink] Neolink 0.4.0 (unknown commit) release [2023-01-07T22:09:48Z WARN neolink::rtsp] The format config option of the camera has been removed in favour of auto detection.


**Distinction**
With both configuration other software works as expected. Verified software:
1. Home Assistant with Generic Camera
2. totem 42.0
QuantumEntangledAndy commented 1 year ago

Ok so as I said this is not a duplicate of 42 because 42 would not play at all not even on ha or totem.

Please remove the config option stream it doesn't do anything anymore that's why you get the message when you turn it on.

The first thing to check is if we can see vlc initiate the connection at all. To do this:

Start the docker with the extra env variable of GST_DEBUG=3. This should put gstreamer into debug mode and print extra things when you try to connect to it. Please try to connect with vlc while this log mode is enabled and post the results here.

Please also send some extra information about your tests are ha and totem on the same machine as neolink perhaps? Maybe this is the difference between them.