JMF and RTSP

Hi guys,
I was reading http://java.sun.com/products/java-media/jmf/2.1.1/support-rtsp.html and i tried to wrote a program to load an mp3 from a streaming server like this:
import java.net.*;
import javax.media.*;
import javax.media.bean.playerbean.MediaPlayer;
public class MeuPlayer {
public static void main(String[] args) {
     try{
          //URL mediaURL = new URL("rtsp://81.92.203.130:554/a.mp3");
          MediaLocator med = new MediaLocator("rtsp://81.92.203.130:554/a.mp3");
          Player myplayer = Manager.createPlayer(med);
          myplayer.prefetch();
          myplayer.start();
          }catch(Exception e){System.out.println(e);
What happens id the following:
the programs presents in the display the bandwidth info and blocks....
I've the mp3plugin installed
Tks in advance,
Ze Maria

I am closer to getting it working.
http://java.sun.com/products/java-media/jmf/2.1.1/solutions/CustomPayload.html
I noticed that DSS4 and DSS5 both transmit custom RTP payloads type 96, and 97
According to the link above, they are dynamic payload types.
I have been able to get JMStudio to connect to DSS but then DSS transmits to a different port on wich JMStudio is receiveing!!!!
I first connect with JMStudio using open -> rtsp://192.168.4.4/sample_100kbit.mov
then I use network monitor to see what port DSS is transmitting to(this is dynamic)
then i use AVCustomRecv to receive on the port DSS is transmitting to.
It will be alot of work, but deffinately possible.
The trick is to register the custom payload types of what DSS is sending.(type 96, 97)
I think type 96 is the audio track
and 97 is the video track.
Have fun.

Similar Messages

  • JMF and Windows 7

    I have a program using JMF which worked fine on XP and Vista but is behaving very oddly on Windows 7.
    The program displays two mpg files synchronised with each other and I also control the playback speed. This has worked fine for 18 months.
    On Windows 7 I still see two videos but the speed control doesn't work and one or other of the videos (appears random which one) splits vertically in the middle and I see it compressed both above and below the split. Is anyone else having problems with JMF and Windows 7?
    jdk 1.6.0_13
    jmf 2.1.1e
    Heaps of memory - 4Gb
    Edited by: Leo--- on Nov 1, 2009 9:32 PM
    Edited by: Leo--- on Nov 2, 2009 11:53 AM

    The last version of Windows that JMF lists as supported is Windows 2000.
    Most of the codec support in the Windows Performance Pack are native codecs, meaning they're precompiled DLL libraries. DLLs from one Windows version often times aren't compatible with any other Windows versions, so it's actually quite amazing JMF worked with XP or Vista, at all.
    It sounds like what you're experiencing is simply DLL incompatibility using Windows 5 libaries on a Windows 7 system...

  • Javafx use jmf and capture audio device

    Hello, I noticed a problem with the use JavaFX and Java Media Framework (JMF), in a project javafx call Java classes using JMF, but are not recognized PC audio devices, in fact when I executed 's the code CaptureDeviceManager.getDeviceList (null), displays the error: "could not commit protocolPRefixList", without recognizing any audio device. Instead I call if my application using JMF, outside of a JavaFX project, the devices are found and everything works properly, perhaps this problem depends on the security settings of JavaFX, or inability to use JavaFX is that jmf interfaces with audio and video devices?
    thanks for the help

    I'd use jmf and javafx but it was not for capture devices.
    If you use jmf there are native libraries.
    The thing i found was about the java.library.path wich is overriden when you start javafx that jmf can't load approriate libs.
    Try to compare the System.getProperties for java and javafx then you should find where is the problem.

  • JMF and Darwin Streaming Server.

    I have darwin streaming the sample files.
    I use JMF to connect to darwin.
    The connection is made, The server knows Jmf is connected , the server streams, verified with packet monitor.
    The problem is that JMFStudio just does not start playing the video.
    Any one know why, or have it working??

    One strange thing I noticed, is that while monitoring jmfstudio transmit to jmfstudio across network,
    I use ETHEREAL to monitor the packets, and ports being used. ETHEREAL usually just picks JMF RTP packets as UDP, which is right, but.....
    DSS5 even though JMF is connected across lan to DSS5 the picture does not show.
    WHile monitoring the packets, ETHEREAL picks the DSS5 packet s as RTP and every 20th RTCP.
    So, what i am thinking is the DSS5 RTP packetizer is of better quality than JMF, and the result is that JMF is not fully aware of the 'true' specifications of RTP.
    maybe......

  • Not able to recognize any video/audio devices using jmf and java soun

    Hi ,
    I need one help from your side.
    Here I am expecting some clarifications from you. Before that let you my environement.
    My working environment :
    Eclipse tool and added jmf jar to my project I did not do any thing more.
    If any thing I need to do just let me know. My target platform is MAC & UBUNTU.
    Please bare with my questions.
    1) I am not able to recognize any video/audio devices using jmf and java sound APIs on My system.
    ( I checked with the app mentioned in the http://www.java-forums.org/new-java/11201-jmf-cannot-connect-device.html )
    Do we need any administrives rights for our working PC.
    What is the procedure/ setup I need to follow from a java application to enable particular audio/video device since I dont about end-user system setup right.
    If possible send some sample code to recognize /r detect audio device ( voice input ). It should run on both MAC and UBUNTU.
    2) I run the one sample audio recording application of this link (http://www.jsresources.org/examples/SimpleAudioRecorder.java.html) which is provided by YOU.
    I got output audio file and able to hear voice on UBUNTU system but not able to hear voice on MAC system.
    I heared that default line in ( audio setup of the sys) is wont take any voice data on MAC.Why I made this stmt means we are getting false when using isSupported methods of JAVA SOUND API.
    ( like for TragetdataLine ...i,e, all ports are getting false)
    I have one sample audio recording app implemented by QUICKTIME API. In this case also he taking audio ftom device only using quicetime API.
    With that we are able to record and hear audio ( voice input --> not line in , external device we added some thing like SSB...)
    3) In case of Video capturing DataSource, Streams are implemented by PullBufferDataSource , PullBufferStream intefaces used.
    In case of Audio capturing DataSource, Streams are implemented by PushBufferDataSource, PushBufferStream intefaces used.
    Can you explain the reasons ? I gone through API but i am not clear.
    HOPE I WILL BE CLARIFIED EVERY THING FROM YOU.
    Thanks
    RamaRao.G

    Hi ,
    I need one help from your side.
    Here I am expecting some clarifications from you. Before that let you my environement.
    My working environment :
    Eclipse tool and added jmf jar to my project I did not do any thing more.
    If any thing I need to do just let me know. My target platform is MAC & UBUNTU.
    Please bare with my questions.
    1) I am not able to recognize any video/audio devices using jmf and java sound APIs on My system.
    ( I checked with the app mentioned in the http://www.java-forums.org/new-java/11201-jmf-cannot-connect-device.html )
    Do we need any administrives rights for our working PC.
    What is the procedure/ setup I need to follow from a java application to enable particular audio/video device since I dont about end-user system setup right.
    If possible send some sample code to recognize /r detect audio device ( voice input ). It should run on both MAC and UBUNTU.
    2) I run the one sample audio recording application of this link (http://www.jsresources.org/examples/SimpleAudioRecorder.java.html) which is provided by YOU.
    I got output audio file and able to hear voice on UBUNTU system but not able to hear voice on MAC system.
    I heared that default line in ( audio setup of the sys) is wont take any voice data on MAC.Why I made this stmt means we are getting false when using isSupported methods of JAVA SOUND API.
    ( like for TragetdataLine ...i,e, all ports are getting false)
    I have one sample audio recording app implemented by QUICKTIME API. In this case also he taking audio ftom device only using quicetime API.
    With that we are able to record and hear audio ( voice input --> not line in , external device we added some thing like SSB...)
    3) In case of Video capturing DataSource, Streams are implemented by PullBufferDataSource , PullBufferStream intefaces used.
    In case of Audio capturing DataSource, Streams are implemented by PushBufferDataSource, PushBufferStream intefaces used.
    Can you explain the reasons ? I gone through API but i am not clear.
    HOPE I WILL BE CLARIFIED EVERY THING FROM YOU.
    Thanks
    RamaRao.G

  • Problem with  M-JPEG by using JMF and JPEGCodec .

    Hi, there,
    I want to implement a M-JPEG using JMF and JPEGCodec, is that possible?(I already been trapped)
    My problem is I have a video clip which is a AVI file, the video format is following:
    Video format: RGB, 160x120, FrameRate=14.9, Length=57600, 24-bit, Masks=3:2:1, P
    ixelStride=3, LineStride=480, Flipped.
    I already convered a frame to an Image object(video format with JPEG and CVID doesn't work) ,
    I can also convert this Image back as a Buffer, It works fine with me .But to use JPEGCodec( provided by com.sun.image.codec.jpeg ) I need to convert an Image to a BufferedImage, I use the following defination:
    BufferedImage   bImage = new BufferedImage(frameImage.getWidth(null), frameImage.getHeigh(null),BufferedImage.TYPE_INT_RGB); It seems work, But when I use JPEGImageEncoder to encoder this bImage and save as a jpg file,
    everything is black .
    I also need to cast BufferedImage to an Image: frameImage = (Image) bImage; then I convert frameImage back to Buffer.My video clip still running , but every frame now became black .
    can someone help me? thanks in advance.

    I solved this problem . But I met a new problem.
    I converted the above video clip into a JPEG and I want to create a DataSink for it. the messege is:
    Video format: JPEG, 160x120, FrameRate=12.0, Length=3574
    - set content descriptor to: AVI
    - set track format to: JPEG
    Cannot transcode any track to: JPEG
    Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a DataS
    ink for: com.sun.media.multiplexer.RawBufferMux$RawBufferDataSource@2b7eea
    Transcoding failedHope some Java Experts can help me.
    Regards.

  • JMF and SWT

    This has probably been discussed a million times but I'm really struggling with it. I'm creating an SWT application built on the eclipse rcp, and I'm trying to add a video player to a view.
    I have been trying to add a MediaPlayer bean to the view, that will for the time being, just play a short clip from my hard-drive. I've created a new AWT frame for it to live in, and have successfully managed to add this to the view.
    However, when I try and add my MediaPlayer bean, I am faced with the following exception:
    java.lang.NoClassDefFoundError: javax/media/bean/playerbean/MediaPlayerThe jmf.jar has been added to my project, and I have added the following to my product VM arguments:
    -Djava.library.path=C:\\WINDOWS\\system32Can anyone help me out with fixing this problem?

    Did you eventually get this to work?
    I am looking at developing a simple bespoke player using SWT and JMF and was wondering if you could give me any pointers to start,
    Thanks
    Jonathan

  • Educational Use of JMF and J2ME WTS

    Dear all,
    I have tried to find legal information about education use of JMF and J2ME WTS. I want to install these two packages in the computers of a tutorial room for student use.
    Would any kind soul please enlighten me where I can get such information?
    Thank you.
    Cheers,
    Andrew Lui
    The Open University of Hong Kong

    Maybe from Sun? If it's not mentioned in the terms and conditions of the libraries or their download sites, I wouldn't know where else to get more information.

  • RTP  and RTSP

    I have 2 question want to ask:
    1)Is RTP and RTSP can pass through firewall?
    Or can you tell me which TCP port no. be used for RTP and RTSP protocol?
    2)Also,Is this possible to transfer video data thro' http protocol?

    1a: Yes , (If firewall rules permit)port 554 for RTSP (http://www.chebucto.ns.ca/~rakerman/port-table.html)
    1b: No, (if firewall rules disallow)
    2:(see answers above)

  • JMF and video capture card?

    i wanna ask how can i usea video capture card with the jmf and record video
    i try to detect my capture card but the jmf didnt detecte it please pleas help me

    hi,
    i use a tv-card with my camera through linking them with a composite cable. Also, my tv card has capturing capability and i use JMF to do a capture program with these tools and the result is good for me. The monitor.zip file wihich contains a sample of capturing and monitoring simultaneously exists on sun.com. I use it and it was very helpfull for me.
    JMF detects cards through its 'CaptureDeviceManager' which is a controller type object. If you specify like Vector devices = CaptureDeviceManager.getDeviceList(null) -> You will be get the list of appropriate devices on your pc.
    Regards,
    Erohan

  • Does jmf support rtsp protocol?

    i wanna know does jmf support rtsp protocol? now, i play an video(rtsp://localhost/test.avi) by JMStudio, but failed(Controller Error: Failed to realize).
    Anybody can give me some suggestion on how to solve this problem?
    I also know whether i can implement rtsp protocol by jmf? thanks in advance!

    Hi,
    From what I understand optomux is a standard that determines the syntax of the command sent. The commands are sent through serial or Ethernet. You can use LabVIEW (the VISA VIs) to communicate with a device using serial or Ethernet. However, there are no VIs that will build the optomux commands.
    I'm not familiar with them, but you can check out the optomux VIs included with the Fieldpoint explorer. That should give you an idea of how to use the VISA to implement optomux communication.
    DiegoF
    National Instruments.

  • RTSP: JMF and DSS4:common problem

    Hello
    I have DSS4 and JMF 2.1.1,i am trying to create a RTSP client media player(I have read these are the best two for what i am doing)
    I have created .mov files with JM studio.
    Apple quicktime player and JMF studio will play the .mov as files but neither will play them as URL e.g rtsp://157.190.181.36/mysample.mov
    I would be very gratefulfor any help,i have spent a long time at this
    Regards
    Conor Fitzgerald

    I am closer to getting it working.
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/CustomPayload.html
    I noticed that DSS4 and DSS5 both transmit custom RTP payloads type 96, and 97
    According to the link above, they are dynamic payload types.
    I have been able to get JMStudio to connect to DSS but then DSS transmits to a different port on wich JMStudio is receiveing!!!!
    I first connect with JMStudio using open -> rtsp://192.168.4.4/sample_100kbit.mov
    then I use network monitor to see what port DSS is transmitting to(this is dynamic)
    then i use AVCustomRecv to receive on the port DSS is transmitting to.
    It will be alot of work, but deffinately possible.
    The trick is to register the custom payload types of what DSS is sending.(type 96, 97)
    I think type 96 is the audio track
    and 97 is the video track.
    Have fun.

  • JMF and the Darwin Streaming Server

    Has anyone been successful in getting the JMF JMStudio to work with
    the Darwin Streaming Server? I have set up Darwin on my computer and
    encoded a sample .mov file using a codec that is supposed to be
    compatible with JMF, the H.263. I was able to view this file inside
    JMStudio if I opened it directly as a file. I was also able to stream
    this file via the server using the Quicktime movie player by opening
    URL to rtsp://localhost/test.mov
    However, when I go into JMStudio's Open URL, and put in
    rtsp://localhost/test.mov, I get an error message saying:
    Controller Error:
    Failed to realize: Server is not responding.
    I am using JMF Version 2.1.1e and the Apple Darwin Streaming Server
    5.0
    If anyone has any suggestions, please let me know. Also, let me know
    if there is another streaming server, preferably open source, that
    works well with JMF.
    thanks.

    your doing local host, JMF needs to receive rtp on
    port XXXX, now if you are receivng on port XXXX the
    server maybe trying to send on the same port , or
    maybe it's trying to send the RTCP data.
    Does darwin use RTCP ?? and also I would try from
    second computer , as JMF sends, receives on same port.I am pretty sure all the ports are set up correctly. I have tried connecting from another computer and run into the same issues. Also, I was able to view the movie just fine from the same computer (connecting to itself) using the Quicktime Java package provided by Apple. I've been able to view movies in quicktime using the RTSP protocol

  • JMF and X session

    Hi All,
    I am currently working on a XML-RPC related program which plays sound on the server using JMF. The funniest thing is that if I ssh to the server with X session enabled, for example, in linux, I go "ssh -Y root@server" and then run the program, everything works fine. However, If I just do a plain ssh without X session, the program returns me the error message as follows:
    javax.media.NoPlayerException: Cannot find a Player for :file:/usr/java/jdk1.5.0_05/sounds/testsound.wav
    at javax.media.Manager.createPlayerForContent(Manager.java:1412)
    at javax.media.Manager.createPlayer(Manager.java:417)
    at javax.media.Manager.createPlayer(Manager.java:332)
    at JMFSound.JMFPlay(JMFSound.java:13)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.xmlrpc.Invoker.execute(Invoker.java:130)
    at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
    at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:146)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:139)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:125)
    at org.apache.xmlrpc.WebServer$Connection.run(WebServer.java:746)
    at org.apache.xmlrpc.WebServer$Runner.run(WebServer.java:626)
    at java.lang.Thread.run(Thread.java:595)
    I don't really have any idea about what's going on.
    Please help. Any advise will be appreciated.
    Dadi

    Thanks for the reply.
    The ssh part is just part of my troubleshooting because that piece of program worked fine in Windows. Therefore I was suspecting that there is something to do with X or, JMF needs some graphical stuff. I'll probably put it into rc.local at the end once I get it working so whether ssh is fixed is not the main concern.
    I don't really know what to check at the moment.

  • Help needed with JMF and FFMPEG

    Hi, im using Jave which is a wrapper libraray for FFMPEG to encoded videos and im also using JMF to take snapshots of the video to save as thumbnails. All the code I have works except that I cant get Jave(FFMPEG) to encoded the videos in to a format that JMF can handle. Does any body know a format or codec that Jave(FFMPEG) can use to get JMF to handle the videos.
    Cheers, any help will be much apprecitated.

    One solution to most of your questions : Read the advanced table section of Dev guide.
    Always go through the dev guide before putting up the issue. Let the forum be for those scenarios which dev guide doesn't covers in much detail.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Determining Partner Function based on Status of Transaction

    Hello I have a requirement in which parties involved needs to be determined based on the status of the Transaction. Please let me know how we can fulfill this requirement. Is there any BADI for the same and if yes what code do we need to maintain. Th

  • Trouble trying to Display my GUI properly

    I am trying to get my GUI to properly display, it should show up as a mock minesweeper. It doesn't have the full functionality of the normal minesweeper but it should have 100 buttons displayed in 10 by 10 grid, and there should be a start button on

  • Statement using 25% CPU

    Hi the following statement is taking 25% CPU to run. Although the statement completes in around 30 seconds, I have been advised that the CPU usage needs to be reduced as we can have over 4 instances of the same process running at any one time. Please

  • ORA-03135?

    Hi, I am getting following error frequently in my application side.. how to over come this ORA-03135 connection lost contact Thanks,

  • Monitoring whether Database and Listener are running or not?

    Hi, We have around 50 databases which we manage. Those databases have some alerts which send emails if the tablespaces are below 80% threashold levels. However, we dont have any alert either if the database is down or if listener is down. Most of the