Did you hit this error before in javafx MediaPlayer?

Hi,All
I 'd like to make a javafx mediaplayer to play mp3 ,and I found some of mp3 wouldn't be supported by javafx mediaplayer,I don't know how can I solve this bug?
I posted a mp3 file to the public network ,if you are interested in this issue, you can download this mp3 from this line for test.
https://www.dropbox.com/s/wk2i9amk0kczqxe/And%20the%20Cradle%20Will%20Rock.mp3
*mediaPlayer.getError() = MediaException: UNKNOWN : [com.sun.media.jfxmediaimpl.NativeMediaPlayer@104fc23] "Error media invalid": "Error media invalid"*
Exception Message:
* Copyright (c) 2008, 2011 Oracle and/or its affiliates.
* All rights reserved. Use is subject to license terms.
import java.io.File;
import javafx.application.Application;
import javafx.scene.media.AudioSpectrumListener;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.stage.Stage;
* An example of an AnchorPane layout.
* @see javafx.scene.layout.AnchorPane
* @related controls/text/SimpleLabel
* @resource icon-48x48.png
public class AnchorPaneSample extends Application {
     private MediaPlayer mediaPlayer;
     private Media media;
     private AudioSpectrumListener spectrumListener;
     private void init(Stage primaryStage) {
          initializeMp3();
    public void initializeMp3()
         if (mediaPlayer != null )
            mediaPlayer.stop();
            mediaPlayer.setAudioSpectrumListener(null);
         String fullpath="C:/And the Cradle Will Rock.mp3";//please download this mp3 from this line ,https://www.dropbox.com/s/wk2i9amk0kczqxe/And%20the%20Cradle%20Will%20Rock.mp3
         File file=new File(fullpath);
          media=new Media(file.toURI().toString());
         mediaPlayer=new MediaPlayer(media);
         mediaPlayer.setAutoPlay(true);
         mediaPlayer.setAudioSpectrumNumBands(10);
        mediaPlayer.setAudioSpectrumListener(spectrumListener);
        mediaPlayer.setAudioSpectrumInterval(1d/30d);
         mediaPlayer.setOnError(new Runnable() {
             @Override public void run() {
                 System.out.println("mediaPlayer.getError() = " + mediaPlayer.getError());
         mediaPlayer.setOnEndOfMedia(new Runnable(){
               @Override public void run() {
                        //todo
    @Override public void start(Stage primaryStage) throws Exception {
        init(primaryStage);
        primaryStage.show();
    public static void main(String[] args) { launch(args); }
}Edited by: imtoocute on May 22, 2012 11:21 AM
Edited by: imtoocute on May 22, 2012 11:22 AM
Edited by: imtoocute on May 22, 2012 11:34 AM

It appears that the file is actually encoded as aac, not mp3. Try changing the file extension and see if that doesn't help.
We'll look at handling this sort of discrepancy, but I'm not sure how reliably we will be able to detect this condition.
General / Container Stream #1
     Total Audio Streams for this File.................1
     Audio Codecs Used.................................AAC LC
     File Format.......................................MPEG-4
     Play Time.........................................3mn 0s
     Total File Size...................................6.62 MiB
     Total Stream BitRate..............................308 Kbps
     Title (Tag).......................................And the Cradle Will Rock...
     Copyright (Tag)...................................2011 Rockabye Baby! Music
Audio Stream #1
     Codec.............................................AAC
     Codec (FourCC)....................................40
     Audio Stream Length...............................3mn 0s 513ms
     Audio Stream BitRate..............................304 Kbps
     Audio Stream BitRate Mode.........................VBR
     Number of Audio Channels..........................2
     Audio Channel's Positions.........................Front: L R
     Sampling Rate.....................................44.1 KHz
     Audio Stream Size.................................6.55 MiB (99%)
     Date of Original Encoding.........................UTC 2011-11-09 18:50:15
Menu / Chapters Stream #1

Similar Messages

  • My itunes id is blocked by apple because of an internal problem trying to update the itunes version, apple support is not helping at all and I need to update all my application. Is anybody you had this problem before? and how did they help? thanks

    my itunes id is blocked by apple because of an internal problem trying to update the itunes version, apple support is not helping at all and I need to update all my application. Is anybody you had this problem before? and how did they help? thanks

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • Did you know this was up on FB?

    Did you know this was up on FB? https://www.facebook.com/events/1590846764481403/1​593647247534688

    You are absolutely right, it is good business practice to check out the offerings from a company before you show or give it to your customers.
    I guess I just assumed that there would be a cut-out on the front cover of the Aperture books, since the soft cover books I ordered from iPhoto did have the front cover cut-out.
    My question, however, is where in the description of the Aperture hard cover book does it state that the cover photo is pasted on ? It is difficult to tell how the front cover is constructed from the photos on the Aperture web site.
    ...... I may have missed it.
    A lesson learned!
    Thanks for your comments.

  • Anyone seen this error before:

    02:45:43 ***Error Occured in BUILD_DRIVER: Failed to Build(Refresh) EASYDWAW Analytic Workspace. In __XML_ADJ_OBJ_LIST: You provided extra input starting at '$'.

    I've seen this error before.
    It happens when there's something with mappings.

  • Drawing attention to an FP object DId YOU know this?

    Often when we are walking a user through filling out some required information we want to direct their attention to a particular control. The traditional wasy of oing this is to use "key focus" and if more "help" is required maybe change a string control with instruction saying "please fill in your name!". If you really want to get fancy you may even change the background color.
    There is now a new approach available but I am not going to tell you what it is (yet). Instead I'll show you!
    Run the attached VI (in LV 8.6) and press the highlight button.
    The approach I used is in the code but I hid it so you can first ask yourself "how would I have done that?"
    So did YOU know this? 
    Ben
    PS To find the answer in the code, please rember that I don't use sequence structes unless I have a reason.
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Solved!
    Go to Solution.
    Attachments:
    Highlight.vi ‏9 KB

    sth wrote:
    From reading between Darren's lines, the method existed previously and thus if Ben saves a copy for previous versions it will work and the method can be cut and pasted to VIs and used in other versions.  Ben, can you save a version 8.5 of this and see if it works and then post it?  It would be a nice tool and some of us are stuck at 8.5 until further notice.
    Oww you are sharp Scott!
    Here it is saved as a invoke node. I did not test it since my 8.5 and 8.6 machines are unique boots of the same machine. If it works we may be able to go bak fartehr than 8.5.
    Let me know if it works!
    Ben
    Message Edited by Ben on 01-29-2009 07:56 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Highlight.vi ‏6 KB

  • Hello! I'm using Aperture with Efex plugins and notice, what when I saving result in plugin and go back to aperture, preview mode is going to grey color and not working until I reboot Aperture. Did you saw this problem?

    Hello! I'm using Aperture with Efex plugins and notice, what when I saving result in plugin and go back to aperture, preview mode is going to grey color and not working until I reboot Aperture. What is intresting - in full screen mode everything works fine. Did you saw this problem?

    It seems there's a workaround here:
    https://discussions.apple.com/thread/5566037?tstart=0

  • How do you fix this error?  Can't access photos Your photo library is either in use by another application or has become unreadable

    How do you fix this error?  Can't access photos----" Your photo library is either in use by another application or has become unreadable"

    Try this:  launch iPhoto with the Option key held down and create a new, test library.  Import some photos and check to see if the same problem persists. If you can create and use a new library then your current library is damaged.
    If that's the case make a temporary, backup copy (if you don't already have a backup copy) of the library and apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • Please help!!! I get this message: Forbidden (403) CSRF verification failed Request aborted when I try t0 connect an app to facebook. I did not have this problem before I downloaded Firefox 4. How do I get rid of this and fix it???

    How do I get rid of this message: Forbidden (403) CSRF verification failed. Request aborted?? I get this message when I try to connect an app to facebook. I did not have this problem before I downloaded Firefox 4. Do I need to remove your browser so my computer can work with the internet again?
    HOW DO I FIX THIS???? I AM VERY FRUSTRATED WITH THIS PROBLEM!!!!

    Click here and follow the instructions to change the iTunes Store country.
    (97125)

  • Cannot download a TV episode "you did not buy this" error message

    I have received two new episodes of programs that I purchased, and tonight when I tried to download, both shows gave me an error message that said "you did not buy this.  You cannot download."  
    But I DID buy this!  I've bought these two shows for more than a season!  
    I had an earlier error message that these shows could not download at this time, in the morning.  During the day I shut down the computer completely, and rebooted this evening . . . . . to get this new error message.
    Any ideas?

    http://www.apple.com/lae/support/itunes/contact/ - contact the iTunes store support team for billing / content issues.
    HTH

  • Did you know this about bridge?

    I'm just curious if I'm the only one who is this slow... :p
    But did you know you could use Bridge to search your computer for images by dimensions? Man, I spent sooo much time this morning trying to find a way to 'trick' Windows into giving me a search by dimensions option. :D
    Afterwards, I wasted even
    more time googling for utilities or tools with that feature. :\ Then it hit me: I remembered seeing all kinds of neat bits of image information in Bridge last time I used it.
    And there it was, in the "find" menu... lol

    You are absolutely right, it is good business practice to check out the offerings from a company before you show or give it to your customers.
    I guess I just assumed that there would be a cut-out on the front cover of the Aperture books, since the soft cover books I ordered from iPhoto did have the front cover cut-out.
    My question, however, is where in the description of the Aperture hard cover book does it state that the cover photo is pasted on ? It is difficult to tell how the front cover is constructed from the photos on the Aperture web site.
    ...... I may have missed it.
    A lesson learned!
    Thanks for your comments.

  • Never seen this error before - video importing

    Hello -
    I am trying to import 130 min movie from FCP into iDVD4 and am receiving an error in iDVD that I've never gotten before, "Unsupported file type: invalid video."
    The way I'm doing the import and the way I have always done it without issue, is:
    1. FCP > Export > QT movie
    2. QT > open FCP QT file > save as > rename file > it becomes a QT file
    3. iDVD > Import > video > import the QT file
    (so am not making it self-contained)
    I tried importing other QT files into the iDVD project, and they work fine. So I think it must be something with the FCP 130 movie, but unsure what it is?
    Many thanks,
    April

    I am trying to import 130 min movie from FCP into iDVD4 and am receiving an error in iDVD that I've never gotten before, "Unsupported file type: invalid video."
    Just curious ..... How did you manage to import 2 hours and 10 mins. of QT Playback into iDvd4? The application (iDvd4) simply isn't designed for this much QT playback ....

  • When you update you iOS, have you seen this error message: not eligible for this build?  The serial

    Dear Mr. Jobs,
    My husband has been an avid supporter of Apple, having purchased a great deal from you over the past many years. Personally, I have been an iPhone user since it was introduced a few years ago. 
    In July 2010, I stood in line at the Apple Store in the Stanford Shopping Center to purchase the iPhone 4. In February of this year, I tried to update the iPhone and got the 'sign of death'. My iPhone turned into a piece of brick and I was not able to make any phone calls, which at that time, was very inconvenient. I remember having to coordinate a pick up at the airport early the next morning and my phone was dead. Apparently, in trying to update the phone, it corrupted the firmware and I could no longer activate that phone. It was a frustrating experience on the eve that I had to go to the airport and I spent hours trying to see if there is anything that I could do to get the phone back in working order.
    The following day, I made an appointment with the genius and my husband and I took the iPhone to the Stanford Apple Store to see if there was a problem with the phone. Without hesitation, we were asked if we purchased the phone overseas. Of course, as Asians, they probably thought that we purchased it in the black market in China. After hearing our response, their next question was whether we hacked the phone. Why would they bring up these issues? Rather than immediately delving into the problem, we found it very annoying that the employees would tried to divert Apple's problem to us. After trying to diagnose the problem, they gave us a new phone and activated it using their in-store computer. 
    We took the phone home, thinking that the problem had been solved. When we got home, we tried to update the iPhone to no avail. The firmware was corrupted and we had to once again, bring the phone back to the Apple Store in the Oakridge Mall in San Jose. The Apple employee told my husband to go to the AT&T store, as there was potentially a SIM problem. My husband went to the AT&T Store and was told that they couldn't help him, as the SIM was fine. They did, however, replace the SIM so that there would be no issue.
    In April, when there was an upgrade to the iPhone software, we once again tried to update the software and was unable to. Once again, the firmware was corrupted and we were forced to take the phone back to the Stanford store. Again, they asked us if we purchased the phone overseas. Why? They could have easily looked at the records, but no, your records are so bad that you are unable to pull it up. That afternoon, we spent four hours at the store, updating the OS on the computer as well as updating the iPhone. They assured us that they solved the problem.
    This past weekend, as there was another update to the iPhone software, we were once again unable to update it and were forced to take it back to Apple. Again, we were asked, did you buy the phone overseas. It's very frustrating and annoying to repeatedly get asked that question. After a series of back and forth communications between the genius and my husband, we were told that they didn't know what the problem was. This time, we told them that we would not be leaving the store until they solved the problem. We have an Apple computer and an Apple iPhone, so 'Apple' should find the source of the problem and fix it once and for all. The genius then suggested that we migrate the data from my computer to my husband's computer and try to update the phone using my husband's computer. We didn't accept that answer. 
    Our genius then asked the help of a second genius and after taking his suggestion, they found that the serial number for my iPhone had been assigned to France Telecom. Once again, they asked if we bought the phone overseas. Why? Please train your employees to not accuse the customers of doing this. Many of us are honest and we take offense to this. In fact, we told them that we purchased the phone from the Stanford Store (where we were at). After looking for the record, they said that we must not have purchased it from them. The onus, then, was up to us to prove that the phone was, in fact, purchased from the Stanford Store. Fortunately, my husband saved the email and was able to show the genius that the phone was purchased from them. How could your records be so poor as not to be able to find our purchase?
    After two hours at the store, we were told that we, not Apple Stanford, had to call customer care to resolve the problem. Being that this is an Apple problem, I would have expected Apple to follow up on our behalf. Why is it that the customer has to spend additional time to deal with an issue that was caused by Apple. 
    My husband has been dealing with customer care, who apparently has escalated the problem to other divisions within the organization. It's been two days and the problem still has not been resolved. In fact, the answer remains that they are not sure how to resolve the problem. Why can't you update your system and redo the record so that I can go on in peace. Every time I try to update the software, I'm afraid that I won't have a working phone. Do you blame me? 
    This has been one of the worst experiences that I have had with an Apple product and it still is not over. Collectively, my husband and I have spent over 25 hours dealing with this issue both at home and at various Apple Stores. It has been a hassle having to go from place to place, having to sync the phone multiple times, having to update the software multiple times on both the computer and iPhone and ultimately, not having it fixed once and for all. Please let me know how you expect to compensate us for this experience and how and when you expect to fix my iPhone issues.
    Mr. Jobs, I know that you expect perfection from your team. This has been a tremendous waste of time for my husband and me and has been a less than stellar experience.
    Regards,
    Lea Anne Ng

    With that one, I'd check on your Hosts file on your PC, Lea.
    Follow iTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to default on Windows. See section "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information".

  • HAS ANYONE COME ACROSS THIS ERROR BEFORE?

    Any help is greatly appreciated here gang.
    I was waiting for a DVD to burn and it was at the writing part of the burn and this error came up:  Internal software error: Vobulator\TitlePlanner\CVOBPlanner.cpp, line 332
    I don't know what this is.
    Thanks!

    Go back to http://forums.adobe.com/community/encore?view=discussions and, in the area just under ASK A QUESTION enter
    line 332
    You may now read all the previous discussions on this subject... be sure to click the See More Results at the bottom of the initial, short list if the initial list does not answer your question

  • Ctl-T nor the File-Open Tab are working any more. Did you kill this?

    I am a heavy user of the Ctl-T function, which opens a new tab on my existing Firefox screen. It is no longer working. Also, when I select File - New Tab, that doesn't open a new tab either.
    The File - New Window option works, but I don't want to have multiple Firefoxes open on my system.
    I've used this feature forever, and in the last couple of weeks (didn't notice the exact time), it stopped working. Did you change something?

    Try uninstalling the Ask toolbar and it should work again. There is a compatibility issue with the Ask toolbar and the current version of Firefox.

  • Why does the vidio on you tube jump and skip now with firefox 4. I did not have this problem before.

    The video, not the sound, skips and jumps on you tube. Before I upgraded to firefox 4, the video flowed smoothly. Why. Fix this now!!!!!

    Firefox now always stores the old session, and you can access it by going to the History menu and selecting "Restore Previous Session"
    If you want Firefox to display the message to save the session, it can be turned back on by changing some preferences.
    # Type '''about:config''' into the location bar and press enter
    # Accept the warning message that appears, you will be taken to a list of preferences
    # Locate the preference '''browser.tabs.warnOnClose''', if its value is set to '''false''', double-click on it to change its value to '''true'''
    # Repeat this for these 3 preferences '''browser.warnOnQuit''', '''browser.warnOnRestart''' and '''browser.showQuitWarning'''
    If you always open the last set of tabs, an alternative approach is this:
    # Click the orange Firefox button, then select options to open the options window
    # Go to the General panel
    # Change the setting "When Firefox starts" to "Show my windows and tabs from last time"

Maybe you are looking for