KoynovStas / onvif_srvd

ONVIF Device(IP camera) Service server (Linux daemon)
GNU General Public License v2.0
279 stars 115 forks source link

The actual local IP address is 192.168.*.* ,but the program runs as follows, so the client cannot find it. #27

Closed yuzhimin999 closed 3 years ago

yuzhimin999 commented 3 years ago

The actual local IP address is 192.168.. ,but the program runs as follows, so the client cannot find it.

tcp 0 0 0.0.0.0:1000 0.0.0.0:* LISTEN 10250/./onvif_srvd Please help to check the root cause,thanks a lot.

ubuntu18.0 rtsp://0.0.0.0:8554/live1.h264

yuzhimin999 commented 3 years ago

Failed to get IP address?

KoynovStas commented 3 years ago

What is it: tcp 0 0 0.0.0.0:1000 0.0.0.0:* LISTEN 10250/./onvif_srvd? Describe everything you do. Give the network configuration, interface names and startup script parameters. As you will not understand, developers are not telepathic. We do not know how to read tarot cards and we do not have a crystal ball of predictions!

yuzhimin999 commented 3 years ago

by command: $ netstat -ap Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0 0.0.0.0:8090 0.0.0.0:* LISTEN 3380/ffserver

tcp 0 0 0.0.0.0:1000 0.0.0.0:* LISTEN 3445/./onvif_srvd

yuzhimin999 commented 3 years ago

$ ifconfig enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.41.203 netmask 255.255.255.0 broadcast 192.168.41.255

yuzhimin999 commented 3 years ago

./onvif_srvd --ifs enp0s3 --scope onvif://www.onvif.org/name/TestDev --scope onvif://www.onvif.org/Profile/S --name RTSP --width 800 --height 600 --url rtsp://0.0.0.0:8554/live1.h264 --type H264

yuzhimin999 commented 3 years ago

The Ubuntu18.4 system runs on the virtual machine VM push stream by ffserver ffserver -d -f /etc/ffserver.conf ffmpeg -f v4l2 -i /dev/video0 -s 640x480 -r 24 -vcodec libx264 -an http://127.0.0.1:8090/feed1.ffm

ffserver config

` HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -

File /tmp/feed1.ffm FileMaxSize 10M ACL allow 127.0.0.1 ACL allow 192.168.0.0 192.168.255.255

RTSPPort 8554
RTSPBindAddress 0.0.0.0

# Format rtp # Feed feed1.ffm VideoCodec libx264 # VideoFrameRate 24 VideoBitRate 128 # VideoBufferSize 100 # VideoSize 640x480 # VideoQMin 1 # VideoQMax 31 # NoAudio # AVPresetVideo default AVPresetVideo baseline AVOptionVideo flags +global_header ACL allow localhost ACL allow 192.168.0.0 192.168.255.255 Format status ACL allow localhost ACL allow 192.168.0.0 192.168.255.255 URL http://www.ffmpeg.org/

`

yuzhimin999 commented 3 years ago

Can play "RTSP: / / 0.0.0.0:8554 / live1 h264" video stream by VLC media player

yuzhimin999 commented 3 years ago

my GSOAP_VERSION = 2.8.93

KoynovStas commented 3 years ago

use: --url rtsp://%s:8554/live1.h264!

yuzhimin999 commented 3 years ago

use: --url rtsp://%s:8554/live1.h264!

by command sudo ./onvif_srvd --ifs enp0s3 --scope onvif://www.onvif.org/name/TestDev --scope onvif://www.onvif.org/Profile/S --name RTSP --width 800 --height 600 --url rtsp://%s:8554/live1.h264 --type H264

Still can not be found by the client, very confused@

KoynovStas commented 3 years ago

Client use WS-Discovery? onvif_srvd does not contain WS-Discovery!

yuzhimin999 commented 3 years ago

Client use WS-Discovery? onvif_srvd does not contain WS-Discovery!

Thank you for your support and reply. I am using ONVIF Device Manager of windows.

KoynovStas commented 3 years ago

This application requires support for WS-Discovery. You must either add this functionality to this template, or use the ready-made WS-Discover service. Alternatively, you can take mine: https://github.com/KoynovStas/wsdd

Your problem is that you do not fully understand how it works. check out the onwif documentation.

yuzhimin999 commented 3 years ago

This application requires support for WS-Discovery. You must either add this functionality to this template, or use the ready-made WS-Discover service. Alternatively, you can take mine: https://github.com/KoynovStas/wsdd

Your problem is that you do not fully understand how it works. check out the onwif documentation.

Thank you very much, your suggestion is very good, it is already working normally.