xibosignage / xibo-linux

Xibo for Linux - Digital Signage Player
https://xibo.org.uk/xibo-for-linux
GNU Affero General Public License v3.0
76 stars 54 forks source link

LocalVideo: URL not being decoded #254

Closed gamenfs closed 2 years ago

gamenfs commented 2 years ago

Hi I found a partial solution for this problem: https://community.xibo.org.uk/t/rtsp-link-dont-work-on-xibo-linux-player/26304 When I start stream from IP camera on CMS and put layout to client, I get the following error: [14:46:51.519] [5060] [error]: [LayoutParser - RegionParser - MediaParser - URI] Layout 36 is invalid or missing. Reason: Parse error: rtsp://login:password%40ip/Streaming/Channels/101 The problem is that the client cannot correctly recognize the @ symbol If I change %40 to @ in the client's uri .xlf file - stream get start. What module encodes the uri? How is it possible to add this character to the exception?

gamenfs commented 2 years ago

I found a method to start a rtsp stream. Since the problem is in decoding the uri, I changed the method of writing to an xls file without encryption. To do this, you need to on the server in the file /srv/xibo-cms/lib/Widget/LocalVideo.php change the line:$this->setOption('uri', urlencode($sanitizedParams->getString('uri'))); to $this->setOption('uri', $sanitizedParams->getString('uri')); I hope this helps someone

dasgarner commented 2 years ago

Thanks for reporting this issue - your workaround might break the XLF file generation or transfer to the player, so the correct fix is for the Linux player to url decode the data it finds in the XLF.

I'll log this up as a bug to be fixed when we can.

Thanks

m00p commented 2 years ago

Hi,

I have the same problem. I applied the fix in the LocalVideo.php and the url in the xlf file gets trough.

But the player still doesn't want the play the stream [error]: [LayoutParser - RegionParser - MediaParser] Layout 20 is invalid or missing. Reason: map::at

My url is a bit more complex and i needed to write & correct in the cms like & , so I don't know if the player is having trouble with other characters:

rtsp://Xibo:Xibo*pass@cctv.host.be:554/cam/realmonitor?channel=1&subtype=0

gamenfs commented 2 years ago

Hi,

I have the same problem. I applied the fix in the LocalVideo.php and the url in the xlf file gets trough.

But the player still doesn't want the play the stream [error]: [LayoutParser - RegionParser - MediaParser] Layout 20 is invalid or missing. Reason: map::at

My url is a bit more complex and i needed to write & correct in the cms like & , so I don't know if the player is having trouble with other characters:

rtsp://Xibo:Xibo*pass@cctv.host.be:554/cam/realmonitor?channel=1&subtype=0

  • CMS: 3.1.1
  • Linux Disto: Ubuntu 22.04
  • Linux Desktop Environment: GNOME X11
  • How the player was launched: snap
  • Player Version: 1.8-R6

Hi. I refused to change the configuration of xibo and now use rtsp-proxy (https://github.com/aler9/rtsp-simple-server/tree/98c6cd4650c2efc80fae7e7727d3465190fffc3a) as a temporary solution. Until this problem is solved, this is a good solution.

dasgarner commented 2 years ago

I think the issue is here: https://github.com/xibosignage/xibo-linux/blob/master/player/common/types/Uri.cpp#L10

bradyj04 commented 1 month ago

is there any updates on this? im encountering the same issue when including usernames and passwords for the RTSP streams