Kurento / bugtracker

[ARCHIVED] Contents migrated to monorepo: https://github.com/Kurento/kurento
46 stars 10 forks source link

elasticRTC - cannot play streams with `@` in rtsp password #173

Closed wojtkowiak closed 4 years ago

wojtkowiak commented 7 years ago

KMS Version:

ElasticRTC Cluster:elastic

     Status:
          CREATE_COMPLETE

     Version: 
          6.6.1.20160930143513

Trying to play a rtsp stream that has @ sign in the password fails.

Here is a bunch of test streams: http://radiusvision.com/live-cameras-demo-clips-mobotix-axis/ They are protected with user axisdemo pass: 19@Axis84.

Tried: rtsp://axisdemo:19@Axis84@axisview1.axiscam.net:8503/axis-media/media.amp also with url encoding: rtsp://axisdemo:19%40Axis84@axisview1.axiscam.net:8503/axis-media/media.amp

Both of those links work in VLC.

razyalov commented 7 years ago

This problem is true also with any URI based media element, such as the recorder. I was trying to use the recorder to stream live data to a non s3-bucket and non-local path, one that requires user:password@host, and although the documentation says it is supported, the code has changed at one point to use a networking library that fails on such values.

ankushsood commented 5 years ago

@wojtkowiak did you find any solution to this problem. I am also face same issue i'm not able to stream videos with '@' character in password.

pocek commented 5 years ago

It's not really a Kurento bug. You need a recent enough GStreamer and percent-encoding will work: https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=0cf08d90c0b6a2a795d53e124eaa80dee285f81d

Helpful debugging commands:

# Try uridecodebin which is used under the hood of k-m-s
gst-launch-1.0 uridecodebin uri='...' ! fakesink
# ...or you can go a more direct way
gst-launch-1.0 rtspsrc location='...' ! fakesink
pocek commented 5 years ago

Final tip: it seems necessary to do the percent-encoding a few times, so @ becomes %252540 instead of just %40.

j1elo commented 4 years ago

Hopefully this will get better when we upgrade to GStreamer 1.14 (but no date for that yet, though)