2

Uni casting is working fine with my code and vlc.

The library source is over here: https://github.com/fyhertz/libstreaming

With multicasting, current code is giving output as below upon starting a RTSP sever

Transport: RTP/AVP/UDP;multicast;destination=232.0.1.2;client_port=5004-5005;server_port=56203-60523;ssrc=eacf345e;mode=play

But when i try to connect to rtsp using vlc, vlc connects but doesn't give any output(i.e:audio).i am giving this link to vlc "rtsp://192.168.1.115:1234". "192.168.1.115" is the ip address of my android device server. my current code is:

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setContentView(R.layout.activity_main);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

mSurfaceView = (SurfaceView) findViewById(R.id.surface);

// 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_AAC)
.setVideoEncoder(SessionBuilder.VIDEO_NONE)
.setDestination("232.0.1.2");

// Starts the RTSP server
this.startService(new Intent(this,RtspServer.class));

p.s. If there are other rtsp SERVER libraries with multicasting in android.Kindly do suggest.

ammar shahid
  • 411
  • 4
  • 17

1 Answers1

0

maybe too late but here are infomation maybe help

libstreaming is an openSource library so if you look further some code, The session needs some argument (query) so maybe it's why you have nothing on VLC. try to test with "rtsp://192.168.1.115:1234?camera=back". The default feature doesn't accept empty query.

Hope this helps

regards

yRand
  • 16
  • 2