JMF and UDP (No RTP?!)

Hello!
I've posted some questions in this forum, but I didn't find an answer to my problem up to now. I have an network which is streaming Mpeg2/Mpeg4 over an Mpeg2 Transport Stream (encapsulated in IP/UDP packets). RTP is not supported! I am searching for an solution to watch this stream in Java.
I think JMStudio isn't able to do streaming without UDP?! Does anyone have some experiences with this? Maybe there is an small testing enviroment or any source that might help me?!
I would be very grateful for any answer!
Thx, Jan Stanetzki.

RTP is an aplication protocol (layer 5: aplication, in TCP/IP model) to transport media in real time.
RTP is over (or uses) UDP (layer 4: transport, in TCP/IP model).
So, JMF, by default, uses RTP, that uses UDP to transport media in time real.
If you want to change the transport protocol, you must to create your own rtpconnector.
One example of this: http://java.sun.com/products/java-media/jmf/2.1.1/solutions/RTPConnector.html
But you need to learn basic and advanced concepts of networking.

Similar Messages

  • 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......

  • 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

  • Problem with the examples of Transmitting and Receiving Custom RTP Payloads

    I have tried the examples of this web:
    http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/CustomPayload.html
    Transmitting and Receiving Custom RTP Payloads
    I run the examples all right.
    But I want to transmit the sound using my own format, so i want to change the file PcmPacketizer.java
    and PcmDepacketizer.java
    I think the sound data is in the byte[] inData ---- {byte[] inData = (byte[])inBuf.getData();}
    so i change the data with my own function, so the inData have the diffrent length:
    then i transmit the data with the packet header
    public synchronized int process(Buffer inBuf, Buffer outBuf) {
    int inLength = inBuf.getLength();
    byte[] inData = (enbase((byte[])inBuf.getData()));
    byte[] outData = (byte[])outBuf.getData();
         if (outData == null || outData.length < PACKET_SIZE) {
         outData = new byte[PACKET_SIZE];
         outBuf.setData(outData);
         // Generate the packet header.
         int rate = (int)inFormat.getSampleRate();
         int size = (int)inFormat.getSampleSizeInBits();
         int channels = (int)inFormat.getChannels();
         outData[0] = 0;     // filler
         outData[1] = (byte)((rate >> 16) & 0xff);
         outData[2] = (byte)((rate >> 8) & 0xff);
         outData[3] = (byte)(rate & 0xff);
         outData[4] = (byte)inFormat.getSampleSizeInBits();
         outData[5] = (byte)inFormat.getChannels();
         outData[6] = (byte)inFormat.getEndian();
         outData[7] = (byte)inFormat.getSigned();
         int frameSize = inFormat.getSampleSizeInBits() * inFormat.getChannels();
         // Recompute the output format if the input format has changed.
         // The crucial info is the frame rate and size. These are used
         // to compute the actual rate the data being sent.
         if (rate != (int)outFormat.getFrameRate() ||
         frameSize != outFormat.getFrameSizeInBits()) {
              outFormat = new AudioFormat(CUSTOM_PCM,
                        AudioFormat.NOT_SPECIFIED, // rate
                        AudioFormat.NOT_SPECIFIED, // size
                        AudioFormat.NOT_SPECIFIED, // channel
                        AudioFormat.NOT_SPECIFIED, // endian
                        AudioFormat.NOT_SPECIFIED, // signed
                        size * channels,     // frame size
                        rate,               // frame rate
                        null);
    if (inLength + historyLength >= DATA_SIZE) {
         // Enough data for one packet.
                   int copyFromHistory = Math.min(historyLength, DATA_SIZE);
                   System.arraycopy(history, 0, outData, HDR_SIZE , copyFromHistory);
    int remainingBytes = DATA_SIZE - copyFromHistory;
    System.arraycopy(inData, inBuf.getOffset(),
                   outData, copyFromHistory + HDR_SIZE, remainingBytes);
    historyLength -= copyFromHistory;
    inBuf.setOffset( inBuf.getOffset() + remainingBytes);
    inBuf.setLength( inLength - remainingBytes);
         outBuf.setFormat(outFormat);
         outBuf.setLength(PACKET_SIZE);
         outBuf.setOffset(0);
    return INPUT_BUFFER_NOT_CONSUMED ;
    if (inBuf.isEOM()) { // last packet
    System.arraycopy(history, 0, outData, HDR_SIZE, historyLength);
    System.arraycopy(inData, inBuf.getOffset(),
                   outData, historyLength + HDR_SIZE, inLength);
         outBuf.setFormat(outFormat);
         outBuf.setLength(inLength + historyLength + HDR_SIZE);
         outBuf.setOffset(0);
    historyLength = 0;
    return BUFFER_PROCESSED_OK;
    // Not enough data for one packet. Save the remainder
         // for next time.
    System.arraycopy(inData, inBuf.getOffset(),
                   history, historyLength,inLength) ;
    historyLength += inLength;
    return OUTPUT_BUFFER_NOT_FILLED ;
    I think I change the data use my own function debase(), so i should decode the data in the file:PcmDepacketizer.java
    but int PcmDepacketizer.java the example is so simple that i don't know how to find and change the data.
    there is only a few lines here:
    Object outData = outBuf.getData();
         outBuf.setData(inBuf.getData());
         inBuf.setData(outData);
         outBuf.setLength(inBuf.getLength() - HDR_SIZE);
         outBuf.setOffset(inBuf.getOffset() + HDR_SIZE);
         System.out.println("the outBuf length is "+inBuf.getLength());
    I write a function : public static byte [] debase(byte[] str)
    but i don't know where can i use it.
    please tell me what should i do or where is wrong about my thought.

    the function in PcmPackettizer.java is
    public static byte[] enbase(byte [] b) {
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         //byte[] oo = new byte[(b.length + 2) / 3*4];
         //for (int i = 0; i < (b.length + 2) / 3; i++) {
         for (int i = 0; i < (b.length + 2) / 3; i++) {
              short [] s = new short[3];
              short [] t = new short[4];
              for (int j = 0; j < 3; j++) {
                   if ((i * 3 + j) < b.length)
                        s[j] = (short) (b[i*3+j] & 0xFF);
                   else
                        s[j] = -1;
              t[0] = (short) (s[0] >> 2);
              if (s[1] == -1)
                   t[1] = (short) (((s[0] & 0x3) << 4));
              else
                   t[1] = (short) (((s[0] & 0x3) << 4) + (s[1] >> 4));
              if (s[1] == -1)
                   t[2] = t[3] = 64;
              else if (s[2] == -1) {
                   t[2] = (short) (((s[1] & 0xF) << 2));
                   t[3] = 64;
              else {
                   t[2] = (short) (((s[1] & 0xF) << 2) + (s[2] >> 6));
                   t[3] = (short) (s[2] & 0x3F);
              for (int j = 0; j < 4; j++)
                   os.write(t[j]);
                   //os.write(t[j],(3*i+j),1);
                   //os.write(Base64.charAt(t[j]));
         //return new String(os.toByteArray());
         return os.toByteArray();
    just like the base64 function

  • JMF and audio streams

    Hi all,
    I am writing an application that reads an audio stream and performs some analysis on the audio samples (e.g. detection of dtmf tones). I'd like to be able to write some code that works both on streams from files and from RTP connections (in order to easily write test classes). I made a little test program that reads a wav file with javasound and does some audio analysis.
    public static void main(String[] args)
       AudioInputStream sound = AudioSystem.getAudioInputStream(new File(args[0]));
       int length = (int) sound.getFrameLength();
       for(int i=0; i<length; i++)
          byte[] sample = new byte[2];
          int res = in.read(sample, 0, sample.length);
          if(res != sample.length)
             throw new RuntimeException(
                "Couldn't read a 2 bytes sample from audio stream.");
          if(!in.getFormat().isBigEndian())
             byte tmp = sample[0];
             sample[0] = sample[1];
             sample[1] = tmp;
          DataInputStream ds = new DataInputStream(
             new ByteArrayInputStream(sample));
          goertzel(ds.readShort());
    }Now, I tried to do the same using JMF but I failed. More specific in JMF:
    1) How can I get informations about the stream I'm reading? (e.g. all infos I can get from AudioInputStream's getFormat() method)
    2) Is there a way to get a stream from a DataSource and determine at runtime if the stream is in a particular format I'm expecting, WITHOUT bothering if it is coming form RTP, audio file or something else?
    3) Eventually, Is it hard to use the stream I'm reading to create a new DataSource that some other component will use?

    Sorry but.. I don't know which is the appropriate subclass: I can't find it. I guess you missed "instanceof" in Java 101, eh?
    Moreover I'd like to find a class that is not something like "RTPStream" or "AudioFileInputStream" but something representing just the audio stream itself.There are ways you can get access to the raw data as it flows through the system, but as far as I know, there's no way of gaining random access to the audio stream itself...
    Note that a solution could be to use javasound AudioInputStream class and a simple java rtp library. I could implement my Audio analysis methods in order to work on "abstract streams" (given a particular audio format), then write a test class that work with audio files and a real application that gets input streams from RTP connections.
    I just want to know whether JMF allows me do do that or not?It'd be relatively simple to use JMF to receive an RTP stream and "export" it to JavaSound... you'd just need to write a custom DataSink.

  • JMF 1.0 supports RTP receive

    Hi all,
    I thought JMF 1.0 only supports playback of media from a network source. But then i came through this power point which says that, it supports RTP but receive only. I am confused, what does this mean ? does this mean that a JMF 1.0 client player does support receiving and playing of real time media. However, it does not support transmitting RTP data. I did search a lot about this topic and did not found a whole lot. I have read the JMF 2.0 spec but did not found any answer related to this topic. I haven't found JMF 1.0 spec yet and would really appreciate if some could explain this topic.
    https://www.research.ibm.com/haifa/p...eo/jmf_std.ppt
    Thanks,
    limbu
    Edited by: 878310 on Aug 9, 2011 8:25 AM
    Edited by: 878310 on Aug 9, 2011 8:26 AM

    The latest version of JMF, 2.1.1, supports both sending and receiving via RTP.
    The fact that you've said you can't find anything on the entire internet specifying that makes me think you're probably a troll...

  • JMF and VPN problems

    We are writing an application which streams audio from a GPRS connection thorugh a VPN-tunnel to local computer on a NAT network. Regular TCP and UDP traffic is transmitted and received as can be expected. All RTP packets are however not received at all (according to my program and ethereal), even though it works perfectly when both computers are in the same LAN. Strange.
    Does anyone know why this may be, or have a suggestion what to do?

    You will have to monitor packets at both ends.
    RTP is always an even port number, and its matched with an RTCP odd number always 1 more than the RTP number.
    I would suspect that the VPN is changing the port numbers, example:
    VPN may retransmit the RTP to an odd port number say 2223, which will not work.
    VPN may retransmit the RTP 2222, and RTCP to 2243 which will not work.
    example RTP may be 22222, 3334, or 12346
    RTCP must then be 22223, 3335, or 12347
    Ethereal is your friend!!

  • 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.

  • Can i run UDP  client and UDP  server socket program in the same pc ?

    hi all.
    when i execute my UDP client socket program and UDP server socket program in the same pc ,
    It's will shown the error msg :
    "Address already in use: Cannot bind"
    but if i run UDP client socket program in the remote pc and UDP server socket program run in local pc , it's will success.
    anybody know what's going on ?
    any help will be appreciated !

    bobby92 wrote:
    i have use a specified port for UDP server side , and for client define the server port "DatagramSocket clientSocket= new DatagramSocket(Server_PORT);"Why? The port you provide here is not the target port. It's the local port you listen on. That's only necessary when you want other hosts to connect to you (i.e. when you're acting as a server).
    The server should be using that constructor, the client should not be specifying a port.
    so when i start the udp server code to listen in local pc , then when i start UDP client code in local pc ,i will get the error "Address already in use: Cannot bind"Because your client tries to bind to the same port that the server already bound to.

  • 2012 TS Gateway and UDP

    I have a 2012 TS gateway for remote access for our Session Host server.
    The TS gateway is on the LAN and the Firewall forwards request from our external IP on to the TS Gateway, in the past 2008 and R2 we have just had 80 and 443 open  and it works fine, as it still does on 2012.
    I want to enable the 2012 UDP option 3391 so I asked our ISP to also open the UDP port 3391 both ways.
    Now RDS doesn't work properly, I can see in the TS Gateway monitoring that clients are connected http and usually 2 UDP connections, The Client when you click on the connection button we get connection is good or excellent and UDP is enabled.
    From the Client end the best way to explain the experience is things will work smoothly for a while then hang if you try to resize windows it takes a while to do, what is really interesting is if you set of a video in a portion of the screen this will continue
    to stream ok whilst the rest fails to redraw correctly.  Also interestingly if you move the Windows Media Player around the video moves around flawlessly but the surround stays where it was originally.
    Turn off UDP and things go back to normal, I would like UDP to work because on constrained connections the experience isn't brilliant.
    Is there anything I'm doing wrong should I ask for established related through the firewall? is there anything I can look at to see how I can improve this. 
    If I force an internal client to connect to the Gateway the UDP experience is absolutely fine. 
    Its a bit frustrating that I can only test this issue remotely.
    Any help would be appreciated, as the information on the internet is scanty
    Thanks Gordon.

    I have a 2012 TS gateway for remote access for our Session Host server.
    The TS gateway is on the LAN and the Firewall forwards request from our external IP on to the TS Gateway, in the past 2008 and R2 we have just had 80 and 443 open  and it works fine, as it still does on 2012.
    I want to enable the 2012 UDP option 3391 so I asked our ISP to also open the UDP port 3391 both ways.
    Now RDS doesn't work properly, I can see in the TS Gateway monitoring that clients are connected http and usually 2 UDP connections, The Client when you click on the connection button we get connection is good or excellent and UDP is enabled.
    From the Client end the best way to explain the experience is things will work smoothly for a while then hang if you try to resize windows it takes a while to do, what is really interesting is if you set of a video in a portion of the screen this will continue
    to stream ok whilst the rest fails to redraw correctly.  Also interestingly if you move the Windows Media Player around the video moves around flawlessly but the surround stays where it was originally.
    Turn off UDP and things go back to normal, I would like UDP to work because on constrained connections the experience isn't brilliant.
    Is there anything I'm doing wrong should I ask for established related through the firewall? is there anything I can look at to see how I can improve this. 
    If I force an internal client to connect to the Gateway the UDP experience is absolutely fine. 
    Its a bit frustrating that I can only test this issue remotely.
    Any help would be appreciated, as the information on the internet is scanty
    Thanks Gordon.
    Hi everyone
    This is funny, but just the same I experienced yesterday.
    The same issues i have now since i opened 3391 ono my firewall, to provide UDP connections.
    My 3 Server Setup:
    RDGW, RDCB, RDWEB (2012)
    RDSH1 (2012)
    RDSH2 (2012)
    I cannot exatly say when the disconnections are happening, but they are unreliable.
    When i block UDP Port on my firewall everything is normal again.
    It cannot be a network issue, i can reproduce this problem on different vSphere platforms.
    @Ryan Mangan
    Hey Ryan
    Regarding your suggestion on GP-Settings for Remote-FX, these policies are both not configured.
    As i understand, there is no need to configure them.
    Regards
    Ajdin

  • Communication between Windows 7 and Windows 8(and above) using Sockets(TCP and UDP)

    I need to use TCP and UDP using Sockets to communicate between two(or more) applications installed in Windows 7 and Windows 8.
    Is it possible.? I tried within a LAN, but in vain. If needed I would post the appropriate code.
    Note: I only tried running exe(s) in these machines and not with installation.

    Hello Prabodh.Minz,
    >>Is it possible.?
    It is not clear what develop language you are using, here are examples which uses the C# based on .NET. It created the communition between two machines by using sockets with TCP protocol, a server and a client:
    Synchronous example:
    Client and
    Server.
    Asynchronous example:
    Client and
    Server.
    Multi-client per one server - socket programming in .net(C#)
    >>Note: I only tried running exe(s) in these machines and not with installation.
    There are all .exe.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 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

Maybe you are looking for