Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JavaFx 2.0 and RTSP support for Media.

883602Aug 20 2011 — edited Aug 21 2011
Hi,

Does JavaFX 2.0 support RTSP streaming?

I've tried to launch RTSP stream video from IP cam with the following code:

String url = "rtsp://192.168.8.50:554/ascsadfcas.sdp";

Media mediaRtsp = new Media(url);

MediaPlayerBuilder mediaPlayerBuilder = MediaPlayerBuilder.create();

MediaPlayer mp = mediaPlayerBuilder
.media(mediaRtsp)
.autoPlay(true)
.cycleCount(MediaPlayer.INDEFINITE)
.volume(0.5).build();

MediaViewBuilder mediaViewBuilder = MediaViewBuilder.create();

MediaView mv = mediaViewBuilder
.mediaPlayer(mp)
.fitWidth(200d).fitHeight(200d)
.preserveRatio(true)
.build();

And I get all the time:
java.lang.UnsupportedOperationException: Unsupported protocol "rtsp"

Tnanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2011
Added on Aug 20 2011
1 comment
1,898 views