Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get RTSP stream using RPi node's hostname, but works with its IP address #345

Open
neerajkc opened this issue Oct 16, 2024 · 2 comments

Comments

@neerajkc
Copy link

I have a RPi camera connected to RPi zero 2w on LAN and v4l2rtspserver setup. I am able to receive the video stream on "rtsp://192.168.1.44:8554/unicast", but can't get a connection on "rtsp://rpiz2w1:8554/unicast". I also tried "rtsp://rpiz2w1.local:8554/unicast" but that also doesn't work. Here, IP address is DHCP assigned by router and hostname is rpiz2w1. I am able to ping or ssh into the RPi using both ip address or hostname from my PC, but RTSP is not going through. Any idea how to resolve this? My usecase requires connecting to several RPi+camera nodes via their hostnames since IP addresses may change (say after reboots).

@mpromonet
Copy link
Owner

mpromonet commented Oct 16, 2024

Hi @neerajkc
You need to configure somehow the name resolution, using host file, DNS, mDNS, or whatever.... for instance you may look to avahi.
Best Regards,
Michel.

@neerajkc
Copy link
Author

neerajkc commented Oct 17, 2024

Indeed, I successfully get the stream by hostname on Windows, iPhone, and even on another RPi 4b on the LAN. The problem seems to be on my Ubuntu 22.04 PC. I tried to play around with Avahi according to this wiki. It basically points to the clashes between systemd-resolved (enabled by default) and avahi-daemon services when it comes to mDNS. Tried suggestions on this page, nothing works. Same problem reported on many forums.
I ran the following command on my system:
host -t SOA local
and it returned:
Host local not found: 2(SERVFAIL).
Whereas on RPi 4b it returns correctly:
Host local not found: 3(NXDOMAIN)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants