Beginner to jmf

hello all, im new to this jmf ,i know how to work with applets and frames only & i want to know what is this jmf, how it is useful to run video clips and i need some sample programs also , if possible suggest some tutorials and online books

try this link, there are some good samples, hope useful for u.
http://java.sun.com/products/java-media/jmf/2.1.1/solutions/index.html

Similar Messages

  • I have new in JMF-Any one help me

    Hai
    I am beginner of JMF.i have facing one problem for past 3 days.
    I wrote one applet program for playing mp3 song.Atfer i wrote one jsp file it has several radio button when i clicked any one of them it would called applet(i have using plugin tag for this embbed).i got one error i.e. Class not found exception.but i tried in appletviewer it's work perfectly.
    My path folders are:
    Applet program: c:/Tomcat/webapps/Vj/web-inf/classes/AB.java
    Jsp File:c:/Tomcat/webapps/Vj/playapp.jsp
    My code is applet code
    import java.applet.Applet;
    import java.awt.*;
    import java.io.IOException;
    import java.io.PrintStream;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.media.*;
    <APPLET height=300 width=300 code="AB.class">
              <PARAM NAME="file" VALUE="artist - Track 01.mp3">
    </APPLET>
    public class AB extends Applet
        implements ControllerListener
        public SimplePlayerApplet()
            player = null;
    public void init()
            MediaLocator medialocator = null;
            Object obj = null;
            if ((s = getParameter("FILE")) == null)
                 System.out.println("S value is:NULL");
                Fatal("Invalid media file parameter");
            try
                URL url = new URL(getDocumentBase(), s);
                System.out.println("URL Value is:" + url);
                s = url.toExternalForm();
            catch(MalformedURLException malformedurlexception) { }
            try
                if((medialocator = new MediaLocator("file:" + s)) == null)
                    Fatal("Can't build URL for " + s);
                    System.out.println("catch in malformed");
                try
                    player = Manager.createPlayer(medialocator);
                    System.out.println("it is from create player");
                catch(NoPlayerException noplayerexception)
                    System.out.println(noplayerexception);
                    Fatal("Could not create player for " + medialocator);
            catch(MalformedURLException malformedurlexception1)
                Fatal("Invalid media file URL!");
            catch(IOException ioexception)
                Fatal("IO exception creating player for " + medialocator);
        public void start()
            if(player != null)
                player.start();
                System.out.println("This from start");
        public void stop()
            if(player != null)
                   System.out.println("This from stop");
                player.stop();
                player.deallocate();
        public void destroy()
            player.close();
            System.out.println("This from Destory");
        void Fatal(String s)
            System.err.println("FATAL ERROR: " + s);
            throw new Error(s);
        Player player;
    }now i run in appletviewer it's work perfectly.After that
    I remove applet tags in this program and again i was compiled.
    then now i embeded in jsp .
    Jsp is below:
    <%@ page language="java" import="java.io.*;" %>
    <HTML><HEAD><TITLE>Doctor Page</TITLE>
    <META http-equiv=Content-Language content=en-us>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <META content="MSHTML 6.00.2800.1498" name=GENERATOR>
    <script language="JavaScript">
    function Check(){
    for (var i=0; i < document.playChk.R1.length; i++)
       if (document.playChk.R1.checked)
    var n = document.playChk.R1[i].value;
         document.playChk.action="Doctor.jsp";
         document.playChk.submit();
    </script>
    </HEAD>
    <BODY>
    <%
         if (request.getParameter("R1") != null){
              out.println("U Have Checked : " + request.getParameter("R1"));
              System.out.println("U Have Checked : " + request.getParameter("R1"));
              %>
         <jsp:plugin type="applet" code="AB.class" height="30" width="10" >
    <jsp:params>
    <jsp:param name="File" value="artist - Track 01.mp3">
    </jsp:param>
    </jsp:params>
         <jsp:fallback>
         Plugin tag OBJECT or EMBED not supported by browser.
         </jsp:fallback>
         </jsp:plugin>
    <%
         else{
              System.out.println("This is First Strike");
              out.println("This is First Strike");
    %>
    <FORM method="post" name="playChk" >
    <%
    try{
              File f =new File("C://Tomcat 5.0/webapps/Vj/images");
              System.out.println();
              String lists[] =f.list();
              out.println("Length:" + lists.length);
         %>
         <TABLE width="100%" border=1>
         <%
         for(int i =0 ;i < lists.length-1;i++){
              System.out.println( f + lists[i]);
         %>
         <TR>
         <TD><IMG height=109 src="<%=f + "/" + lists[i]%>" width=150 border=0></TD>
         </TR>
         <TR>
         <TD><INPUT type="radio" checked value="<%=lists[i]%>" name="R1" onClick="Check()"></TD>
         </TR>
    <%
         catch(Exception e){
              System.out.println("Exception" + e);
         %>
    </FORM>
    </BODY>
    </HTML
    Audio file is placed in same dir of applet.
    now i am getting Class not found exception.
    Ant one help me
    With Regards
    K.suresh

    It might be if you explain "the Problem" - whats the error
    for a start?

  • Re: Serious Issues in JMF

    I have pretty much the same questions about using JMF Player. I'd prefer to get people using JMF because I have more control over how my video is presented in the web page. Sorry this isn't an answer to your question but did you come to any conclusions about usefulness of JMF Player?
    matt benton

    i am a beginner to jmf .
    first i would like someone to show me how to display three frames at a time using JMF.
    i have simple code.
    when i click forward button it will go to next frame.it is working fine.
    but i want to disply at a time three frames when i click next button again it will show next three frames.
    i am sending working with one frame code.
    please send me code to [email protected]
    package Vediocutting;
    import java.awt.*;
    import java.awt.event.*;
    import javax.media.*;
    import javax.media.control.FramePositioningControl;
    import javax.media.protocol.*;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    * Sample program to demonstrate FramePositioningControl.
    public class Frame extends JFrame implements ControllerListener, ActionListener {
    Player p;
    FramePositioningControl fpc;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    int totalFrames = FramePositioningControl.FRAME_UNKNOWN;
    private JLabel label3 = new JLabel("output file path is: ");
    JTextField outputFileName = null;
    private JButton cutting = new JButton("Cut");
    String inputUrl = null;
    String inputFile = null;
         String outputFile = null;
         Double startTime = 0.0;
         Double endTime = 0.0;
         Long start = 0L;
         Long end = 0L;
    JPanel cntlPanel;
    JPanel cntlPanel1;
    JButton fwdButton;
    JButton bwdButton;
    //Button rndButton;
    JButton setBigin;
    JButton setEnd;
    * Given a DataSource, create a player and use that player
    * as a player to playback the media.
    public boolean open(DataSource ds) {
         System.err.println("create player for: " + ds.getContentType());
         try {
              System.out.println("Jilan test===>Data Source is =>"+ds);
         p = Manager.createPlayer(ds);
         } catch (Exception e) {
         System.err.println("Failed to create a player from the given DataSource: " + e);
         return false;
         p.addControllerListener(this);
         p.realize();
         if (!waitForState(p.Realized)) {
         System.err.println("Failed to realize the player.");
         return false;
         // Try to retrieve a FramePositioningControl from the player.
         fpc = (FramePositioningControl)p.getControl("javax.media.control.FramePositioningControl");
         if (fpc == null) {
         System.err.println("The player does not support FramePositioningControl.");
         System.err.println("There's no reason to go on for the purpose of this demo.");
         return false;
         Time duration = p.getDuration();
         if (duration != Duration.DURATION_UNKNOWN) {
         System.err.println("Movie duration: " + duration.getSeconds());
         totalFrames = fpc.mapTimeToFrame(duration);
         if (totalFrames != FramePositioningControl.FRAME_UNKNOWN)
              System.err.println("Total # of video frames in the movies: " + totalFrames);
         else
              System.err.println("The FramePositiongControl does not support mapTimeToFrame.");
         } else {
         System.err.println("Movie duration: unknown");
         // Prefetch the player.
         p.prefetch();
         if (!waitForState(p.Prefetched)) {
         System.err.println("Failed to prefetch the player.");
         return false;
         // Display the visual & control component if there's one.
         setLayout(new BorderLayout());
         cntlPanel = new JPanel();
         cntlPanel1 = new JPanel();
         fwdButton = new JButton("Forward");
         bwdButton = new JButton("Backward");
         //rndButton = new Button("Random");
         setBigin = new JButton("SetBigin");
         setEnd = new JButton("SetEnd");
         fwdButton.addActionListener(this);
         bwdButton.addActionListener(this);
         //rndButton.addActionListener(this);
         setBigin.addActionListener(this);
         setEnd.addActionListener(this);
         cntlPanel.add(fwdButton);
         cntlPanel.add(bwdButton);
         //cntlPanel.add(rndButton);
         cntlPanel1.add(setBigin);
         cntlPanel1.add(setEnd);
         cntlPanel1.add(cutting);
         Container cp = getContentPane();
         JPanel output = new JPanel(new FlowLayout(FlowLayout.LEFT)); output.setOpaque(false);
              output.add(label3);
              //p.add(output);
              //output = new JPanel(new FlowLayout(FlowLayout.LEFT)); output.setOpaque(false);
              output.add( outputFileName = new JTextField(20) );
              //p.add(output);
              cp.add(output, BorderLayout.EAST);
              //output.add(cutting);
              cutting.addActionListener(new Cutting());
         Component vc;
         if ((vc = p.getVisualComponent()) != null) {
         add("Center", vc);
         add("North", cntlPanel);
         add("South", cntlPanel1);
         setVisible(true);
         return true;
    public void addNotify() {
         super.addNotify();
         pack();
    * Block until the player has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(int state) {
         synchronized (waitSync) {
         try {
              while (p.getState() < state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    public void actionPerformed(ActionEvent ae) {
         String command = ae.getActionCommand();
         if (command.equals("Forward")) {
         int dest = fpc.skip(1);
         System.err.println("Step forward " + dest + " frame.");
         } else if (command.equals("Backward")) {
         int dest = fpc.skip(-1);
         System.err.println("Step backward " + dest + " frame.");
         } /*else if (command.equals("Random")) {
         if (totalFrames == FramePositioningControl.FRAME_UNKNOWN)
              System.err.println("Cannot jump to a random frame.");
         else {
              int randomFrame = (int)(totalFrames * Math.random());
              randomFrame = fpc.seek(randomFrame);
              System.err.println("Jump to a random frame: " + randomFrame);
         if(command.equals("SetBigin"))
              startTime = p.getMediaTime().getSeconds();
              System.out.println("jilan start time=========>"+startTime);
         if(command.equals("SetEnd"))
              endTime = p.getMediaTime().getSeconds();
              System.out.println("jilan end Time=========>"+endTime);
         int currentFrame = fpc.mapTimeToFrame(p.getMediaTime());
         if (currentFrame != FramePositioningControl.FRAME_UNKNOWN)
         System.err.println("Current frame: " + currentFrame);
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         p.setMediaTime(new Time(0));
         //p.start();
         //p.close();
         //System.exit(0);
         } else if (evt instanceof SizeChangeEvent) {
    class Cutting implements ActionListener {
              public void actionPerformed(ActionEvent e) {
                   inputFile = inputUrl;
                   outputFile = "file:/"+outputFileName.getText();
                   start = startTime.longValue()*1000;
                   end = endTime.longValue()*1000;
                   System.out.println("inputFile=============>"+inputFile);
                   System.out.println("outputFile=============>"+outputFile);
                   System.out.println("start=============>"+start);
                   System.out.println("end=============>"+end);
                   new Cut(inputFile,outputFile,start,end);
                   /* start = startTime*1000;
                   end = endTime*1000;*/
                   inputFile = "file:/"+completePath;
                   outputFile = "file:/"+putputFileName.getText();
                   start = Long.parseLong(startTime.getText())*1000;
                   end = Long.parseLong(endTime.getText())*1000;
                   System.out.println("inputFile=============>"+inputFile);
                   System.out.println("outputFile=============>"+outputFile);
                   System.out.println("start=============>"+start);
                   System.out.println("end=============>"+end);
                   new Cut(inputFile,outputFile,start,end);
    * Main program
    public Frame(String inputFile) {
    inputUrl = inputFile;
         MediaLocator ml;
         if ((ml = new MediaLocator(inputUrl)) == null) {
         System.err.println("Cannot build media locator from: " + inputFile);
         System.exit(0);
         DataSource ds = null;
         // Create a DataSource given the media locator.
         try {
         ds = Manager.createDataSource(ml);
         } catch (Exception e) {
         System.err.println("Cannot create DataSource from: " + ml);
         System.exit(0);
         //Seek seek = new Seek();
         if (!open(ds))
         System.exit(0);
    }

  • Cannot stop a player when is playing

    hi,
    i'm a beginner in jmf and i'm traying to do a simple player application: i have 2 buttons, a start button and a stop button.
    the start button starts the player:
    player.realize();
    player.prefetch();
    player.start()
    and the stop button try to stops the player:
    player.stop();          
    player.deallocate();
    player.close();
    if i realized the start button and inmediatily the stop button de player stops, but when the player is started the stop button don't works. any suggestion ?
    thanx

    the start button starts the player:
    player.realize();
    player.prefetch();
    player.start()
    and the stop button try to stops the player:
    player.stop();
    player.deallocate();
    player.close();I think you're putting too much into your buttons -- particularly the stop button, since closing means you can't restart the player.
    It would be better if your buttons only did start() and stop(). You can realize your player in the process of building your GUI, and you can put the close in a shutdown method (eg, something you call when the window is closed).
    I think deallocate() is unneccessary if you're just going to close()
    --invalidname

  • Simultaneous stream playback and export to file

    I'm trying to write a client application that receives an audio stream via RTP. I can get it to playback the stream using a Player as the audio is being received and I can also get it to export the stream to a local file using a Processor as it is being received. However, I cannot seem to merge the two functionalities. I think the problem is with using a Player and a Processor connected to the same DataSource. The error is that the Player is never initialized. The controllerUpdate method is below and it seems that it never reaches the player.realize call. I am a beginner at JMF so maybe I haven't learned enough about MediaEvents. Any help would be appreciated.
        public synchronized void controllerUpdate(ControllerEvent control)
            Controller myController = control.getSourceController();
            if(myController instanceof Processor)
                if (control instanceof ConfigureCompleteEvent
                        || control instanceof RealizeCompleteEvent
                        || control instanceof PrefetchCompleteEvent)
                    synchronized (waitSync)
                        stateTransitionOK = true;
                        waitSync.notifyAll();
                } else if (control instanceof ResourceUnavailableEvent)
                    synchronized (waitSync)
                        stateTransitionOK = false;
                        waitSync.notifyAll();
                } else if (control instanceof MediaTimeSetEvent)
                    System.err.println("- mediaTime set: "
                            + ((MediaTimeSetEvent) control).getMediaTime().getSeconds());
                } else if (control instanceof StopAtTimeEvent)
                    System.err.println("- stop at time: "
                            + ((StopAtTimeEvent) control).getMediaTime().getSeconds());
                    control.getSourceController().close();
            if(myController instanceof Player)
                Player player = null;
                // If player wasn't created successfully from controller, return
                player = (Player) myController;
                if (player == null)
                    System.out.println("Player is null");
                    return;
                if (control instanceof RealizeCompleteEvent)
                    System.out.println("HELLO");
                    PlayerWindow pWindow = find(player);
                    if (pWindow != null)
                        pWindow.create();
                    pWindow.setVisible(true);
                    player.start();
                if (control instanceof ControllerErrorEvent)
                    player.removeControllerListener(this);
                    PlayerWindow pWindow = find(player);
                    if (pWindow != null)
                        playerWindows.removeElement(pWindow);
                    System.out.println("Error in ControllerErrorEvent: " + control);
        }

    Okay, then here's one possible method to do something like this:
    $totalSize = 0
    Import-Csv .\fileListing.csv | ForEach {
    $fileDetails = Get-Item $_.FilePath
    $props = @{
    File = $fileDetails.FullName
    'Size(B)' = $fileDetails.Length
    $totalSize = $totalSize + $fileDetails.Length
    New-Object PsObject -Property $props
    } | Select File,'Size(B)' | Sort File | Export-Csv .\fileReport.csv -NoTypeInformation
    (Get-Content .\fileReport.csv) + "`nTotal Size,$totalSize" | Set-Content .\fileReport.csv
    This assumes an input CSV named fileListing.csv with a header of FilePath for the paths.
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • Video Capturing and Transmission

    I would like to create video streaming application, that i want to capture a video by using the webcam and then store in a buffer area that created, then the video is streaming out through network from the buffer.My problem is how do i create a buffer and save in it after capturing the video using JMF?I am a beginner to JMF. I appreciate any
    examples and advice.
    Many thanks in advance.
    littebin

    Hi,
    You can use RTP Transmission for Transmission which will transmit your live Video. In the same system you can RTP Receiver through which you can store the Live Video.
    Thanks
    With Regards,
    Navanee

  • How to capture and save voice from microphone

    I'm beginner to JMF. I want coding for capturing and saving voice from microphone. Plz anybody help me.

    http://javasolution.blogspot.com/2007/04/voice-chat-using-java.html
    http://www.vsj.co.uk/java/display.asp?id=370

  • Live Audio / Video Streaming Very Basic

    I need to Stream Live Audio and Video, i went through a web site, and it gives a code,
    [http://www.cs.odu.edu/~cs778/spring04/lectures/jmfsolutions/examplesindex.html#transmitboth]
    in this, i dont no how to run the application, because we should have 2 port addresses each for Audio and Video.
    how do u compile this and capture the file from else where using JMStudio.
    Please help me, i am an absolute beginner to JMF.

    Please don't take this to be offensive, but if you're not able to figure this out on your own, you have absolutely no business playing around with something as advanced as JMF. It's not a question of intelligence or insult, but simply stated, if you don't understand the concept of a URL, and you don't have the ability to extrapolate beyond the exact command-line input you've been given... you need to go and learn the basics, because you lack the grasp of the fundamentals required for advanced programming.
    With that in mind, the following is the answer to your question. If you can't understand it, it means that you lack the fundamentals necessary for JMF programmming, and you need to invest a significant amont of time aquiring those. My explanation should be quite clear to anyone with the proper Java programming fundamentals.
    AVTransmit2 is sample code that can broadcast a single media source (live audio or live video or audio file or video file or video/audio file). It does not have the capability to broadcast more than once source, which is required for live audio and video support. It is designed to take in a single media locator, and broastcast it.
    To meet your specifications, you will need to modify the main method so it is capable of passing in multiple media locators, and thus creating multiple instances of the AVTransmit2 class. To do this, you will either need to modify the command-line argument logic so it supports parsing multiple source arguments simultaniously.
    Or, you could just rip out the command-line stuff and hard-code it for live audio and video. That's the "easy" way.
    The default media locator for audio capture is javasound://0 and the default media locator for video capture (under Windows) is vfw://0

  • Custom Codec

    Please help me by explaining what happens with the Codec.process() implementation of this URL:
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/FrameAccess.html
    This custom codec is supposed to access individual decoded video frames from a Processor while processing the media. This could be used for scanning the decoded data;computing statistics for each video frame, and others. I'm a beginner with JMF, so please explain this code:
    public int process(Buffer in, Buffer out){
    Object data = in.getData();
    in.setData(out.getData());
    out.setData(data);
    //Why swap the data?
    out.setFormat(in.getFormat());
    out.setLength(in.getLength());
    out.setOffset(in.getOffset());
    //Why copy the input attributes to the output?
    }

    Basically, I found out what was going on with some experimentation...
    in the beginning if you do a getData() on the Output Buffer you will see it is null for a while (5-6 on my machine)... then you start to get data... these are for recylcing byte arrays... so if you send a byte array (e.g. ) in the output buffer and then watch for it... it eventually comes back to you... and similarly for all the byte arrays one creates...
    This allows two things to happen:
    1. recycling of byte arrays
    2. you can send data from a later codec to an earlier codec all one needs to do is set the data on the Input Buffer of the nth stage and you will get it in the Output buffer in the (n-1)th stage....
    Ed Roberts

  • Beginner Question. need opinion on using JMF

    i am hoping to use JMF to have a audio/video chat session . it will be like there will be 5 PC's . and 1 PC will be streaming a video, the other 4 PC's will be showing it.
    what i want to do is to draw lines or make some mark on the video thats been telecast (from the other 4 PC's), and that change to be shown on all 5 PC's
    is this do-able ? and i hope my question was not confusing .

    localpott wrote:
    is this do-able ?Yes. JMF has the built-in capability to broadcast a stream to multiple participants simultaniously, and it works a lot like email. You just add a few more recipients to the list before you press send.
    As for drawing on the video, that'd be relatively easy to do. You'd just need to develop a layering system, whereby a "bottom" layer renders the video frames, and the upper layer renders / modifies the drawing. You'd just then need to create a video "Effect" class that would grab the upper layer, render it on top of the current video frame, and then it would come out of the Processor with the drawing on it.

  • Swing and jmf

    can u please have a look to the attached file
    i know that this involves the jmf API but I have the feeling that has to do more with swing, thats whay I post my question here
    this simple application is based on the MDI.java example of the jmf web
    pages
    I also added a slider and want to set the playback rate for the player from
    there if possible
    that is I want everytime that I move the slider and the value is biggerthan
    50 the rate to be reduced according to a simple calculation that converts
    the slider value to a value between 0 an1 for the rate...
    so all i want to do is pass the slider value to the player everytime that
    the slider changes value and this is bigger than 50
    the attached file can do that only when the player starts playing the
    file,,,,
    after the player has started and the rate is set I cant change it even if
    the slider moves
    when I tried to do that from within the stateChanged method of the slider I
    was getting a Nullpointer exception because of the EventDispatching thread,
    so I thought to take this piece of code out of there (create the setnewrate
    method in the jmframe instead),,,,but then of course doesnt work like I
    would want,,,,,
    do I have to register the class that implements the frame for the player as
    a ChangeListener on the slider to achieve that, is something like that
    possible....
    I know that swing is not supposed to be thread safe, so maybe this is what
    the problem is after all...any suggestions to that direction?
    Can u please have a look??
    I am a beginner so any help would really be very much appreciated
    thanx :)
    maria
    .....and the attached file
    I think the problem is with the stateChanged method for the Jslider...
    I am getting a null pointerexception because of the eventdispatching thread
    pls ignore any silly mistakes I am a completely newbie in java
    myAppfr2.java
    import javax.media.*;
    import com.sun.media.ui.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import java.util.Vector;
    import javax.swing.border.Border.*;
    import java.util.Hashtable;
    public class myAppfr2 extends Frame {
    * VARIABLES
    JMFrame jmframe = null;
    JDesktopPane desktop;
    FileDialog fd = null;
    CheckboxMenuItem cbAutoLoop = null;
    Player player ;
    //Player newPlayer = null;
    String filename;
    boolean stopped;
    public my_slider test_slider;//put it here so I can use it by name by all code
    float rate;
    * MAIN PROGRAM / STATIC METHODS
    public static void main(String args[]) {
    //if (args.length > 0)
         //rate=Float.parseFloat(args[0]);
    myAppfr2 mdi = new myAppfr2();
    static void Fatal(String s) {
    MessageBox mb = new MessageBox("JMF Error", s);
    * METHODS
    public myAppfr2() {
    super("VHE Demo");
    // Add the desktop pane
    setLayout( new BorderLayout() );
    desktop = new JDesktopPane();
    desktop.setDoubleBuffered(true);
         desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);//makes dragging faster
    add("Center", desktop);
    setMenuBar(createMenuBar());
    setSize(640, 480);
    setVisible(true);
         test_slider = new my_slider("networkutil");
         createnetworkutil();
         try {
         UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel") ;
    } catch (Exception e) {
    System.err.println("Could not initialize personal look and feel");
    addWindowListener( new WindowAdapter() {
    public void windowClosing(WindowEvent we) {
    System.exit(0);
    Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, new Boolean(true));
    private MenuBar createMenuBar() {
    ActionListener al = new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    String command = ae.getActionCommand();
    if (command.equals("Open")) {
    if (fd == null) {
    fd = new FileDialog(myAppfr2.this, "Open File",
    FileDialog.LOAD);
    fd.setDirectory("~/movies");
    fd.show();
    if (fd.getFile() != null) {
    String filename = fd.getDirectory() + fd.getFile();
    openFile("file:" + filename);
    } else if (command.equals("Exit")) {
    dispose();
    System.exit(0);
    MenuItem item;
    MenuBar mb = new MenuBar();
    // File Menu
    Menu mnFile = new Menu("File");
    mnFile.add(item = new MenuItem("Open"));
    item.addActionListener(al);
    mnFile.add(item = new MenuItem("Exit"));
    item.addActionListener(al);
    // Options Menu
    Menu mnOptions = new Menu("Options");
    cbAutoLoop = new CheckboxMenuItem("Auto replay");
    cbAutoLoop.setState(true);
    mnOptions.add(cbAutoLoop);
    mb.add(mnFile);
    mb.add(mnOptions);
    return mb;
    //create slider and add it to desktop
    public void createnetworkutil(){
    test_slider.pack();
    desktop.add(test_slider);
    test_slider.setVisible(true);
    * Open a media file.
    private void openFile(String filename) {
    String mediaFile = filename;
    Player player = null;
    // URL for our media file
    URL url = null;
    try {
    // Create an url from the file name and the url to the
    // document containing this applet.
    if ((url = new URL(mediaFile)) == null) {
    Fatal("Can't build URL for " + mediaFile);
    return;
    // Create an instance of a player for this media
    try {
    player = Manager.createPlayer(url);
    } catch (NoPlayerException e) {
    Fatal("Error: " + e);
    } catch (MalformedURLException e) {
    Fatal("Error:" + e);
    } catch (IOException e) {
    Fatal("Error:" + e);
    if (player != null) {
    this.filename = filename;
    JMFrame jmframe = new JMFrame(player, filename);
    desktop.add(jmframe);
    class JMFrame extends JInternalFrame implements ControllerListener {
    public Player mplayer;
    Component visual = null;
    Component control = null;
    int videoWidth = 0;
    int videoHeight = 0;
    int controlHeight = 30;
    int insetWidth = 10;
    int insetHeight = 30;
    // boolean firstTime = true;
    public JMFrame(Player player, String title) {
    super(title, true, true, true, true);
    getContentPane().setLayout( new BorderLayout() );
    //setSize(320, 10);
    setLocation(200, 25);
    setVisible(true);
    mplayer = player;
    mplayer.addControllerListener((ControllerListener) this);
    mplayer.realize();
    addInternalFrameListener( new InternalFrameAdapter() {
    public void internalFrameClosing(InternalFrameEvent ife) {
    mplayer.close();
    public void controllerUpdate(ControllerEvent ce) {
    // System.out.println("controllerUpdate");
    //SwingUtilities.isEventDispatchThread();
    if (ce instanceof RealizeCompleteEvent) {
    mplayer.prefetch();
    } else if (ce instanceof PrefetchCompleteEvent) {
    if (visual != null)
    return;
         //setnewrate();
         //rate=mplayer.getRate();
         System.out.println( mplayer.getRate());
    if ((visual = mplayer.getVisualComponent()) != null) {
    Dimension size = visual.getPreferredSize();
    videoWidth = size.width;
    videoHeight = size.height;
    getContentPane().add("Center", visual);
    } else
    videoWidth = 320;
    /*if ((control = mplayer.getControlPanelComponent()) != null) {
    controlHeight = control.getPreferredSize().height;
    getContentPane().add("South", control);
    setSize(videoWidth + insetWidth,
    videoHeight + controlHeight + insetHeight);
    validate();
    mplayer.start();
    } else if (ce instanceof StartEvent){
         if (test_slider.netutil==0) {
         mplayer.stop();
         } else if (ce instanceof EndOfMediaEvent && cbAutoLoop.getState()) {
    mplayer.setMediaTime(new Time(0));
              boolean stopped=true;
              mplayer.prefetch();
              mplayer.start();
              stopped=false;
    class my_slider extends JInternalFrame implements ChangeListener{
    //Set up parameters.
    int netini=50;
    public int netutil=netini;
    public my_slider(String windowTitle) {
    super(windowTitle, false, false, false, false);
    getContentPane().setLayout(new BorderLayout());
    setLocation(25,25);// for the internal frame that contains the slider
    setVisible(true); //..same
    //Create the slider(the component included in "my_slider" internal frame
         JSlider mslider = new JSlider(JSlider.VERTICAL,
    0, 100, netini);
    mslider.addChangeListener((ChangeListener) this);
    mslider.setMajorTickSpacing(10);
    mslider.setPaintTicks(true);
    //Create the label table.
    Hashtable labelTable = new Hashtable();
    labelTable.put(new Integer( 0 ),
    new JLabel("0%") );
    labelTable.put(new Integer( 25 ),
    new JLabel("25%") );
    labelTable.put(new Integer( 50 ),
    new JLabel("50%") );
    labelTable.put(new Integer(75),
    new JLabel("75%") );
         labelTable.put(new Integer( 100),
    new JLabel("100%") );     
    mslider.setLabelTable(labelTable);
    mslider.setPaintLabels(true);
    mslider.setBorder(
    BorderFactory.createEmptyBorder(0,0,0,10));
         //Put everything in the content pane.
    getContentPane().add(mslider, BorderLayout.CENTER);
    public void stateChanged(ChangeEvent e) { //System.out.println("stateChanged");
    // SwingUtilities.isEventDispatchThread();
    if (e instanceof ChangeEvent){
    JSlider source = (JSlider)e.getSource();
    if (!source.getValueIsAdjusting()) {
    netutil= (int)source.getValue();
         System.out.println(netutil);
              if (jmframe.mplayer!=null) {
         jmframe.mplayer.setRate((float)(netutil/(netutil+(0.3*netutil))));
              if (jmframe.mplayer.getTargetState() <Player.Started)
         jmframe.mplayer.prefetch();
    i am stuck so any help would be really very much appreciated

    did you ever resolve this.
    I may be having similar problems
    I have an JMF application running under webstart. It runs ok in Java 1.3
    Now I am trying to get ti to run under Java 1.4. The attached error is rather useless,
    but by guess at what is happening is that the JMF control has some .awt. stuff included
    but that Java 1.4 emulates .awt. in swing. But something was not set and the default does not
    work.
    This error messages does not appear in the 1.3 run
    Any suggestions would be greatly appriatated.
    1.4 result:
    mg version 2.1.1a
    player created com.sun.media.content.unknown.Handler@3a1834
    ctr com.sun.media.PlaybackEngine$BitRateA@4a9a7d
    ctr com.sun.media.BasicJMD[panel0,0,0,512x200,invalid,layout=java.awt.BorderLayout]
    duration? javax.media.Time@6b5666 sec = 9.223372036854776E9
    time unknown javax.media.Time@754699
    will realize the player
    realize
    javax.media.TransitionEvent[source=com.sun.media.content.unknown.
    Handler@3a1834,previous=Unrealized,current=Realizing,
    target=Realized]
    start smxBADS
    bass start
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.metal.MetalLookAndFeel.getControlInfo(Unknown Source)
    at javax.swing.plaf.metal.MetalScrollButton.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintWithBuffer(Unknown Source)
    at javax.swing.JComponent._paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.metal.MetalLookAndFeel.getControlInfo(Unknown Source)
    at javax.swing.plaf.metal.MetalScrollButton.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintWithBuffer(Unknown Source)
    at javax.swing.JComponent._paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    realize done
    panel found java.awt.Panel[panel1,0,0,0x0,invalid] java.awt.Panel[panel2,4,216,292x30,layout=java.awt.FlowLayout]
    press a button
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.metal.MetalLookAndFeel.getControlInfo(Unknown Source)
    at javax.swing.plaf.metal.MetalScrollButton.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintWithBuffer(Unknown Source)
    at javax.swing.JComponent._paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    1.3 result
    mg version 2.1.1a
    player created com.sun.media.content.unknown.Handler@354749
    ctr com.sun.media.PlaybackEngine$BitRateA@5b484d
    ctr com.sun.media.BasicJMD[panel3,0,0,512x200,invalid,layout=java.awt.BorderLayout]
    duration? javax.media.Time@46d228 sec = 9.223372036854776E9
    time unknown javax.media.Time@f7386
    will realize the player
    realize
    javax.media.TransitionEvent[source=com.sun.media.content.unknown.
    Handler@354749,previous=Unrealized,current=Realizing,
    target=Realized]
    start smxBADS
    bass start
    javax.media.DurationUpdateEvent[source=com.sun.media.content.unknown.Handler@354749,duration=javax.media.Time@55c0f9
    javax.media.Time@55c0f9
    javax.media.RealizeCompleteEvent[source=com.sun.media.content.unknown.Handler@354749,previous=Realizing,current=Realized,target=Realized]
    realized complete
    prefetch
    realize done
    controlComp com.sun.media.ui.DefaultControlPanel[,0,0,74x21,invalid,layout=java.awt.BorderLayout]
    add controlComp 21 java.awt.Panel[panel4,10,-12,258x47,invalid]
    javax.media.TransitionEvent[source=com.sun.media.content.unknown.Handler@354749,previous=Realized,current=Prefetching,target=Prefetched]
    start smxBADS
    bass start
    running ok from here on

  • VLC player RTSP server - JMF client

    Hello,
    I want to write application which can capture RTSP stream from VLC player. I am just beginner and don`t know where is problem. Can anybody help me, please? Here is my code, console output and log file.
    import javax.media.ControllerEvent;
    import javax.media.ControllerListener;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoPlayerException;
    import javax.media.RealizeCompleteEvent;
    import javax.media.StartEvent;
    import javax.swing.SwingUtilities;
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Dimension;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import java.awt.Rectangle;
    import java.io.IOException;
    import javax.media.Player;
    public class prehravacRTP extends JFrame implements ControllerListener {
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         private JPanel jPanel_Video = null;
         Player player = null;
         String url = null;
         MediaLocator mrl = null;
         Component visualComp = null;
         private JPanel getJPanel_Video() {
              if (jPanel_Video == null) {
                   jPanel_Video = new JPanel();
                   jPanel_Video.setLayout(new BorderLayout());
                   jPanel_Video.setBounds(new Rectangle(4, 3, 448, 333));
              return jPanel_Video;
         void setLocation(){
              url= "rtsp://192.168.1.100:5544/video.mov";
              mrl= new MediaLocator(url);
              if (mrl == null) {
                   System.err.println("Can't build MRL");
                   System.exit(1);
         void realizeRTSP(){
              try {
                   player = Manager.createPlayer(mrl);
              } catch (NoPlayerException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              player.addControllerListener(this);
              player.realize();
         public synchronized void controllerUpdate(ControllerEvent evt){
              System.out.println(evt.toString());
              if(evt instanceof StartEvent){
                   Player p = (Player) evt.getSourceController();
                   visualComp = p.getVisualComponent();
                  if (visualComp != null){
                       Dimension d = visualComp.getPreferredSize();
                       jPanel_Video.setSize(d);
                       jPanel_Video.add("North", p.getVisualComponent());
                       jPanel_Video.setVisible(true);
                       validate();
              if(evt instanceof RealizeCompleteEvent){
                   player.start();
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        prehravacRTP thisClass = new prehravacRTP();
                        thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        thisClass.setVisible(true);
         public prehravacRTP() {
              super();
              initialize();
         private void initialize() {
              this.setSize(465, 369);
              this.setContentPane(getJContentPane());
              this.setTitle("RTSP Player");
              setLocation();
              realizeRTSP();
         private JPanel getJContentPane() {
              if (jContentPane == null) {
                   jContentPane = new JPanel();
                   jContentPane.setLayout(null);
                   jContentPane.add(getJPanel_Video(), null);
              return jContentPane;
    Open log file: C:\Program Files\JMF2.1.1e\bin\\jmf.log
    javax.media.TransitionEvent[source=com.sun.media.content.rtsp.Handler@1c0ec97,previous=Unrealized,current=Realizing,target=Realized]
    bandwidth info: RR:0
    javax.media.ResourceUnavailableEvent[source=com.sun.media.content.rtsp.Handler@1c0ec97,message=Failed to realize: Message from RTSP Server - Not found]
    javax.media.ControllerClosedEvent[source=com.sun.media.content.rtsp.Handler@1c0ec97]
    # JMF Version 2.1.1e
    ## Platform: Windows XP, x86, 5.1
    ## Java VM: Sun Microsystems Inc., 1.5.0_12
    ## Player created: com.sun.media.content.rtsp.Handler@1c0ec97
    ##   using DataSource: com.sun.media.protocol.rtsp.DataSource@1bb60c3
    ## outgoing msg:
    ## DESCRIBE rtsp://192.168.1.100/video.mov RTSP/1.0
    CSeq: 928
    Accept: application/sdp
    User-Agent: JMF RTSP Player Version 2.1.1e
    ## incoming msg:
    ## RTSP/1.0 200 OK
    Server: VLC/1.1.4
    Date: Tue, 23 Nov 2010 15:35:49 GMT
    Content-Type: application/sdp
    Content-Base: rtsp://192.168.1.100:5544/video.mov
    Content-Length: 344
    Cache-Control: no-cache
    Cseq: 928
    v=0
    o=- 15030303979736870809 15030303979736870809 IN IP4 fonzzy-laptop
    s=Unnamed
    i=N/A
    c=IN IP4 0.0.0.0
    t=0 0
    a=tool:vlc 1.1.4
    a=recvonly
    a=type:broadcast
    a=charset:UTF-8
    a=control:rtsp://192.168.1.100:5544/video.mov
    m=video 0 RTP/AVP 96
    b=RR:0
    a=rtpmap:96 H263-1998/90000
    a=control:rtsp://192.168.1.100:5544/video.mov/trackID=8
    ## Add RTP dynamic payload for video: 96 : h263-1998/rtp
    ## outgoing msg:
    ## SETUP rtsp://192.168.1.100:5544/video.movrtsp://192.168.1.100:5544/video.mov/trackID=8 RTSP/1.0
    CSeq: 929
    Transport: RTP/AVP;unicast;client_port=38658-38659
    User-Agent: JMF RTSP Player Version 2.1.1e
    ## incoming msg:
    ## RTSP/1.0 404 Not found
    Content-Length: 366
    Content-Type: text/html
    <?xml version="1.0" encoding="ascii" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml10/DTD/xhtml10strict.dtd">
    <html lang="en">
    <head>
    <title>Not found</title>
    </head>
    <body>
    <h1>404 Not found (/video.movrtsp://192.168.1.100:5544/video.mov/trackID=8)</h1>
    <hr />
    <a href="http://www.videolan.org">VideoLAN</a>
    </body>
    </html>
    !! [SDP Parser] Token missing: v=Every help will by appreciated. Thank you.

    Thank you for responce captfoss,
    I have also option to stream HTTP with VLC. I tried stream mp3 and it`s working. My application start caching than start player and keep caching. With video I have problem. Application starts caching than start player, but only shows one frame and than again prefetched state.
    javax.media.TransitionEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,previous=Unrealized,current=Realizing,target=Realized]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=103737]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=204912]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=307848]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=409609]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=513394]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=614423]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=717655]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=819369]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=923076]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=1024742]
    javax.media.RealizeCompleteEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,previous=Realizing,current=Realized,target=Realized]
    javax.media.TransitionEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,previous=Realized,current=Prefetching,target=Prefetched]
    javax.media.PrefetchCompleteEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,previous=Prefetching,current=Prefetched,target=Prefetched]
    javax.media.StartEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,previous=Prefetched,current=Started,target=Started,mediaTime=javax.media.Time@14e8cee,timeBaseTime=javax.media.Time@67064]
    javax.media.EndOfMediaEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,previous=Started,current=Prefetched,target=Prefetched,mediaTime=javax.media.Time@3c9217]
    javax.media.DurationUpdateEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,duration=javax.media.Time@9b42e6
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=1126585]
    javax.media.CachingControlEvent[source=com.sun.media.content.video.mpeg.Handler@170888e,cachingControl=com.sun.media.protocol.DataSource$CachingControl@b9e45a,progress=1229673]I also tried add this to event controller without success.
    if(evt instanceof PrefetchCompleteEvent){
                   player.start();
    }Any suggestion? Thank you.
    Edited by: 814939 on Nov 24, 2010 5:02 AM

  • JMF why player cannot be realised?

    Hi everyone,
    I am a beginner in java programming and right now doing a project on socket programming. We are supposed to play various media files types with embedded player. Here i use some JMF funtions such as javax.media.player into my code. Actually if I installed the jmf-2_1_1e-windows-i586.exe into my computer, i can run my code and play vaious media files. However we should not ask all the clients to install JMF before they can run our code. Therefore i tried on the other computer without installing the jmf exe file, but just to add new library with the customizer.jar, jmf.jar, mediaplayer.jar and multiplayer.jar. My code has no error detected however i cannot play any music files on my second computer. It always has error in the output window saying " player cannot be realised". Even if i tried exactly the same media files on both computer, the one with installed JMF .exe can play those files, and the other without cannot play.
    Anyone knows how to solve the problem? Besides creating new libraries containing those jar files from jmf folder, what shall i do to make the code working yet without installing the jmf exe file into my windows?
    Thanks in advance for your help!
    Edited by: ll1728 on Mar 9, 2009 2:46 AM

    Hi, T.B.M, really thanks for your timely response.
    I have downloaded the cross platform version of JMF, and have added the jar files into my project library. Well, this time round is I can play the sound of the mpg file but without image. As i read from <http://forums.sun.com/thread.jspa?threadID=570424&tstart=28> this link saying that "MP3 is supported only on the Windows platform", i tried to put some plug-ins like fobs4jmf. However it still didn't solve my problem.
    When i added in the fobs4jmp.jar into my library, i can play avi, mpg file with only image but no sound.
    When i remove the fobs4jmp.jar, use only cross platform jmf jar files, the only file format i can play is .mpg. But there is only sound no image displayed.
    Do you have any idea what i should do? I have searched online myself but didn't find any clue.
    Thank you so much for your help.

  • Installation of JMF

    Well I'm a beginner!
    I have a lot of problems with JMF, I installed it but i cannot use the javax.media package.
    Documentation says I have to give the class path variables and etc etc........
    I did not get anything. Can any 1 help me out with the path variables.
    I run Windows XP.
    Java is installed at C:\Program Files\Java
    JMF is installed at C:\Program Files\Jmf2.1e
    I would really appreciate your help.
    Please help me with any info on JMF.
    [email protected]

    Under WinXP you should be able to right click on "My Computer", select Properties and then click on Advanced (I think), then you should see an option called Environment Variables .... in here you can add/edit your CLASSPATH.
    HTH.

  • JMF audio query

    Hello all,
    I am doing some developement in JMF. I am just a beginner to this field. I wanted to implement an audioconferencing project. Hence in order for JMF to detect my microphone which vfw driver shld I use.
    Message was edited by:
    pranamya_ha

    slash2 wrote:
    Where would change the default settings? There's no BIOS setup for it and I don't see anything in SLAX OS.It would be a sound card setting in the OS itself.
    I was looking at JavaSound; I assume I'd have to rewrite everything to use that? Which I would hate to do. I've been off this project for awhile (and Linux and JMF) and it's hard to remember it all. Certainly is a fallback though, thanks.No, you don't have to rewrite anything because the code I gave you is a DataSource for JMF that will capture audio using JavaSound's technology and deliver it to JMF, so whatever JMF infastructure you've already built would be unaffected...

Maybe you are looking for