VLC RTSP stream to internet

*nix specific usage questions
karamorf
New Cone
New Cone
Posts: 2
Joined: 07 Feb 2010 05:42

VLC RTSP stream to internet

Postby karamorf » 07 Feb 2010 05:59

I've set my media computer to also be my gateway in the hopes I could stream video to it from anywhere. so far I've got it to work on the local network but that is about it. To start with this is the vlc command I'm using to start the stream:

Code: Select all

$ vlc /path/to/file.avi --sout '#transcode{soverlay,ab=42,samplerate=44100,channels=1,acodec=mp4a,vcodec=h264,width=320,height=180,vfilter="canvas{width=320,height=180,aspect=16:9}",fps=25,vb=200,venc=x264{vbv-bufsize=500,partitions=all,level=12,no-cabac,subme=7,threads=4,ref=2,mixed-refs=1,bframes=0,min-keyint=1,keyint=50,trellis=2,direct=auto,qcomp=0.0,qpmax=51}}:gather:rtp{mp4a-latm,sdp=rtsp://IP_ADDRESS:5554/FILE.sdp}'
I have set port to be open on the firewall and initial connectivity is made, when trying with VLC outside the local network it would find codec information but report these errors:

Code: Select all

live555 debug: RTP subsession 'video/H264' live555 error: SETUP of'video/H264' failed SETUP: cannot handle response: RTSP/1.0 461 Unsupported transport live555 debug: setup start: 0.000000 stop:0.000000 live555 error: Nothing to play for rtsp://IP_ADDRESS:5554/FILE.sdp live555 error: TCP rollover failed, aborting
This would be the connect from the vlc output on the host:

Code: Select all

main stream out debug: net: connecting to [cleant_IP]:2220 main stream out debug: net: connecting to [CLEANT_IP]:2221 from [HOST_IP]:20836
It seems to be a port forwarding issue perhaps? the 2220/2221/20836 ports seem to be random each connection and they aren't being forwarded, does that pose a problem?

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC RTSP stream to internet

Postby Rémi Denis-Courmont » 07 Feb 2010 09:39

VLC server does not support interleaved RTP.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

bashar
New Cone
New Cone
Posts: 8
Joined: 08 Apr 2010 19:31

Re: VLC RTSP stream to internet

Postby bashar » 08 Apr 2010 19:32

VLC server does not support interleaved RTP.
I am having the exact same problem. Can you elaborate more on what you mean by "interleaved RTP" ? Is it possible to use VLC as an RTSP streaming server that is accessible from the outside world ??

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC RTSP stream to internet

Postby Rémi Denis-Courmont » 08 Apr 2010 19:54

By interleaved RTP, I mean the interleaved RTSP/RTP transport. VLC can stream using the normal RTSP/RTP unicast transport still.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

bashar
New Cone
New Cone
Posts: 8
Joined: 08 Apr 2010 19:31

Re: VLC RTSP stream to internet

Postby bashar » 08 Apr 2010 21:23

By interleaved RTP, I mean the interleaved RTSP/RTP transport. VLC can stream using the normal RTSP/RTP unicast transport still.
So Can I use VLC RTSP/RTP Unicast to stream using RTSP Protocol? How do I receive the stream?

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC RTSP stream to internet

Postby Rémi Denis-Courmont » 10 Apr 2010 09:49

Yes. Using RTSP as normal.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

manunc
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Dec 2009 06:10

Re: VLC RTSP stream to internet

Postby manunc » 12 Apr 2010 09:56

Hello I got almost the same issue:

I stream a webcam using this command:

$ cvlc v4l2:///dev/video1 --sout '#transcode{fps=10,width=128,vcodec=h264,venc=x264{{profile=baseline,level=1},keyint=40},vb=10k}:rtp{sdp=rtsp://192.168.0.5:1234/channel.sdp,sap,group="",name="test",ttl=127}'

- From mobile phone in GPRS I can read the flow (with coreplayer)
- From VLC client I can read the flow using rtsp://192.168.0.5:1234/channel.sdp
- From VLC client located in WAN I can not read the flow using rtsp://public_ip:1234/channel.sdp (firewall open, port 1234 redirected)

I got:

live555 error: SETUP of'video/H264' failed SETUP: cannot handle response: RTSP/1.0 461 Unsupported transport
live555 error: Nothing to play for rtsp://mediacom.nc:1234/channel.sdp
live555 error: TCP rollover failed, aborting


I does not understand why it works in LAN and not in WAN although my mobile located on the internet can access the flow... does coreplayer has a feature that does not have VLC client ?
Can you explain with more details about interleaving issue in VLC ?

How can I read the flow using VLC located in WAN instead ?

Thanks by advance for your explanations.

Emmanuel

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC RTSP stream to internet

Postby Rémi Denis-Courmont » 12 Apr 2010 17:23

RTSP carries data over separate dynamic UDP ports. Port forwarding cannot work, unless it is completed with an RTSP-specific ALG in the NAT box.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

stevej
New Cone
New Cone
Posts: 5
Joined: 09 Apr 2010 16:55

Re: VLC RTSP stream to internet

Postby stevej » 12 Apr 2010 19:43

Consider using Darwin Streaming Server and using VLC to create a SDP file and UDP stream that the Darwin server will then broadcast out.

Works well for a duct tapish solution.

manunc
Blank Cone
Blank Cone
Posts: 34
Joined: 06 Dec 2009 06:10

Re: VLC RTSP stream to internet

Postby manunc » 13 Apr 2010 12:42

This what I try to do, use DSS as relay to broadcast the VLC flow but I did not succeed to do it.

I don't know if I have to use (rtp module):

$ cvlc v4l2:///dev/video1 --no-audio --sout '#transcode{fps=10,width=128,vcodec=h264,venc=x264{{profile=baseline,level=1},keyint=30},vb=15k}:rtp{dst=192.168.0.5,port=1234,port-video=10020,ttl=127,name=CAM,sdp=file:///usr/local/movies/webcam.sdp}'
-> webcam.sdp file generated (I saw a post saying that this was a bug for VLC version newer than 0.9 is it correct ? )
-> DSS Relay Status empty 0 Byte received and broadcast
-> no live.sdp file generated

or

$ cvlc v4l2:///dev/video1 --sout '#transcode{fps=10,width=128,vcodec=h264,venc=x264{{profile=baseline,level=1},keyint=30},vb=15k}:rtp{sdp=rtsp://192.168.0.5:1234/webcam.sdp,sap,group="",name="CAM",ttl=127}'
-> in this case webcam.sdp file is never generated in /usr/local/movies although I can access the flow via a mobile phone with coreplayer using rtsp://public_ip:1234/webcam.sdp.
-> DSS Relay Status empty 0 Byte received and broadcast

My DSS Relay setting is the following:

Relay Name: Cam
Status: Enabled

Source Settings
Source Hostname or IP Address: 192.168.0.5
Mount Point: webcam.sdp
Request incoming stream (box checked)
User Name: (empty)
Password: (empty)

Destination Settings (1 of 1)
Hostname or IP Address: 192.168.0.5
Announced UDP (box checked)
Mount Point: live.sdp
User Name: (empty)
Password: (empty)

Can anyone correct me if these settings are not correct? I don't find the correct settings to use VLC and DSS together.

Regards,

Emmanuel

de_prince
Blank Cone
Blank Cone
Posts: 11
Joined: 09 Aug 2010 06:52

Re: VLC RTSP stream to internet

Postby de_prince » 12 Aug 2010 09:18

By interleaved RTP, I mean the interleaved RTSP/RTP transport. VLC can stream using the normal RTSP/RTP unicast transport still.
So Can I use VLC RTSP/RTP Unicast to stream using RTSP Protocol? How do I receive the stream?
Try Live555MediaServer.

or VLC Tools->Preferences->Input & Codecs->RTP over RTSP (TCP) (this one i have not tried it yet)

mikeuav
New Cone
New Cone
Posts: 2
Joined: 05 Oct 2011 13:02

Re: VLC RTSP stream to internet

Postby mikeuav » 05 Oct 2011 13:16

Hi all, I have been attempting to do the same thing, re-broadcast my IP camera over the internet to multiple machines.
I have trawled the net on how to do this, there are many options from Live555, Wowza and many more streaming servers, plus the flash way.
The best thing I have noticed so far is the one where you embed it in your own website.

The problem I have is:

We have multiple machines running a custom software which have the VLC lib to connect to our video streams, which currently are on the LAN, I wish for these machines to connect to the stream over WAN. The next issue is the IP camera is mobile so it has to be connected to through WAN and RDP not TCP or HTTP, this WAN is not to have multiple connections as Bandwidth is limited.

I.e. Ip camera H.264(RTSP) -> WAN -> VLC(Re-broadcast(Not transcoding)) -> WAN (high Bandwidth) -> Multiple VLC clients

I understand I can stream to a Server, the issue is I firstly would like to house this all, secondly I want VLC clients to connect via UDP.

I can connect to the IP camera either on the LAN or WAN with VLC, I have set up VOD and Broadcast on the local network, but as the above issue of Interleaved RTP is there, it is obviously my problem with connecting over WAN.

Can anyone suggest a way around this? We are experienced in coding, but not this video streaming STUFF :)

Thanks all and I hope it doesn't sound like a newbie question.

M

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC RTSP stream to internet

Postby Rémi Denis-Courmont » 05 Oct 2011 13:40

RTSP is a signaling protocol and always runs over TCP. Interleaved RTP is by definition shares the TCP connection with RTSP signaling (data is interleaved with signaling, hence the name). You can use UDP for RTP, i.e. data, not signaling, thus no "connection". And then obviously it will not be interleaved.

So your post does not make much sense to me.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mikeuav
New Cone
New Cone
Posts: 2
Joined: 05 Oct 2011 13:02

Re: VLC RTSP stream to internet

Postby mikeuav » 05 Oct 2011 23:49

Ouch, thanks for the prompt reply.

I guess at the very bottom is where I was asking for help with, can you think of another way to transmit h.264 video over the internet from VLC?

I can currently stream my IP camera (Using RTSP UDP, I have checked with wireshark and they are UDP Packets) over the internet!

I still don't get it, that's all I need to do, receive video with VLC, re-broadcast it out over a separate connection being WAN using UDP.

Whilst I appreciate your reply, I still don't understand your comments, and it doesn't really help directly what I am trying to achieve, I can assure you I have searched and read alot concerning this. Short of learning every little detail about streaming and writing my own system to handle, it would be nice to use VLC and see if there was someone with the knowledge to help.

M


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests