Hope you will be fine and doing great. I am working in java web application and I simply want to play live streaming RTSP URL. I started working with QuickTime Java Library and on later I came to know that has been defecated and also Java media framework library.
Can you please tell me the possible options for this ? Here I have this question that you may refer for further details.
Manipulating and Processing Live Streaming using RTSP Streaming URL inside Web Application.
a. Fetching RTSP Streams in my Application
b. Convert this streams (of 5 Seconds)
c. Storing it in some format
I have used this code snippet but couldn't succeed:
Code: Select all
MediaPlayerFactory mFactory = new MediaPlayerFactory();
HeadlessMediaPlayer mPlayer = mFactory.newHeadlessMediaPlayer();
String mrl = "rtsp://192.168.200.204/6c9614ae122a2851";
String options = ":sout=#transcode{vcodec=h264,venc=x264{cfr=16},scale=1,acodec=mp4a,ab=160,channels=2,samplerate=44100}"
+ ":file{dst=C:/Users/public/videos/6c9614ae122a2851.mp4}";
mPlayer.playMedia(mrl, options);
Best Regards,
Bilal Ahmed Yaseen.