I'm trying to use VLC as a RTSP client. The RTSP server is based on the libstreaming
library. I'm using the code provided by the 1rst example:
// Sets the port of the RTSP server to 1234
Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();
editor.putString(RtspServer.KEY_PORT, String.valueOf(1234));
editor.commit();
// Configures the SessionBuilder
SessionBuilder.getInstance()
.setSurfaceView(mSurfaceView)
.setPreviewOrientation(90)
.setContext(getApplicationContext())
.setAudioEncoder(SessionBuilder.AUDIO_NONE)
.setVideoEncoder(SessionBuilder.VIDEO_H264);
// Starts the RTSP server
this.startService(new Intent(this,RtspServer.class));
The android app starts; I try to access the stream using VLC (open a stream
) and this URL:
rtsp://192.168.43.250:1234
The device is connected to the same network (I can ping it), but nothing happens in the android App and VLC displays a "connection failed" window.
Any idea where the problem is? Maybe a bad URL, but I can't found any detailled example of this situation.