Playing RTSP stream in VLC player

Vinod Maurya picture Vinod Maurya · May 4, 2011 · Viewed 10.5k times · Source

I am trying to make a simple rtsp streaming server in java. The server is able to stream the video properly to the custom written player.

The problem I that I am not able to play the same stream in vlc media player. When I start the vlc media player and enter the streaming details, my server is displaying the following request made by vlc:

OPTIONS rtsp://192.168.2.8:8210/movie.3gp RTSP/1.0
CSeq: 1
User-Agent: VLC media player (LIVE555 Streaming Media v2010.01.07)

In response, I am sending the following to the vlc player:

RTSP/1.0 200 OK
Supported:  play.basic, con.persistent
CSeq: 1
Server:  Android mini RTSP Server
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE

After this, vlc media player is sending me a null token but I am expecting DESCRIBE or SETUP token.

Any idea why vlc is sending me null token? Is there anything I am missing in the response to the vlc's request?

Answer

Horonchik picture Horonchik · Mar 14, 2012

try to keep as close as possible to the rfc. http://www.ietf.org/rfc/rfc2326.txt

try to remove the Supported: and Server: lines.