Page 1 of 1

RTSP and IPv6 addresses?

Posted: 15 Feb 2019 10:52
by zeb_
Hi,

I was wondering if it is possible to use an IPv6 address with RTSP in VLC? I am trying to stream my IP camera using URL:

Code: Select all

rtsp://[username]:[password]@[deviceIP]:554/cam/realmonitor?channel=1&subtype=1
This works perfectly with an IPv4 deviceIP, but fails if it is an IPv6 (in brackets) or a domain name with an AAAA record.

Thanks a lot for your suggestions.

Re: RTSP and IPv6 addresses?

Posted: 16 Feb 2019 09:12
by Rémi Denis-Courmont
No. RTSP 1.0 protocol is not compatible with IPv6 by specification, and RTSP 2.0 is not supported by much anything (including VLC).

Re: RTSP and IPv6 addresses?

Posted: 18 Feb 2019 09:10
by zeb_
Thank you for your answer.

Re: RTSP and IPv6 addresses?

Posted: 13 Jul 2021 21:29
by controlav
Old thread I know, but what exactly is incompatible with RTSP over IPv6? I have it working just fine with my own client, but VLC (Windows 3.0.14) chokes when trying to playback from an RTSP server on an IPv6 address. Doesn't even bother to do a DESCRIBE to get the SDP, just sends a SETUP with a bad url right away.

Re: RTSP and IPv6 addresses?

Posted: 14 Jul 2021 01:20
by controlav
To be more specific:
VLC network stream playback on IPv4:
sends OPTIONS
sends DESCRIBE
sends SETUP with a media url from the SDP for video (server returns session id)
sends SETUP with media url for audio
sends PLAY with the base url and the session returned from SETUP
All good.

VLC on IPv6:
no OPTIONS or DESCRIBE
sends SETUP with the base url (which I should probably fail on my server but I assume video is wanted)
sends a PLAY with base url + "/stream=0" (this is not a valid url but I ignore it, no clue where that came from) but no session is passed, so PLAY fails

Re: RTSP and IPv6 addresses?

Posted: 14 Jul 2021 10:02
by Rémi Denis-Courmont
The specification of the RTSP 1.0 protocol is incompatible with IPv6.

Re: RTSP and IPv6 addresses?

Posted: 14 Jul 2021 16:47
by controlav
How so, exactly, is it incompatible? RFC 2326 mentions IPv6 and there are no explicit differences called out.
The Live555 server works on IPv6 (see http://live555.com/mediaServer/release.html), for example, as does my server, and the VLC client looks like it could with a few fixes.

Re: RTSP and IPv6 addresses?

Posted: 14 Jul 2021 17:06
by Rémi Denis-Courmont
The protocol syntax simply does not allow for IPv6. It is incompatible because it is not compatible.

Re: RTSP and IPv6 addresses?

Posted: 14 Jul 2021 18:33
by controlav
Sorry but I still do not understand. Are you saying this syntax is not compatible, somehow:

rtsp://[2002:4998:30:1e1:b6e7:50e5:8443:8bef]:12345/camera

which is identical to a valid http url except for the scheme. Or do you mean something else for the protocol syntax?

Re: RTSP and IPv6 addresses?

Posted: 15 Jul 2021 14:23
by controlav
Further information: VLC is using the "satip" demux for IPv6 addresses like the one I entered above, which seems to be some kind of pseudo-RTSP protocol. Not sure why it thinks this though.

Re: RTSP and IPv6 addresses?

Posted: 15 Jul 2021 17:29
by controlav
Looks like the url parser in live555.cpp is confused by the square-brackets of an ipv6 address (thinks its the password or something) causing a bad url to be generated, which cannot be connected to.

live555 debug: version 2016.11.28
live555 debug: connection timeout
live555 error: Failed to connect with rtsp://[2002:4998:30:1e1:b6e7:50e5:8443:8bef]:12345/camera
<more>
main debug: using access module "satip"

and satip is pseudo-RTSP which doesn't bother with OPTIONS or DESCRIBE, does a SETUP, then a PLAY with /stream=0 (as my SETUP does not return a com.ses.streamID).