revmischa / rtsp-server

Lightweight RTSP/RTP streaming media server
https://metacpan.org/release/RTSP-Server
427 stars 111 forks source link

Problem with client app that has an erroneous backslash in PLAY command, please help. #37

Open Roos-AID opened 3 years ago

Roos-AID commented 3 years ago

Dear Mischa, thanks for your RTSP Server. I have it up and running on RaspberryPI.

It is used to convert IP camera MJPEG stream to RTSP and to convert the format. I have it working with VLC as client.

However, the application that I would have to use as client (a doorbell app that can show multiple camera streams) I stumbled on a bug (in my opinion) in the doorbell app. I cannot get it fixed.

What is the problem : With verbose logging level 5 I found out that the client app on ip 10.0.0.11 adds a / to the URL when asking for the PLAY.

Client connection from 10.0.0.11:59232 Got method DESCRIBE Client listener: >> DESCRIBE rtsp://10.0.0.65/garage RTSP/1.0 << RTSP/1.0 200 OK

Client listener: >> SETUP rtsp://10.0.0.65/garage/streamid=0 RTSP/1.0 Got method SETUP << RTSP/1.0 200 OK

Client listener: >> PLAY rtsp://10.0.0.65/garage/ RTSP/1.0 Got method PLAY Returning 404 for rtsp://10.0.0.65/garage/

As you can see the / is added to the URL for play. This is obviously wrong, it should have been Client listener: >> PLAY rtsp://10.0.0.65/garage RTSP/1.0

I am not an expert in Perl, but I tried to find a place in your code to strip the excessive / at the end of the URL.

I think I found the place in Client/Connection.pm sub play { my ($self) = @_;

# find requested mount
my $mount = $self->get_mount;
unless ($mount) {
    $self->not_found;
    return;
}

But I have no clue how to strip the / , can you help me ?

revmischa commented 3 years ago

Hello, I haven't personally maintained this software in about a decade, please feel free to open a PR though!