JMF AudioPlayer

Below code is a simple audio player using command line argument. But I am unable to run this code. When i try to compile, it gives me an error
SimpleAudioPlayer.java uses or overrides a deprecated API. Recompile with -Xlint:deprecation for details.
I am a newbie in JMF, so correct the errors in the code with explanation. Thanks!
Here is the code:
import javax.media.*;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.MalformedURLException;
public class SimpleAudioPlayer
private Player audioPlayer = null;
public SimpleAudioPlayer(URL url) throws IOException, NoPlayerException, CannotRealizeException
audioPlayer = Manager.createRealizedPlayer(url);
public SimpleAudioPlayer(File file) throws IOException, NoPlayerException, CannotRealizeException
this(file.toURL());
public void play()
audioPlayer.start();
public void stop()
audioPlayer.stop();
audioPlayer.close();
File audioFile = new File(args[0]);
SimpleAudioPlayer player = new SimpleAudioPlayer(audioFile);
player.play();
player.stop();
}

Thanks!
I am getting one more error which says *"IOException; must be caught or declared to be thrown SimpleAudioPlayer player = _new_ SimpleAudioPlayer(audioFile);*"
It also sometimes gives an error on player.play(); says expected. I checked the parenthesis.
Also i have put this code inside the main like this:
public static void main(String args[]) throws IOException
File audioFile = new File(args[0]);
SimpleAudioPlayer player = new SimpleAudioPlayer(audioFile); // I getting Error here (new)
player.play();
player.stop();
}

Similar Messages

  • JMF Pause

    Hello!
    I will start by saying i'm only a begginer in JMF programming. I want to make a pause function, which teoretically is very simple to make but i don't know why, it seems like it only works with some songs, and with others it doesn't. I mean, it works playing all of them from the beginning, but when i try pausing them, with some it doesn't work. And always the same songs, so it's not some mistake i made (maybe it is, but a more complex one, that's why i need your help). So the code for my music file:
    public class MP3V2 {
    URL url;
    Player audioplayer;
    boolean paused;
    Time resume;
    public MP3V2(URL u){//for starting from the beginning
    try{
    url=u;
    audioplayer=Manager.createRealizedPlayer(url);
    } catch(Exception e){}
    public MP3V2(URL u,Time time){ //for resume
    try{
    url=u;
    audioplayer=Manager.createRealizedPlayer(url);
    audioplayer.setMediaTime(time);
    } catch(Exception e){}
    public void stop(){
    if(audioplayer!=null) audioplayer.stop();
    public void start(){
    new Thread(){
    public void run() {
    try {
    audioplayer.start();
    catch (Exception e) { System.out.println(e.getMessage()); }
    }}.start();
    And the code for pause:
    try{
    if(paused==0) {
    time= mp3.audioplayer.getMediaTime();
    mp3.stop();
    paused=play;
    play=0;//some variables i need
    else {
    mp3 = new MP3V2(files[paused].toURL(),time);
    mp3.start();
    play=paused;
    paused=0;
    } catch(Exception e) {System.out.println(e.getMessage());}
    In other words when i resume i actually start a new song but not from the beginning. The problem is that with some songs, the track remains stuck at the setting time, even after using start() method. Do you know what do i do wrong, or do you know a simpler way to make a pause function?

    In order for that approach to work, the DataSource has to be Positionable... which some are not.
    I believe some people have had sucess in the past implementing pause by stopping and then just calling start again...

  • Play audio file with jmf on linux?

    a simple audio player as flow:
    import javax.media.*;
    import java.io.File;
    import java.net.URL;
    public class SimpleAudioPlayer {
        private Player audioPlayer = null;
        public SimpleAudioPlayer(URL url) throws Exception {
            audioPlayer = Manager.createRealizedPlayer(url);
        public SimpleAudioPlayer(File file) throws Exception {
            this(file.toURL());
        public void play() {
            audioPlayer.start();
        public void stop() {
            audioPlayer.close();
        public static void main(String[] args) throws Exception {
            File file = new File("/usr/local/download/1.wav");
            SimpleAudioPlayer sap = new SimpleAudioPlayer(file);
            sap.play();
    }when run the program
    javac -cp jmf.jar SimpleAudioPlayer.java
    java -cp .:jmf.jar SimpleAudioPlayer
    the output as flow:
    Unable to handle format: ima4/ms, 8000.0 Hz, 4-bit, Mono, Unsigned, 4027.0 frame rate, FrameSize=4096 bits
    Failed to prefetch: com.sun.media.PlaybackEngine@defa1a
    Error: Unable to prefetch com.sun.media.PlaybackEngine@defa1a
    How can I play wav file with jmf on linux?(OS is debian5 and jmf cross-platform pack)

    thanks for your reply.
    I tried to replace the wav file "1.wav" with the linear encoded WAV download from pscode.org,and run the code again,but
    BasicTrackControl:prefetchTrack():96 1 bm = com.sun.media.BasicRendererModule@1186fab
    BasicRendererModule.doPrefetch:155 Render : true
    Render buffer size: 32768
    BasicRenderModule.doPrefetch:159
    javax.media.ResourceUnavailableException: Cannot intialize audio device for playback
    at com.sun.media.renderer.audio.JavaSoundRenderer.open(JavaSoundRenderer.java:93)
    at com.sun.media.BasicRendererModule.doPrefetch(BasicRendererModule.java:158)
    at com.sun.media.BasicTrackControl.prefetchTrack(BasicTrackControl.java:99)
    at com.sun.media.PlaybackEngine.doPrefetch1(PlaybackEngine.java:682)
    at com.sun.media.PlaybackEngine.doPrefetch(PlaybackEngine.java:658)
    at com.sun.media.PrefetchWorkThread.process(BasicController.java:1430)
    !!!!!!!§§§§§§§§§§§ BasicTrackControl:prefetchTrack():96
    at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
    Unable to handle format: LINEAR, 16000.0 Hz, 16-bit, Mono, LittleEndian, Signed, 32000.0 frame rate, FrameSize=16 bits
    Failed to prefetch: com.sun.media.PlaybackEngine@26e431
    Error: Unable to prefetch com.sun.media.PlaybackEngine@26e431

  • Install JMF on Windows 7 64bit

    Dear all,
    After a lot of struggling (and a really mean a lot), I finally got jmf to work on Windows 7 64bit. I figured that I can better not let this information go to waste, so that's why I'm posting it here. I didn't really test the full capabilities of jmf on my platform yet, in fact I only tested those features that I needed for my application. As such I am able to successfully capture and record video clips from my build in webcam of my laptop.
    First let me describe my platform:
    Laptop: Samsung R590 (JS01)
    Processor: I5 450M (64bit)
    OS: Windows 7 64bit
    Webcam: build in
    Secondly I want to apologize in advance if the method below doesn't work for you. The reason for that can be that I had to try so many different things before I finally got it to work, so I'm not really sure which steps are necessary and which ones are not. So I tried to make a guide that only includes the necessary steps, but in reality I tried so much more, so if this tutorial doesn't work for you, please give me feedback, and we'll try to figure it out. :)
    Step one: installation of java JRE/JDK
    JMF will never work on a 64bit JRE/JDK, plain and simple because JMF is too old and doesn't support a 64bit JRE/JDK. Thus your first step has to be to install a 32 bit JRE/JDK on your system. (I uninstalled my 64 bit JRE/JDK first, but I don't now whether or not this is necessary)
    Step two: download JMF with windows performance pack
    Go to the jmf site and download the most recent jmf version, with windows performance pack. (This is - and will probably be forever - version 2.1.1e)
    The link to the website is currently: [https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=7372-jmf-2.1.1e-oth-JPR@CDS-CDS_Developer]
    Step three: install JMF
    Install the file you just downloaded in the normal way you would install any other program. But chose as installation path: "C:\JMF2.1.1e"
    I think this is necessary because of the strict security policy in Windows 7, if you don't do this, I guess jmf won't be able to store capture device settings to your local hard drive. (But again, I'm not completely sure here, please verify this if possible)
    After the installation, you don't have to do anything special to get jmf to work, so you don't manually have to set the JMFDIR, PATH and CLASSPATH (as is explained at the sun website), just skip those steps.
    After the installation, reboot your pc.
    Remark: I recommend you to install jmf as an administrator (but I don't now whether or not this is necessary). To do this, right click the installation file and select: "run as administrator'.
    *Step four: register your capture devices*
    First make sure that all your devices are working properly, I recommend you to use a program like Skype or something just to check whether your microphone is working or not.
    Secondly, open jmfstudio, select 'file > preferences > capture devices', and press the button 'detect capture devices'. Normally you will have to wait for a couple of minutes now (because the determination of all the available video formats takes quite a while). Afterwards jmf should have found all of your devices, that usually looks something like this:
    DirectSoundCapture
    JavaSound audio capture
    vfw:Microsoft WDM Image Capture (Win32):0
    But this can vary according to your configuration off course. :)
    *Step four: test your capture devices*
    In jmfstudio, select 'file > capture' and select the video and audio combo and see if your webcam settings work. You should now be able to view and hear yourself.
    *Step five: that's it, enjoy your jmf*
    *Remarks:*
    My development platform is currently netbeans 6.9.1 and I am able to write code, build it and run it with netbeans. I can also just run normal *.jar files
    *Troubleshoot:*
    If you get a dialog screen when starting your video capture device that looks like this: [http://www.alexandria.nu/ai/machine_vision/dual_cameras/SelectDevice.gif]
    (With off course another name for the capture device), then that means that your capturing device is currently occupied by another program and you can't currently use it.
    To solve this, make sure that no other application is using the webcam. For me even this was insufficient, but I managed to solve this by installing the latest drivers for my webcam from the manufacturing site of my laptop.
    I sincerely hope this tutorial can be of any use for someone, feel free to give me comments/suggestions. And please post here if this works for you or not.
    Greetings, Molly

    Hi
    sure I follow each of your steps, I uninstall all java verisones and installed a new java version 32-bit, I installed JMF in "C: \ JMF2.1.1e".
    when all installing finished, works fine JMF only once, I do the tests, recognizes the device; shows the video, but when I close and open again JStudio don't works throws error, and therefore my apliación not working, always returns null the device

  • Unable to capture video from webcam in JMF in xlet

    hi
    I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?
    Thanks
    Rajesh

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

  • Unable to capture video from webcam in JMF

    hi
    I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?

    MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
    Steve.

  • Detecting Video Capture Devices without Installing JMF

    Hi All,
    I want to detect the video capture devices, without installing the JMF.
    I had included the jmf (windows version) in lib path in netbeans ide. I am able to detect the audio capture device. But unable to detect the video capture devices. But if I install the JMF, I am able to detect the Video Capture devices in My system. Can anyone help me?
    Thanks,
    Vinoth Kumar.

    YES! Please take a look at SIP Communicator project. They have all what u want.
    The main idea is copy all .dll files to System or System32 (Please check files which JMF will copy to ur computer and where).
    U need to have jmf.jar and sound.jar too ( maybe more) in your computer.
    Your program should have DirectSoundAuto.java, JavaSoundAuto.java, JavaSoundDetector.java, JMFInit.java. Those files are in JMStudio source code. They are used to detect all capture devices and register it to JMF, but wait !!! where they will be saved? In order to save information about capture devices which are detected, you should create "jmf.properties" file in the same location with jmf.jar.Therefore, u should modify the JMFInit.java so it can check if the "jmf.properties" exists. If it's not, you have to create it.
    Check SIP Communicator at Folder "media" then "device". They have modified those files I mentioned above and created some new files to SC can detect more devices.
    Edited by: tamngminh on Sep 16, 2008 9:50 AM

  • Problems in sound capture and JMF deployment

    Hello:
    I am new to JMF.
    I made an applet using JDK 1.3 on JBuilder 5. This applet captures and plays audio. When I run it through JBuilder's IDE, it runs fine. But when I run it independently, the applet's GUI appears but sound recording doesnn't work. Remember that I have JRE1.4.2 and JMF2.1.1e installed on my machine.
    When I installed JMF, I enabled the recording, and file writing options for an applet.
    To further check the problem, I ran it through JMF debugger. There I found that it says that ,
    <permission javax.sound.sampled.AudioPermission "record";> is not enabled.
    To enable it I added this entry in java.policy. This allowed the audio capture to work.
    But my question is,
    1. Why isn't this entry present by default in java.policy?
    2. Even one of my user entered this entry in java.policy, but was unable to capture audio.
    3. I want my applet to be running with different users having different versions of JRE,JMF and browser settings. How can I do this, without asking my user to do anything? I simply want that when my user downloads this applet, I should provide him with some installation file that installs JMF as well as configures everything on the system in a way that he can use this applet easily.
    Haven't you guys faced such problems in deploying JMF stuff?
    I'll be grateful for any help.
    Thanks
    Jami

    Hi.
    I am facing very similar problems: it looks like deploying JMF with Java Applets is really a challange!
    On my own test installation, if I enable audio capture and file writing for applets through the JMFRegistry, then I am able to record audio from my test applet, even when executed in the target web browser.
    Nevertheless, how to deploy the applet in such a way clients won't be required to manually install JMF and enable audio capture and file writing through the JMFRegistry?
    It looks like the JMF Customizer is able to produce a custom JAR also embedding user preferences for audio capture from applets and file writing , is this correct?
    Any help would be greatly appreciated.
    Regards,
    Marco.

  • JMF code working under linux but not windows XP

    Hello everyone,
    I'm currently working on a nice cross-platform project involving sound producing. I decided to take a look at JMF and test it a bit to know if its features can suit me. I tried to make it works under windows, using a very simple sample of code. The system seems to play the sound as some console output detects the start and the end, but all i hear is a very short noise ( 1/2second ) like a "CLIK" and nothing else. I tested the code under linux, using the same computer and it works just fine, playing the same wave nicely and entirely.
    some info:
    -i used the cross platform JMF, no performance pack ( i tried it , but still no result )
    -the code just opens a file dialog and plays the selected file
    -the selected file was always a very simple .wav
    -i did not use system classpath variables because i don't like it, i rather use local classpath ( which works fine too, no doubt about it )
    -i tested this little soft on 2 other computer using windows XP, and still got the same result.
    Please, have you got an idea about what's going on ?
    Thanks a lot for any answer!
    Maxime - Paris . France
    Code Sample:
    import java.io.File;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import javax.media.*;
    import javax.swing.JDialog;
    import javax.swing.JFileChooser;
    import javax.swing.JOptionPane;
    public class JMFSound extends Object implements ControllerListener {
         File soundFile;
         JDialog playingDialog;
         public static void main (String[] args) {
              JFileChooser chooser = new JFileChooser();
              chooser.showOpenDialog(null);
              File f = chooser.getSelectedFile();
              try {
                   JMFSound s = new JMFSound (f);
              } catch (Exception e) {
                   e.printStackTrace();
         public JMFSound (File f) throws NoPlayerException, CannotRealizeException,     MalformedURLException, IOException {
              soundFile = f;
              // prepare a dialog to display while playing
              JOptionPane pane = new JOptionPane ("Playing " + f.getName(), JOptionPane.PLAIN_MESSAGE);
              playingDialog = pane.createDialog (null, "JMF Sound");
    playingDialog.pack();
              // get a player
              MediaLocator mediaLocator = new MediaLocator(soundFile.toURL());
              Player player =     Manager.createRealizedPlayer (mediaLocator);
    player.addControllerListener (this);
    player.prefetch();
    player.start();
    playingDialog.setVisible(true);
         // ControllerListener implementation
         public void controllerUpdate (ControllerEvent e) {
    System.out.println (e.getClass().getName());
         if (e instanceof EndOfMediaEvent) {
                   playingDialog.setVisible(false);
                   System.exit (0);
    Message was edited by:
    Monsieur_Max

    Hello everyone,
    I'm currently working on a nice cross-platform project involving sound producing. I decided to take a look at JMF and test it a bit to know if its features can suit me. I tried to make it works under windows, using a very simple sample of code. The system seems to play the sound as some console output detects the start and the end, but all i hear is a very short noise ( 1/2second ) like a "CLIK" and nothing else. I tested the code under linux, using the same computer and it works just fine, playing the same wave nicely and entirely.
    some info:
    -i used the cross platform JMF, no performance pack ( i tried it , but still no result )
    -the code just opens a file dialog and plays the selected file
    -the selected file was always a very simple .wav
    -i did not use system classpath variables because i don't like it, i rather use local classpath ( which works fine too, no doubt about it )
    -i tested this little soft on 2 other computer using windows XP, and still got the same result.
    Please, have you got an idea about what's going on ?
    Thanks a lot for any answer!
    Maxime - Paris . France
    Code Sample:
    import java.io.File;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import javax.media.*;
    import javax.swing.JDialog;
    import javax.swing.JFileChooser;
    import javax.swing.JOptionPane;
    public class JMFSound extends Object implements ControllerListener {
         File soundFile;
         JDialog playingDialog;
         public static void main (String[] args) {
              JFileChooser chooser = new JFileChooser();
              chooser.showOpenDialog(null);
              File f = chooser.getSelectedFile();
              try {
                   JMFSound s = new JMFSound (f);
              } catch (Exception e) {
                   e.printStackTrace();
         public JMFSound (File f) throws NoPlayerException, CannotRealizeException,     MalformedURLException, IOException {
              soundFile = f;
              // prepare a dialog to display while playing
              JOptionPane pane = new JOptionPane ("Playing " + f.getName(), JOptionPane.PLAIN_MESSAGE);
              playingDialog = pane.createDialog (null, "JMF Sound");
    playingDialog.pack();
              // get a player
              MediaLocator mediaLocator = new MediaLocator(soundFile.toURL());
              Player player =     Manager.createRealizedPlayer (mediaLocator);
    player.addControllerListener (this);
    player.prefetch();
    player.start();
    playingDialog.setVisible(true);
         // ControllerListener implementation
         public void controllerUpdate (ControllerEvent e) {
    System.out.println (e.getClass().getName());
         if (e instanceof EndOfMediaEvent) {
                   playingDialog.setVisible(false);
                   System.exit (0);
    Message was edited by:
    Monsieur_Max

  • 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

  • For the 10^6 time -- JMF on Fedora does not work!

    I've tried everything under the Sun (no pun intended), and I've seen many other people with this same problem, but no solution...
    (1) I installed the performance pack version of JMF 2.1.1 for Linux.
    (2) I modified my .bash_profile to read as follows...
    PATH=/usr/java/j2re1.4.2_06/bin:$PATH
    export PATH
    JAVA_HOME=/usr/java/j2re1.4.2_06
    export JAVA_HOME
    JMFHOME=/usr/java/JMF-2.1.1e
    CLASSPATH=$JMFHOME/lib/jmf.jar:.:${CLASSPATH}
    export JMFHOME CLASSPATH
    LD_LIBRARY_PATH=$JMFHOME/lib:${LD_LIBRARY_PATH}
    (3) Just to beat a dead horse, I even copied-pasted the following:
    /JMF-2.1.1e/lib/*.jar --> /usr/java/j2re1.4.2_06/lib/ext/
    /JMF-2.1.1e/lib/*.so --> /usr/java/j2re1.4.2_06/lib/i386/
    both *.jar and *.so --> /usr/mozilla/plugins/
    (4) But when I try running the online diagnostic applet
    http://java.sun.com/products/java-media/jmf/2.1.1/jmfdiagnostics.html
    I get the following:
    Java 1.1 compliant browser.....Maybe
    JMF classes.....Not Found
    and none of the sample JMF apps on the Sun website work.
    Any clues at all??? Does JMF not work on Fedora???
    I guess I'll just keep asking this question every few days until someone from Sun answers?
    Thanks anyways...

    Yes, I didn't make that clear (first thing in the morning). Even though the JMF Diagnostic applet doesn't work for me on RedHat 9.0 using the Java Plugin with JDK 1.4.2, JMF DOES work for me from the command line. It seems that the Java 1.4.2 Plugin isn't finding JMF on the path. For me, the Java 1.5 Plugin resolves this issue.
    Scott

  • Problem with using JMF audio over a network

    Hiya, I'm using IBM JMF code but I'm having problems trying to get it transmit data from the MediaTransmitter to the MediaPlayerFrame.
    I'm kinda new to JMF so I assume I'm missing something basis for why this doesn't work.
    Any help would be greatly appreciated.
    MediaPlayerFrame
    import javax.media.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    * An instance of the MediaPlayerFrame may be used to display any media
    * recognized * by JMF.  This is intended to be a very simple GUI example,
    * displaying all possible controls for the given media type.
    public class MediaPlayerFrame extends JFrame {
         * The frame title.
        private static final String FRAME_TITLE = "developerWorks JMF Tutorial " +
            "Media Player";
         * The panel title of the main control panel.
        private static final String CONTROL_PANEL_TITLE = "Control Panel";
        // location and size variables for the frame.
        private static final int LOC_X = 100;
        private static final int LOC_Y = 100;
        private static final int HEIGHT = 500;
        private static final int WIDTH = 500;
         private final static long serialVersionUID = 1;
         * The current player.
        private Player player = null;
         * The tabbed pane for displaying controls.
        private JTabbedPane tabPane = null;
         * Create an instance of the media frame.  No data will be displayed in the
         * frame until a player is set.
        public MediaPlayerFrame() {         
            super(FRAME_TITLE);
            System.out.println("MediaPlayerFrame");
            setLocation(LOC_X, LOC_Y);
            setSize(WIDTH, HEIGHT);
            tabPane = new JTabbedPane();
            getContentPane().add(tabPane);
            /* adds a window listener so that the player may be cleaned up before
               the frame actually closes.
            addWindowListener(new WindowAdapter() {
                                   * Invoked when the frame is being closed.
                                  public void windowClosing(WindowEvent e) {
                                      closeCurrentPlayer(); 
                                      /* Closing this frame will cause the entire
                                         application to exit.  When running this
                                         example as its own application, this is
                                         fine - but in general, a closing frame
                                         would not close the entire application. 
                                         If this behavior is not desired, comment
                                         out the following line:
                                      System.exit(0);
         * Creates the main panel.  This panel will contain the following if they
         * exist:
         * - The visual component: where any visual data is displayed, i.e. a
         * movie uses this control to display the video.
         * - The gain component:   where the gain/volume may be changed.  This
         * is often * contained in the control panel component (below.)
         * - The control panel component: time and some extra info regarding
         * the media.
        private JPanel createMainPanel() {
            System.out.println("createMainPanel");
            JPanel mainPanel = new JPanel();
            GridBagLayout gbl = new GridBagLayout();
            GridBagConstraints gbc = new GridBagConstraints();
            mainPanel.setLayout(gbl);
            boolean visualComponentExists = false;
            // if the visual component exists, add it to the newly created panel.
            if (player.getVisualComponent() != null) {
                visualComponentExists = true;
                gbc.gridx = 0;
                gbc.gridy = 0;
                gbc.weightx = 1;
                gbc.weighty = 1;
                gbc.fill = GridBagConstraints.BOTH;
                mainPanel.add(player.getVisualComponent(), gbc);
            // if the gain control component exists, add it to the new panel.
            if ((player.getGainControl() != null) &&
                (player.getGainControl().getControlComponent() != null)) {
                gbc.gridx = 1;
                gbc.gridy = 0;
                gbc.weightx = 0;
                gbc.weighty = 1;
                gbc.gridheight = 2;
                gbc.fill = GridBagConstraints.VERTICAL;
                mainPanel.add(player.getGainControl().getControlComponent(), gbc);
            // Add the control panel component if it exists (it should exists in
            // all cases.)
            if (player.getControlPanelComponent() != null) {
                gbc.gridx = 0;
                gbc.gridy = 1;
                gbc.weightx = 1;
                gbc.gridheight = 1;
                if (visualComponentExists) {
                    gbc.fill = GridBagConstraints.HORIZONTAL;
                    gbc.weighty = 0;
                } else {
                    gbc.fill = GridBagConstraints.BOTH;
                    gbc.weighty = 1;
                mainPanel.add(player.getControlPanelComponent(), gbc);
            return mainPanel;
         * Sets the media locator.  Setting this to a new value effectively
         * discards any Player which may have already existed.
         * @param locator the new MediaLocator object.
         * @throws IOException indicates an IO error in opening the media.
         * @throws NoPlayerException indicates no player was found for the
         * media type.
         * @throws CannotRealizeException indicates an error in realizing the
         * media file or stream.
        public void setMediaLocator(MediaLocator locator) throws IOException,
            NoPlayerException, CannotRealizeException {
              System.out.println("setMediaLocator: " +locator);
            // create a new player with the new locator.  This will effectively
            // stop and discard any current player.
            setPlayer(Manager.createRealizedPlayer(locator));       
         * Sets the player reference.  Setting this to a new value will discard
         * any Player which already exists.  It will also refresh the contents
         * of the pane with the components for the new player.  A null value will
         * stop the discard the current player and clear the contents of the
         * frame.
        public void setPlayer(Player newPlayer) {      
            System.out.println("setPlayer");
            // close the current player
            closeCurrentPlayer();          
            player = newPlayer;
            // refresh the tabbed pane.
            tabPane.removeAll();
            if (player == null) return;
            // add the new main panel
            tabPane.add(CONTROL_PANEL_TITLE, createMainPanel());
            // add any other controls which may exist in the player.  These
            // controls should already contain a name which is used in the
            // tabbed pane.
            Control[] controls = player.getControls();
            for (int i = 0; i < controls.length; i++) {
                if (controls.getControlComponent() != null) {
    tabPane.add(controls[i].getControlComponent());
    * Stops and closes the current player if one exists.
    private void closeCurrentPlayer() {
    if (player != null) {
    player.stop();
    player.close();
    * Prints a usage message to System.out for how to use this class
    * through the command line.
    public static void printUsage() {
    System.out.println("Usage: java MediaPlayerFrame mediaLocator");
    * Allows the user to run the class through the command line.
    * Only one argument is allowed, which is the media locator.
    public static void main(String[] args) {
    try {
    if (args.length == 1) {
    MediaPlayerFrame mpf = new MediaPlayerFrame();
    /* The following line creates a media locator using the String
    passed in through the command line. This version should
    be used when receiving media streamed over a network.
    mpf.setMediaLocator(new MediaLocator(args[0]));
    /* the following line may be used to create and set the media
    locator from a simple file name. This works fine when
    playing local media. To play media streamed over a
    network, you should use the previous setMediaLocator()
    line and comment this one out.
    //mpf.setMediaLocator(new MediaLocator(
    // new File(args[0]).toURL()));
    mpf.setVisible(true);
    } else {
    printUsage();
    } catch (Throwable t) {
    t.printStackTrace();
    MediaTransmitter
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.format.*;
    import java.io.IOException;
    import java.io.File;
    * Creates a new media transmitter.  The media transmitter may be used to
    * transmit a data source over a network.
    public class MediaTransmitter {
         * Output locator - this is the broadcast address for the media.
        private MediaLocator mediaLocator = null;
         * The data sink object used to broadcast the results from the processor
         * to the network.
        private DataSink dataSink = null;
         * The processor used to read the media from a local file, and produce an
         * output stream which will be handed to the data sink object for
         * broadcast.
        private Processor mediaProcessor = null;
         * The track formats used for all data sources in this transmitter.  It is
         * assumed that this transmitter will always be associated with the same
         * RTP stream format, so this is made static.
        private static final Format[] FORMATS = new Format[] {
            new AudioFormat(AudioFormat.MPEG_RTP)};
         * The content descriptor for this transmitter.  It is assumed that this
         * transmitter always handles the same type of RTP content, so this is
         * made static.
        private static final ContentDescriptor CONTENT_DESCRIPTOR =
            new ContentDescriptor(ContentDescriptor.RAW_RTP);
         * Creates a new transmitter with the given outbound locator.
        public MediaTransmitter(MediaLocator locator) {
            mediaLocator = locator;
         * Starts transmitting the media.
        public void startTransmitting() throws IOException {
            // start the processor
            mediaProcessor.start();
            // open and start the data sink
            dataSink.open();
            dataSink.start();
         * Stops transmitting the media.
        public void stopTransmitting() throws IOException {
            // stop and close the data sink
            dataSink.stop();
            dataSink.close();
            // stop and close the processor
            mediaProcessor.stop();
            mediaProcessor.close();
         * Sets the data source.  This is where the transmitter will get the media
         * to transmit.
        public void setDataSource(DataSource ds) throws IOException,
            NoProcessorException, CannotRealizeException, NoDataSinkException {
            /* Create the realized processor.  By calling the
               createRealizedProcessor() method on the manager, we are guaranteed
               that the processor is both configured and realized already. 
               For this reason, this method will block until both of these
               conditions are true.  In general, the processor is responsible
               for reading the file from a file and converting it to
               an RTP stream.
            mediaProcessor = Manager.createRealizedProcessor(
                new ProcessorModel(ds, FORMATS, CONTENT_DESCRIPTOR));
            /* Create the data sink.  The data sink is used to do the actual work
               of broadcasting the RTP data over a network.
            dataSink = Manager.createDataSink(mediaProcessor.getDataOutput(),
                                              mediaLocator);
         * Prints a usage message to System.out for how to use this class
         * through the command line.
        public static void printUsage() {
            System.out.println("Usage: java MediaTransmitter mediaLocator " +
                               "mediaFile");
            System.out.println("  example: java MediaTransmitter " +
                "rtp://192.168.1.72:49150/audio mysong.mp3");
            System.out.println("  example: java MediaTransmitter " +
                "rtp://192.168.1.255:49150/audio mysong.mp3");
         * Allows the user to run the class through the command line.
         * Only two arguments are allowed; these are the output media
         * locator and the mp3 audio file which will be broadcast
         * in the order.
        public static void main(String[] args) {
            try {
                if (args.length == 2) {
                    MediaLocator locator = new MediaLocator(args[0]);
                    MediaTransmitter transmitter = new MediaTransmitter(locator);
                    System.out.println("-> Created media locator: '" +
                                       locator + "'");
                    /* Creates and uses a file reference for the audio file,
                       if a url or any other reference is desired, then this
                       line needs to change.
                    File mediaFile = new File(args[1]);
                    DataSource source = Manager.createDataSource(
                        new MediaLocator(mediaFile.toURL()));
                    System.out.println("-> Created data source: '" +
                                       mediaFile.getAbsolutePath() + "'");
                    // set the data source.
                    transmitter.setDataSource(source);
                    System.out.println("-> Set the data source on the transmitter");
                    // start transmitting the file over the network.
                    transmitter.startTransmitting();
                    System.out.println("-> Transmitting...");
                    System.out.println("   Press the Enter key to exit");
                    // wait for the user to press Enter to proceed and exit.
                    System.in.read();
                    System.out.println("-> Exiting");
                    transmitter.stopTransmitting();
                } else {
                    printUsage();
            } catch (Throwable t) {
                t.printStackTrace();
            System.exit(0);

    Okay, here's the it copied out.
    Media Transmitter
    C:\John\Masters Project\Java\jmf1\MediaPlayer>java MediaTransmitter rtp://127.0.
    0.1:2000/audio it-came-upon.mp3
    -> Created media locator: 'rtp://127.0.0.1:2000/audio'
    -> Created data source: 'C:\John\Masters Project\Java\jmf1\MediaPlayer\it-came-u
    pon.mp3'
    streams is [Lcom.sun.media.multiplexer.RawBufferMux$RawBufferSourceStream;@1decd
    ec : 1
    sink: setOutputLocator rtp://127.0.0.1:2000/audio
    -> Set the data source on the transmitter
    -> Transmitting...
       Press the Enter key to exit
    MediaPlayerFrame
    C:\John\Masters Project\Java\jmf1\MediaPlayer>java MediaPlayerFrame rtp://127.0.
    0.1:2000/audio
    MediaPlayerFrame
    setMediaLocator: rtp://127.0.0.1:2000/audioAs I said, it just kinda stops there, what it should be doing is opening the MediaPlayer.
    "MediaPlayerFrame" and "setMediaLocator: rtp://127.0.0.1:2000/audio" are just print outs I used to track here the code is getting to.

  • How to edit a stream captured live in jmf?

    hi everybody.
    i want to know how can i edit an audio stream that is being captured live from a microphone. i have looked at Cut.java from jmf solutions. it is taking a file to cut and then write the updated file to another file. when i have tried to modify it by making the program take the input as captured audio, the program is not working! and am not able to hear the output file as well!
    can anyone help me please?
    a
    i have also tried to implement a BufferTransferHandler but my program is still not working! please help!!!

    i was wondering is there a way in jmf to let the capture device capture for some random time and stop, then restart capturing again and stop again..meaning to continue repeat this pattern.. because i want to implement packet losses in jmf .
    previously i was trying to capture a continuous stream of audio and then try to select randomly from the buffer to send this over a network.but that is not working! so am trying to select from the start itself. tell me is it possible to control capture from the microphone in a random fashion as explained above? thankssss a lot ..reply soon!!

  • Error installing jmf-2_1_1e-linux-i586.bin

    h3. Hello,
    h3.
    I'm trying to install jmf-2_1_1e-linux-i586.bin on a Linux(centos 5.1) system. I get the results at the end of this post after accepting the license agreement. I haven't found anything on the web or the bug database that has been helpful. I'm really at my wits end and could use a helping hand.
    h3.
    Thanks in advance.
    Do you agree to the above license terms? [yes or no]
    y
    Permit recording from an applet? (see readme.html) [yes or no]
    y
    Permit writing local files from an applet? (recommend no, see readme.html) [yes or no]
    n
    Unpacking...
    tail: cannot open `+309' for reading: No such file or directory
    Extracting...
    ./install.sfx.3639: line 1: ==: No such file or directory
    ./install.sfx.3639: line 3: syntax error neUQU599&ugrave;;&middot;&middot;&middot;&yuml;r&thorn;&Ntilde;&Ntilde;&Ntilde;&cent;_&Acirc;&ograve;&laquo;KK)C{<>&uacute;&uacute;<<&iquest;&egrave;
    QQRL&Ugrave;&Uuml;&Igrave;L&Aring;^sfx.36 88&oslash;$&egrave;&aring;&otilde;&Otilde;&reg;&cent;&not;,&agrave;&ouml;&egrave;&acute;i&Ntilde;&shy;&Ograve;&Ograve;&Ograve;V~&aacute;mn.&agrave;7w^&Yacute;&Acirc;&AElig;,;M&cent;`&THORN;&ograve;A$D&uml;&reg;&uml;&uml; @    &Eacute;&ordm;&Icirc;wA'
    --root@localhost lib--# PuTTYEdited by: eran_cantor on Jul 17, 2008 2:01 PM
    Edited by: eran_cantor on Jul 17, 2008 2:02 PM
    Edited by: eran_cantor on Jul 17, 2008 2:03 PM

    Hey Eran,
    I guess, you can find the solution to your problem here:
    [http://forum.ubuntuusers.de/topic/jmf-java-media-framework/#post-1806940]
    It works well on Ubuntu, but since the error on Ubuntu looks exactly the same as on Centos, I think it should work for you as well.
    Cheers,
    Georg

  • Testing - JMF compatible media files

    A number of people have asked after media files to check JMF based media projects.
    Here is a small selection of videos that have all been tested and seen to run in the Performance Pack version of JMStudio. At the moment it includes 2 MOVs and 2 MPEGs. None of them have a soundtrack - it is just video.
    [http://www.esnips.com/web/jmfvideo/]
    Notes:
    These animations are provided for software testing only. They are not available for redistribution, or any other use, without the author's written permission.
    The raw video files were wrapped up as Zip files in order to prevent automatic conversion to another format (for which I have no player on this machine - and which is sure not 'JMF compatible').
    If anybody knows a file upload site that will not mess with the file types, and better still, will provide a constant and direct URL (no 'click thru' rubbish) where it can even be pulled direct by a Java app., let me know.
    Edit 1:
    Added '10 dukes' - up for whoever can provide the first link to a 'file site' as described above.
    Edited by: AndrewThompson64 on May 21, 2008 10:13 AM

    Avi's and mpg's are pretty safe.  Wmv's and .mov's won't sync.
    Wyrenut
    Post relates to: Centro (AT&T)
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

Maybe you are looking for

  • Xml publisher graph is not displaying

    Hi All, I have created xml report which is having graph .It display through oracle apps(conc pgrm ) properly in test instance but after moving to production graph is not displaying .for that i have checked Xserver setup also everything is working fin

  • Audio not working on macbook with Garageband

    The audio works with itunes and even the keyboard piano feature in Garageband but I cannot get audio to work with any garageband tracks. Any ideas?

  • Can we attend the exam at local centres without attending Teched @ Blore?

    HI All, I need yur help urgently. I have registered for SAP certification exam. But I think i may not be able to travel to Banglore for the tech ed sessions. So is it possible that i take the exam at local centres in Pune ( as mentioned at Teched sit

  • Component Pick Release

    Hello, Is ther a API available to perform a WIP Component Pick release. I know there is a FORM and SRS available thru the application, but is there a public API available? TIA Amit

  • IPhone user in /local/Default

    I just noticed, by chance that on my server that in running OD, a new user in the /local/Default directory has turned up. I would like to say it was never there before, but one can never say never. It is a user ID of 213, short name of _usbmuxd has a