Mp3 with JMF?

Is there somebody who has written an programm with the JMF? Can you give me a source code Example, to learn hoe to play mp3's with java.
Thank you
Thomas

http://www.google.com/search?hl=en&q=java+jmf+mp3
Knock yourself out

Similar Messages

  • Recording (encoding) MP3 with JMF

    Hi all,
    I'm not sure to be the first one, but I ask anyway.
    Does anybody out there have a solution how to record (encode) MP3 with only using JMF.
    Your help will be highly appreciated !!!!!!
    Kind regards
    aro

    I havent installed that plugin but i can decode (play) mp3 files with jmf.
    So, i suppose it was for encoding.
    If anyone has proved the plugin... ?
    Anyway you can use fobs project or jffmpeg.

  • Need Help Mp3 with jmf?

    Can somebody write a few lines of code that i can play an *.mp3 file with the jmf (with an application). I visited the Jmf HP but i can't find some examples about this problem.
    Please help me rapidly
    Thank you
    Thomas R.

    It's been a while, but I think I still remember:
    To play any media with the JMF you must obtain a Player object for the file containing the media. This is done by invoking the static createPlayer method of the Manager class. The only import you should need is javax.media.*;
    example:
    File f = new File("myMP3File.mp3");
    Player p = Manager.createPlayer(f);This will return to you a Player object, which has start and stop methods to start and stop playing the media, obviously.
    The JMF is pretty limited w.r.t. mp3 playback unless you delve deep into the API, and get the GUI component for the player, but I can't remember the code for doing that, and anyway, playing mp3s with the JMF is pretty poor at the moment, because it is so slow to start the songs. Who knows, maybe when computers get fast enough, java may actually perform reasonably in this area.
    Hope this helps.

  • Play movie with JMF

    Hey,
    I just started out with JMF (I wanted to play a movie with java).
    I got this code:
    import java.applet.*;
    import java.awt.*;
    import javax.swing.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.media.*;
    * Demonstrate simple code to play a movie with Java Media Framework.
    * @author Ian F. Darwin, http://www.darwinsys.com/
    * @version $Id: JMFPlayer.java,v 1.9 2004/02/09 03:21:20 ian Exp $
    public class NewJApplet extends JPanel implements ControllerListener {
        /** The player object */
        Player thePlayer = null;
        /** The parent Frame we are in. */
        JFrame parentFrame = null;
        /** Our contentpane */
        Container cp;
        /** The visual component (if any) */
        Component visualComponent = null;
        /** The default control component (if any) */
        Component controlComponent = null;
        /** The name of this instance's media file. */
        String mediaName;
        /** The URL representing this media file. */
        URL theURL;
        /** Construct the player object and the GUI. */
        public NewJApplet(JFrame pf, String media) {
            parentFrame = pf;
            mediaName = media;
            // cp = getContentPane();
            cp = this;
            cp.setLayout(new BorderLayout());
            try {
                theURL = new URL(getClass().getResource("."), mediaName);
                thePlayer = Manager.createPlayer(theURL);
                thePlayer.addControllerListener(this);
            } catch (MalformedURLException e) {
                System.err.println("JMF URL creation error: " + e);
            } catch (Exception e) {
                System.err.println("JMF Player creation error: " + e);
                return;
            System.out.println("theURL = " + theURL);
            // Start the player: this will notify our ControllerListener.
            thePlayer.start(); // start playing
        /** Called to stop the audio, as from a Stop button or menuitem */
        public void stop() {
            if (thePlayer == null) {
                return;
            thePlayer.stop(); // stop playing!
            thePlayer.deallocate(); // free system resources
        /** Called when we are really finished (as from an Exit button). */
        public void destroy() {
            if (thePlayer == null) {
                return;
            thePlayer.close();
        /** Called by JMF when the Player has something to tell us about. */
        public synchronized void controllerUpdate(ControllerEvent event) {
            // System.out.println("controllerUpdate(" + event + ")");
            if (event instanceof RealizeCompleteEvent) {
                if ((visualComponent = thePlayer.getVisualComponent()) != null) {
                    cp.add(BorderLayout.CENTER, visualComponent);
                if ((controlComponent = thePlayer.getControlPanelComponent()) != null) {
                    cp.add(BorderLayout.SOUTH, controlComponent);
                // re-size the main window
                if (parentFrame != null) {
                    parentFrame.pack();
                    parentFrame.setTitle(mediaName);
        public static void main(String[] argv) {
            JFrame f = new JFrame("JMF Player Demo");
            Container frameCP = f.getContentPane();
            NewJApplet p = new NewJApplet(f,
                    argv.length == 0 ? "file:/C:/Users/Patrick Kos/Pictures/BAA.avi"
                    : argv[0]);
            frameCP.add(BorderLayout.CENTER, p);
            f.setSize(200, 200);
            f.setVisible(true);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }but I always get a unable to handle format exception, expect with mp3 files.
    But i"ve looked up the supported formats and its says its supported so??

    i get this error
    Unable to handle format: XVID, 320x240, FrameRate=29.9, Length=230400 0 extra bytes
      Unable to handle format: unknown, 22050.0 Hz, 0-bit, Stereo, Unsigned, 8000.0 frame rate, FrameSize=9216 bits
    Failed to realize: com.sun.media.PlaybackEngine@7259da
    Error: Unable to realize com.sun.media.PlaybackEngine@7259da
    Exception in thread "main" javax.media.CannotRealizeException
            at javax.media.Manager.blockingCall(Manager.java:2005)
            at javax.media.Manager.createRealizedPlayer(Manager.java:580)
            at projectnemo.NewJApplet.main(NewJApplet.java:102)

  • How do i convert a voice memo into MP3 with itunes 12?

    I need to convert a voice memo into MP3 with itunes 12.

    Today, I emailed myself an .m4a voice recording from an Android smartphone that had created that sound file minutes earlier.
    After opening that email message, I saved the .m4a sound file (a whopping 352 KB) to my Mac (iMac 21.5 inch running Yosemite).
    Clicking on the sound file's icon launched iTunes (version 12.0.1.26), which then did nothing no matter what I tried.
    However, when I selected the file on the desktop and navigated to the Finder/File/Open With dropdown window, a dialog box opened with alternative applications to use for opening the sound file. The available applications shown were VLC, QuickTime Player, Flip Player, and RealPlayer. I was pleased to find that VLC, QuickTime, Flip Player, and RealPlayer each opened and played the file straightforwardly and flawlessly.
    Apparently, Flip Player Pro (which I do not own) has a "save as" feature that might help you convert the file to the format you desire.

  • How to use ffmpeg with jmf

    I am trying to use ffmpeg with jmf. Do any one have any idea how to do it.

    Get binary distro and follow Manual Installation section of http://fobs.sourceforge.net/f4jmf_first.html

  • FSM with JMF 2.1.1(a) and one more problem. !! URGENT

    Good AfterNoon All...
    I am working on JMF 2.1.1 and I want to show a .avi file in fullScreenMode.
    How can i do so with jdk 1.4.
    I have gotten viewComponent and control comp.
    My application is running sucessfully. NO PROBLEM.
    But i want to show the movie in FSM . In order to do so, what i am doing is , I remove view
    Comp from my JFrame (in which whole of the process is going on.) .
    Add that viewComp in fullScreenWindow (which is initilized Window with parent frame.).
    But here some problem is there. According to me, it is painting problem.
    viewComp is removed successfully from frame but not added in window.
    Layout of window is border and i am adding viewComp in center of window.
    Running movie is not visible in Window. WHY ? what could be the possible reason.
    Is it possible or It can't happen. ?
    One thing more.... HUH...
    I have a menubar in frame with file and tool menus.
    when player initilized and movie starts running . You know what happens.
    Clicking on menu(s) doesnot cause menuitem(s) to visible or pull down. ?? Oh ! GOD.
    viewComp is at center and controlComp is at South.
    When i click on say fileMenu. file Menu pressed as always happens with swing's color but menuitems donot visible.
    WHY ?
    It seems that menuitems are visible ....hamam.ma...mmm I mean they are hided by viewComp.
    how to get ride of this problem. ?
    Any idea is highly appreciated.
    And it is nice working with JMF.

    Nobody .... ??
    I have found the answer of my 2nd question but still first is creating problem.
    Does anyone know it.. how to do it..
    Full Screen Mode in JFM.
    Thanks
    Sanjeev Dhiman

  • How to hint movie with JMF

    Hello,
    I would like to know how to make hinted movies with JMf, but no One seem to talk about this in forums...
    Any idea ?

    Get binary distro and follow Manual Installation section of http://fobs.sourceforge.net/f4jmf_first.html

  • 5800 shows wrong track length for MP3s with VBR

    I have a Nokia 5800 "XpressMusic" with the current firmware 20.0.012.
    Yesterday I converted some CDs using Nokias Music Software (shipping with the mobile).
    I converted the CDs to MP3 with VBR 256KB/s.
    When i play them on the 5800 a song with i.e. 3:50min length shows about 14:05min length.
    When i try to scroll forward i can only do that in the first few mm up to where 3:50 would be. If i go beside that border it jumps to the end and skips the title.
    Shouldn't a mobile with the name "XpressMusic" be able to display the real track length of a MP3 with VBR???

    Duplicate post.
    Jason

  • Create file mp3 with other partial mp3

    Hello, can i create a file mp3 from other file mp3 loaded in
    AIR? i want create a new file mp3 with 30 only 30 seconds of file
    loaded...

    I don't think this is possible in 1.5. I've heard from an
    Adobe rep that mp3 creation is "under consideration for a future
    release".
    Go request the feature, mabye it'll make the next
    release.

  • HOW DOES ONE ACCESS / OPEN INSERTED SD CARD CONTAINING MP3s WITH ITUNES?

    Hello,
    How does one access / open an inserted SD card containing MP3s with ITUNES?
    Thanks
    < Edited by Host >

    File > Add Folder {or File} to library.

  • RTP (UDP) multicast stream with JMF...?!

    Hi.
    I am quiet new in the material of jmf and its plugins. I have a network which offers me an UDP stream (mpeg2 or mpeg4 both could be available). I can watch this stream with an freewareplayer called VLC.
    When using the JMF Studio tool, I can't watch the stream ... The Player is waiting for signals and breaks after 60 seconds. So, okay ... Maybe the JMF doesn't bring the right codec with it.
    Now I've installed jffmpeg, but that doesn't help a lot. I write done the JAR File in Classpath and installed the Plugin, MimeType and Demultiplexer (as described) in the JMF Registry. The behaviour of JMF Studio is the same. Does anybody have an idea wether jffmpeg supports this kind of streaming
    and/or what I can do to get the stream?! Maybe there is an better Plugin for my solution.
    I can't suppose that nobody here ever tried to get an Mpeg2 or Mpeg4 multicast stream with JMF. There must be an solution.
    Many thanks for your help and reply!
    Jan Stanetzki

    Hi funnyjanni,
    May be I am writing this after 4 years.
    I am also in the stage when you faced the same problem. You might have found the solution to this.
    Please help me on this. I am trying to use jffmpeg to play UDP mutlicast stream.
    Thanks
    jklanka

  • How to create a Macromedia's Flash Java Player with JMF?

    How to create a Macromedia's Flash Java Player with JMF? Can you give me an example? My email:[email protected] [email protected]

    Yes, there is a way. Look up JTree in the API.-can you post some code.... i cant figure out on how to use JTree...
    i'm still confused on where will i get the entire directories of my drives...
    thanks

  • Play sdp file with JMF

    Hi,
    I have a Darwin Streaming Server(DSS) running on a machine, that reflects several broadcasts from other machines (I'm broadcasting to the DSS with JMF).
    I can see all the videos and audio without any problem with Quick Time, but I can't find a way to play the sdp files with jmf. I've searched the web for jmf and sdp, and there isn't much information, i've also tried to play with JMStudio..no luck. In the JMF solution there aren't any samples for SDP files....
    If I can't find a way to do it, I'll use Quick Qime 4 Java, the only problem is that there isn't a linux implementation :(
    Thanks in advance.
    Best regards,
    ANeto

    Hi,
    I have read all the mails on the JMF interest group regarding the Broadcaster and DSS.
    Well i too am trying to do a similar application. This is an Application
    Casting program basically to share my desktop with the other person sitting
    across the network using my client. And in order to multicast this, i am
    looking at using Darwin Streamng Server.
    The whole idea here is that i break the desktop image up into frames and
    then compress them and then send it over, protocol used here is TCP/RTP/UDP.
    I am trying to hit this stream of packets to DSS so that it can be accessed
    else where over the internet. I'm trying to under stand the basic
    authentication mechanism DSS uses, so that i can create the .sdp file and
    transfer it over to the DSS, which can further be accessed by any client
    that can understands sdp.
    As i read in the mail some of you were able to create the .sdp file with your custom built boradcaster and send it to DSS if i am not wrong.
    I have tried this with Mpegable Broad caster as you said.
    Now the problem i had was to create .sdp file with my application and push it to the DSS.
    So have you made some kind of a documentation or can you give me an idea as
    to how i can go about this. Or it will be even better if you can share the code with me.

  • Can I do this with JMF?

    hi,I am new to JMF
    I am doing a door bell system project.
    At the front of the entrance we have a micphone and webcam,when the vistor come to the door and "knock at" a staff's bell,
    1: I wanna show the staff who sits in his office who is the vistor. (He might use any kind of operating system,not just windows)
    2. if the staff is away I wanna to give the visitor an oppotunity to record down a voice message and when the staff come back he can retrieve the voice message.
    can I achieve all these functions with JMF?
    thanks!

    hi,I am new to JMF
    I am doing a door bell system project.
    At the front of the entrance we have a micphone and webcam,when the vistor come to the door and "knock at" a staff's bell,
    1: I wanna show the staff who sits in his office who is the vistor. (He might use any kind of operating system,not just windows)
    2. if the staff is away I wanna to give the visitor an oppotunity to record down a voice message and when the staff come back he can retrieve the voice message.
    can I achieve all these functions with JMF?
    thanks!

Maybe you are looking for

  • Can not open Adobe Bridge in Photoshop CS2

    Adobe Bride is supposed to be included with Photoshop CS2, but there are no links to it when in Photoshop.  File>Browse does not go to Bridge.   I downloaded a new copy of Bridge from Adobe and installed it.  There is still no link to Bridge in Photo

  • Memory question on Arch x86_64. 2x2048 MB = 3950 MB?

    I have a naive memory question for some knowledgeable folks.  My machine has 2x2 Gb sticks which should total to 4096.  When I do a free -m under Arch, it's only showing 3950.  Is the remaining 146 reserved or..? $ free -m total used free shared buff

  • Download error under apps. After following download steps multiple times still showing error message.

    Download error under apps. After following download steps multiple times still showing error message.

  • Abap Program Check

    hi all, i need to do the following checks in any report program 1. how to check a parameter starting with p_ or not ?  2. how to check a data variable starting with v_ or not  ? 3. how to giv identification to the user if he had used any comments in

  • JTextPane to xml

    Hi! I have a question, how to write the text and pictures from a JTextPane into a XML document?! I can save the text and pictures from the JTextPane into a document but it not works with XML document: private void doSave(File file) { FileOutputStream