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

RTSP authentication with username only? #565

Closed
roaringbits opened this issue Dec 6, 2017 · 7 comments
Closed

RTSP authentication with username only? #565

roaringbits opened this issue Dec 6, 2017 · 7 comments

Comments

@roaringbits
Copy link

roaringbits commented Dec 6, 2017

I'm trying to integrate two Guudgo SC-02 camera's, which have a RSTP stream which I can access just fine through VLC.

Only the username is set (admin) and cannot be changed, and I'm trying to configure the stream to authenticate without the password (also cannot be set).

If I set no password (see below), motion does no authentication at all, but I would expect motion to use at least the username;

netcam_userpass admin:
netcam_url rtsp://192.168.0.xxx:554/

Is there any way to allow this? The result URL should be;

rtsp://admin@192.168.0.xxx:554/

  1. version [x.y.z, hash, other]: 4.0.1
  2. installed as a package or compiled from sources [deb, rpm, git, other]: deb
  3. standalone or part of third party [motion, MotionEyeOS, other]: motion
  4. video stream source [V4L (card or USB), net cam (mjpeg, rtsp, other), mmal]: rtsp
  5. hardware [x86, ARM, other]: x86
  6. operating system [Linux (which), FreeBSD, other]: ubuntu
@tosiara
Copy link
Member

tosiara commented Dec 6, 2017

Hm, so you mean you have credentials that consist of only a user name and an empty password and cannot be changed? It could be a bug that motion doe not expect empty password. This would need to be checked

Meanwhile, have you tried rtsp://admin:@192.168.0.xxx:554/ ?

@roaringbits
Copy link
Author

roaringbits commented Dec 6, 2017

Yes, this results in the following:

[3:ml3] [ALR] [NET] netcam_start: Network Camera thread starting... for url (rtsp://admin:@192.168.0.xxx:554/)
[3:ml3] [ERR] [ENC] ffmpeg_avcodec_log: method DESCRIBE failed: 401 Unauthorized
[3:ml3] [ERR] [NET] netcam_rtsp_open_context: unable to open input(rtsp://192.168.0.xxx:554/): Server returned 401 Unauthorized (authorization failed)

@tosiara
Copy link
Member

tosiara commented Dec 6, 2017

Ok, then we need to wait for @Mr-Dave 's input whether empty password works in motion's rtsp

@Mr-Dave
Copy link
Member

Mr-Dave commented Dec 6, 2017

Based upon the above, what are the results when you do not specify the username at all? Typically, if there is no password, that means, there is no authentication at all. Also, you should try the exact url (rtsp://admin:@192.168.0.xxx:554/) in ffplay and validate it works there.

Additional note: You should check version 4.1 rather than 4.0. Also make sure to specify the username only in the configuration parameter rather than embedded into the configuration parameter url. In version 4.1, it takes the configuration parameter "as is" and simply prepends it the url rather than trying to parse out a username and password which is what it did in version 4.0.

@roaringbits
Copy link
Author

roaringbits commented Dec 6, 2017

No username at all returns a 401 as well.

When using ffplay on my laptop it works.

@Mr-Dave
Copy link
Member

Mr-Dave commented Dec 8, 2017

Please make sure to update the status after you have upgraded to Motion version 4.1

@roaringbits
Copy link
Author

Upgrading fixed my issue, thanks! :)

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

3 participants