3gp in JMF

Hi friends
i am controling a webcam using a mobile phone so after recording a video from a webcam using JMF i want to convert it to 3gp so that i can play it on Mobile phone.
In jmf i get movie as a AVI file .Is there a way to get 3gp file from JMF or else any one knows how can i conver AVI to 3gp
If any one knows please help me out

hi, i download Fobs4jmf and it can play back 3gp files (using JMFStudio). However when I try to convert a mov file to 3gp it said 'Failed to create a DataSink...'. Anyone has success in transcoding video to 3gp types?

Similar Messages

  • Play .3gp-files with JMF (jffmpeg)

    Hello,
    for a MMS-Application I'm trying to show 3gp-files with Java. I heard that it should work with jffmpeg but I still couldn't get it to work.
    I added the Codec:
    String JFFMPEG_VIDEO = "net.sourceforge.jffmpeg.VideoDecoder";
    try {
        Codec video = (Codec) Class.forName(JFFMPEG_VIDEO).newInstance();
        PlugInManager.addPlugIn(JFFMPEG_VIDEO,
                video.getSupportedInputFormats(),
                video.getSupportedOutputFormats(null),
                PlugInManager.CODEC);
    } catch (Exception e) {
        e.printStackTrace();
    }and then started the player.
    It already works for mpg-Videos, but if the file-extension is .3gp the player throws a javax.media.NoPlayerException: Cannot find a Player for : file://C:/test.3gp
    When I change the file-name to test.mpg the player initializes but doen't show a picture.
    How can I register the 3gp-extension? Or is anything else missing?
    Thanks in advance for any hint :-)

    I still didn't get it to work as I need it, but I made some progress so far:
    Instead of jffmpeg I used the FOBS for JMF Package (http://fobs.sourceforge.net/index.html) in addition with the JMF.
    Using this package allows you to play a 3gp-Video in Swing that is stored in your filesystem (!).
    I'm still having two problems with this solution:
    - I use a Java Webstart-framework and can't acces the user's harddisk, so I need to play the 3gp-Videos directly from memory (they are stored as byte[] in a database), but the current version of FOBS is limited to 3gp-Playback only from filesystem.
    - Each user of the application has to download and install JMF and FOBS for their OS (system-specific libraries). Especially FOBS is not always very easy to install, because it needs to change some of the jmf.properites. This can not be done with the JAR-distribution-System of WebStart and I'm expecting problems, when the users try to install both packages on their own.
    If you are developing a plain Swing-Application you might be satisfied with the possibilities of FOBS and JMF.
    Good luck :-)

  • Splitting 3gp file in JMF

    I want to split a .3gp video into 2 separate .3gp file using java. so is it possible to do so? the .3gp file structure will also be a great help. i searched in google but did not find any suitable specification. thus if any one help, it would be great......

    please help me in this .... i am really stuck. i cant find any code to split 3gp file neither i can get any file format specification , byte wise....
    so please help ...

  • Conversion of various files formats to 3gp

    Hi,
    I am working on acode whic has a requirement to convert files from various formats (mov,mp4,avi,rm,flv) to 3gp and wma, wav, ra to mp3.
    1)Will JMF support all these conversion basically want to know about the 3gp support by the JMF framework.
    2)The code is supposed to be on the server side.Which would be a better in performance 1)insatlling native convertors like FFMPEG and calling command line calls from Java cod or 2)Using JMF
    Thank in Advance
    Regards,
    Vineeth

    See this link:
    http://www.jsresources.org/examples/audio_conversion.html

  • Transcoding int 3gp and mp4 format

    Hi all,
    Is it possible to transcode a given video format to 3gp or mp4 format in java,preferably using jmf.

    There is more to a video file then it's extension, lots of codecs out there. I'd like to see native support for more codecs but until that happened. Use a program to convert the videos to MP4.
    A great program to do this is which also happens to be free and one of the best programs for conversion is HandBrake. Some advantages, videos play amazing when converted to the native format. If you want you can also scale the video to match the resolution of the phone (800x480) which will produce smaller file allowing you to store more videos on your phone.
    You can download it here.
    http://handbrake.fr/

  • JMF sending video in HTC Dream

    Hi,
    I am new to JMF. I am able to send video file successfully from PC to PC using the sample source code at JMF website with ease.
    However i am having difficulty transferring Video file from HTC Dream android to my PC. it jumped out of the try-catch without exception at
    MediaLocator locator = new MediaLocator("file://sdcard/aa.3gp");
    ds = Manager.createDataSource(locator); <--- error happened here!
    My media file is aa.3gp and is stored in my Android phone's sdcard.
    Anyone can help ?
    Warmest Regards
    Whitetaru

    Hi,
    Thanks for the great information, However, even if i changed the aa.3gp to another file .mov. It still gives the same error.
    The path /sdcard/<myfile> is correct as i have written other program to save movie file into the sdcard. I've been scratching my head for a few days, just no idea how to resolve this error. Think getting bald soon :)
    Well, wonder if the below debug message would be helpful: The error should be after "WARN/ActivityManager(65)"....
    09-16 13:36:07.314: INFO/StubService(1111): into handleInternalConn!!! isNetworkConnected:true
    09-16 13:36:07.314: INFO/StubService(1111): username not null:falsepassword not null:false
    09-16 13:36:37.964: WARN/AudioFlinger(37): write blocked for 127 msecs
    09-16 13:36:42.394: WARN/InputManagerService(65): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@437b3da8
    09-16 13:36:43.164: INFO/jdwp(65): received file descriptor 103 from ADB
    09-16 13:36:43.184: INFO/jdwp(100): received file descriptor 11 from ADB
    09-16 13:36:43.194: INFO/jdwp(102): received file descriptor 51 from ADB
    09-16 13:36:43.204: INFO/jdwp(145): received file descriptor 59 from ADB
    09-16 13:36:43.224: INFO/jdwp(277): received file descriptor 31 from ADB
    09-16 13:36:43.234: INFO/jdwp(999): received file descriptor 24 from ADB
    09-16 13:36:43.244: INFO/jdwp(1008): received file descriptor 25 from ADB
    09-16 13:36:43.254: INFO/jdwp(1111): received file descriptor 24 from ADB
    09-16 13:36:43.264: INFO/jdwp(1182): received file descriptor 33 from ADB
    09-16 13:36:43.284: INFO/jdwp(1237): received file descriptor 32 from ADB
    09-16 13:36:43.294: INFO/jdwp(1285): received file descriptor 24 from ADB
    09-16 13:37:11.064: INFO/jdwp(1330): received file descriptor 23 from ADB
    09-16 13:37:16.474: INFO/PackageManager(65): Removing non-system package:com.pandvt
    09-16 13:37:16.974: INFO/PackageManager(65): /data/app/vmdl37043.tmp changed; unpacking
    09-16 13:37:24.754: INFO/installd(39): move /data/dalvik-cache/data@[email protected]@classes.dex -> /data/dalvik-cache/data@[email protected]@classes.dex
    09-16 13:37:25.204: INFO/dalvikvm(1330): Debugger has detached; object registry had 1 entries
    09-16 13:37:26.084: INFO/ActivityManager(65): Start proc com.android.voicedialer for broadcast com.android.voicedialer/.VoiceDialerReceiver: pid=1340 uid=10004 gids={3002}
    09-16 13:37:26.104: WARN/ResourceType(65): No package identifier when getting value for resource number 0x7f060001
    09-16 13:37:26.194: INFO/jdwp(1340): received file descriptor 11 from ADB
    09-16 13:37:26.264: WARN/ResourceType(65): No package identifier when getting value for resource number 0x7f060001
    09-16 13:37:27.944: INFO/ActivityManager(65): Stopping service: com.android.vending/.PackageMonitorReceiver$UpdateCheckinDatabaseService
    09-16 13:37:30.144: INFO/CheckinService(65): Checkin triggered: Intent { action=android.server.checkin.CHECKIN (has extras) }, market only = true
    09-16 13:37:30.164: INFO/CheckinService(65): Checkin triggered: Intent { action=android.server.checkin.CHECKIN (has extras) }, market only = true
    09-16 13:37:30.524: INFO/CheckinService(65): Sending checkin request (1916 bytes)...
    09-16 13:37:30.574: INFO/CheckinService(65): Sending checkin request (1916 bytes)...
    09-16 13:37:30.644: INFO/jdwp(1348): received file descriptor 23 from ADB
    09-16 13:37:31.394: INFO/ActivityManager(65): Starting activity: Intent { flags=0x10000000 comp={com.pandvt/com.pandvt.pandvt} }
    09-16 13:37:31.454: INFO/dalvikvm(1348): Debugger has detached; object registry had 1 entries
    09-16 13:37:31.564: INFO/ActivityManager(65): Start proc com.pandvt for activity com.pandvt/.pandvt: pid=1357 uid=10057 gids={1006}
    09-16 13:37:31.624: INFO/jdwp(1357): received file descriptor 11 from ADB
    09-16 13:37:31.754: WARN/ActivityThread(1357): Application com.pandvt is waiting for the debugger on port 8100...
    09-16 13:37:31.774: INFO/System.out(1357): Sending WAIT chunk
    09-16 13:37:31.944: INFO/dalvikvm(1357): Debugger is active
    09-16 13:37:32.034: INFO/System.out(1357): Debugger has connected
    09-16 13:37:32.064: INFO/System.out(1357): waiting for debugger to settle...
    09-16 13:37:32.264: INFO/System.out(1357): waiting for debugger to settle...
    09-16 13:37:32.464: INFO/System.out(1357): waiting for debugger to settle...
    09-16 13:37:32.664: INFO/System.out(1357): waiting for debugger to settle...
    09-16 13:37:32.864: INFO/System.out(1357): waiting for debugger to settle...
    09-16 13:37:33.064: INFO/System.out(1357): waiting for debugger to settle...
    09-16 13:37:33.274: INFO/System.out(1357): waiting for debugger to settle...
    09-16 13:37:33.474: INFO/System.out(1357): waiting for debugger to settle...
    09-16 13:37:33.674: INFO/System.out(1357): waiting for debugger to settle...
    09-16 13:37:33.874: INFO/System.out(1357): debugger has settled (1409)
    09-16 13:37:41.444: WARN/ActivityManager(65): Launch timeout has expired, giving up wake lock!
    09-16 13:37:41.894: WARN/ActivityManager(65): Activity idle timeout for HistoryRecord{43537058 {com.pandvt/com.pandvt.pandvt}}
    09-16 13:37:42.954: WARN/ActivityManager(65): Activity pause timeout for HistoryRecord{43537058 {com.pandvt/com.pandvt.pandvt}}
    09-16 13:37:43.544: INFO/CheckinService(65): From server: Intent { action=android.server.checkin.FOTA_CANCEL }
    09-16 13:37:43.654: INFO/CheckinService(65): From server: Intent { action=android.server.checkin.FOTA_CANCEL }
    09-16 13:38:17.264: WARN/dalvikvm(1357): VFY: unable to resolve static field 1660 (PROPERTY) in Lcom/ms/security/PermissionID;
    09-16 13:38:17.264: WARN/dalvikvm(1357): VFY: rejecting opcode 0x62 at 0x012e
    09-16 13:38:17.264: WARN/dalvikvm(1357): VFY: rejected Lcom/sun/media/util/Registry;.<clinit> ()V
    09-16 13:38:17.264: WARN/dalvikvm(1357): Verifier rejected class Lcom/sun/media/util/Registry;
    09-16 13:38:17.304: WARN/dalvikvm(1357): Exception Ljava/lang/VerifyError; thrown during Ljavax/media/pm/PackageManager;.<clinit>
    09-16 13:38:17.324: WARN/dalvikvm(1357): Exception Ljava/lang/ExceptionInInitializerError; thrown during Ljavax/media/PackageManager;.<clinit>

  • 3gp file

    Actually the JMF does not support 3gp files. Is the support of this type of file planned?
    If no, can somebody say me which would be the process to implement it into JMF ?
    - first develop one demultiplexer?
    - develop a AMR codec?
    - use the h.263 codec?
    Please, help me.
    Very thanks!
    Marc

    Hi Marc,
    we also do things with 3gp files...
    for now we use ffmpeg to, but I am also looking at the possibilty of using JMF. As far as I know the 3gp file format IS the mp4 file format which is based on the Quicktime mov format. In ffmpeg it is (using -f mov) to decode 3gp files by treating them like quicktime files.
    Actually the JMF does not support 3gp files. Is the
    support of this type of file planned? I wish it would be so - but as mobile phones with video support will become more popular the demand for software capable of handling this format will increase
    If no, can somebody say me which would be the process
    to implement it into JMF ?
    - first develop one demultiplexer?since the quicktime demultiplexer (mov.c) of ffmpeg can handle 3gp files, it should be (maybe) possible with JMF�s quicktime demultiplexer...
    - develop a AMR codec?you would need to do that... a reference C implementation of the AMR codec is available for download on the 3gpp homepage.
    - use the h.263 codec?3gp files can contain h.263 or MPEG-4 video streams...

  • 3GP Encoding

    Hi ALL,
    I wanna encode AVI to 3GP. I know about jffmpeg but i dont know it can do this. Is there 3rd party codec available for JMF for 3GP encoding.
    Regards,
    Adil Fazal

    Assuming you can play them with sound (you did not say), try MPEG Streamclip (free) which has a good and quite fast to 3GP encoder setting and all the ones I've done work swimmingly.

  • Play rtpdump files with jmf

    hello,
    I am trying to play a file created with rtpdump (or etheral) directly with jmf. I don�t know, how to create valid datasource and processor objects for a file with stored rtp-packets. Is there a possibility? Do I have to write an own demultiplexer f�r this rtp-dump format? Especially this RTP packets uses the H.263 format.
    Maybe there exists a code fragment for this problem.
    thanks a lot for your help

    I still didn't get it to work as I need it, but I made some progress so far:
    Instead of jffmpeg I used the FOBS for JMF Package (http://fobs.sourceforge.net/index.html) in addition with the JMF.
    Using this package allows you to play a 3gp-Video in Swing that is stored in your filesystem (!).
    I'm still having two problems with this solution:
    - I use a Java Webstart-framework and can't acces the user's harddisk, so I need to play the 3gp-Videos directly from memory (they are stored as byte[] in a database), but the current version of FOBS is limited to 3gp-Playback only from filesystem.
    - Each user of the application has to download and install JMF and FOBS for their OS (system-specific libraries). Especially FOBS is not always very easy to install, because it needs to change some of the jmf.properites. This can not be done with the JAR-distribution-System of WebStart and I'm expecting problems, when the users try to install both packages on their own.
    If you are developing a plain Swing-Application you might be satisfied with the possibilities of FOBS and JMF.
    Good luck :-)

  • 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

Maybe you are looking for

  • WRT45G: can only connect one pc at the time to internet, cannot login to router setup

    Hello, I don't get this. The complete network worked fine for ... years? After a call with the ISP about a general/different issue, we can now only connect one pc at the time to internet. (We were asked to take out cables and we've put them back). I'

  • SSRS 2012 Charts not rendering

    Hi, We recently upgraded from SQL 2008 R2 to SQL 2012, and since then, all of the charts in our reports will not render.  They appear on the report server with a red "x".  When running the reports in report builder, the charts do not show at all.   H

  • I had a fw external hd connected using backup w/umbrella

    and had it set to backup Sun AM at 6. Now, I have time capsule w/time machine running but Sunday mornings the old backup programs still wants to run. How do I stop or remove or whatever since I no longer need?

  • Eject the install disk

    Hi. Please help. My install disk appears to be hanging on the grey Apple screen at start-up. I've not yet installed Leopard. I just want to eject the disk. How do I get it out of the computer. I'm thinking I got a bad disk. Thanks. Dan

  • Newly downloaded images don't create a new project

    When I download images from my CF card, they don't show up anywhere in my projects, They only show up in the last download folder. My settings for import are Destination: New Project, Shore files: Aperture library, Rename files: none, No effect prese