Error Unable To Realize Com.sun.media.amovie.amcontroller
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up I can not use JMF up vote 0 down vote favorite Now I am trying with another sound file with mp3 codec. But I am encounterring problem to start the player. I have downloaded the file from http://www.mediacollege.com/audio/tone/download/ The output from Netbeans is: run: Error: Unable to realize com.sun.media.amovie.AMController@ebf3f0 BUILD SUCCESSFUL (total time: 2 seconds) And my program is: import javax.media.*; import java.io.*; public class MP3Player { public static void main(String[] args) throws Exception { File file = new File("c:/player/sound.mp3"); MediaLocator mrl = new MediaLocator(file.toURL()); Player player = Manager.createPlayer(mrl); player.start(); Thread.sleep(1000); } } java jmf share|improve this question asked Oct 9 '12 at 21:15 Alex 3518 add a comment| 2 Answers 2 active oldest votes up vote 2 down vote JMF does not support the mp3 format due to licensing issues. This article on extending JavaSound to Play MP3 should give you everything that you need, including a place to download an mp3 codec. I have recently used this sample code as the basis for an mp3 player, and used it on both Windows and OS X, and I can verify that it works very well. share|improve this answer answered Oct 10 '12 at 1:21 GreyBeardedGeek 15.1k11729 add a comment| Did you find this question interesting? Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). Subscribed! Success! Please click the link in the confirmation email to activate your subscription. up vote 0 down vote Try using this: String theFile = "file:///c:/player/sound.mp3"; MediaLocator mrl = new MediaLocator(theFile); works good for me.. share|improve this answer answer
This Site Careers Other all forums Forum: Java in General Problem using JMF naved momin Ranch Hand Posts: 692 I like... posted 4 years ago Rcently i have started working with JMF , i have set up the environment for JMF , the code is also preety simple public class JMFDemo { /** * @param args the command line arguments */ Player audioPlayer = null; public void play( File file ) throws IOException, CannotRealizeException, NoPlayerException { System.err.println(file.toURI().toURL()); audioPlayer = Manager.createRealizedPlayer( file.toURI().toURL() ); http://stackoverflow.com/questions/12808530/i-can-not-use-jmf audioPlayer.start(); } public void stop( ) { audioPlayer.stop(); audioPlayer.close(); } public static void main(String[] args) { try { // TODO code application logic here new JMFDemo().play(new File( "C:\\Users\\Admin\\Desktop\\imgToVideo\\dolbysound.mp3")); } catch (IOException ex) { Logger.getLogger(JMFDemo.class.getName()).log(Level.SEVERE, null, ex); } catch (CannotRealizeException ex) { Logger.getLogger(JMFDemo.class.getName()).log(Level.SEVERE, null, ex); } catch (NoPlayerException ex) { Logger.getLogger(JMFDemo.class.getName()).log(Level.SEVERE, null, ex); } } } but i https://coderanch.com/t/586387/java/java/JMF get file:/C:/Users/Admin/Desktop/imgToVideo/dolbysound.mp3 Error: Unable to realize com.sun.media.amovie.AMController@1ff5ea7 7 Jul, 2012 7:52:10 PM jmfdemo.JMFDemo main SEVERE: null javax.media.CannotRealizeException Error value: 80040266 at javax.media.Manager.blockingCall(Manager.java:2005) at javax.media.Manager.createRealizedPlayer(Manager.java:528) at jmfdemo.JMFDemo.play(JMFDemo.java:29) at jmfdemo.JMFDemo.main(JMFDemo.java:41) BUILD SUCCESSFUL (total time: 4 seconds) I dont't understand the exception , even when i tried playing some different file still i get this exception does any one has any idea where i m wrong ? The Only way to learn is ...........do! Visit my blog http://inaved-momin.blogspot.com/ Rob Spoor Sheriff Posts: 20696 68 I like... posted 4 years ago JMF by default has no support for MP3 files. You have to install a JMF extension first to enable MP3 support. You should be able to find such an extension using Google. SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6 How To Ask Questions How To Answer Questions naved momin Ranch Hand Posts: 692 I like... posted 4 years ago Rob Spoor wrote:JMF by default has no support for MP3 files. You have to
FOR THIS PLUGIN (http://plugins.netbeans.org/plugin/58856/?show=true). THIS ONE HAS BEEN DEPRECATED AND IT SHOULDN'T BE USED ANYMORE. JMF has slowly become obsolete http://plugins.netbeans.org/plugin/9525/netbeans-media-player-module over the years and it's been abandoned. Therefore, I've reimplemented the playback engine from scratch. The new version of this plugin is a PURE JAVA implementation (NO THIRD-PARTY NATIVE https://community.oracle.com/thread/1281947 LIBRARIES NEEDED!!!), which is compatible with JDK 1.8u40 or later. Plugin owner: elcocolio Website: Added: 2008-05-20 License: CDDL Category: Fun Stuff Downloaded: 8,588 times Rating: 12345 0, by 0 error unable users Plugin Log Show log 2015-11-23 13:48:54ent38Vote cast by ent38 for NetBeans Media Player Module, UC 8.1, vote value: 1; verification overall status recalculated: 1 (0 NoGos, 2 Gos of 6 requests, therefore overal GO)2015-11-23 06:04:12carlosqtVote cast by carlosqt for NetBeans Media Player Module, UC 8.1, vote value: 1; verification overall status recalculated: 0 (0 NoGos, 1 Gos of error unable to 6 requests, therefore overal Undecided)2015-11-20 17:05:33elcocolioVerification request registered for verifier jpirek, with id: 615312015-11-20 17:05:33elcocolioVerification request registered for verifier jkovalsky, with id: 615302015-11-20 17:05:33elcocolioVerification request registered for verifier geertjan, with id: 615292015-11-20 17:05:33elcocolioVerification request registered for verifier ent38, with id: 615282015-11-20 17:05:33elcocolioVerification request registered for verifier djamdev, with id: 615272015-11-20 17:05:33elcocolioVerification request registered for verifier carlosqt, with id: 615262015-11-20 17:05:33elcocolioVerification registered for version 8.1, with id: 615252015-11-20 17:03:58elcocolioBinary successfully saved 1448057038_org-netbeans-fxmediaplayer.nbm, binary_id: 4189, version: 8.12015-11-20 17:03:58elcocolioBinary uploaded successfully - /space/pluginportal-v2/public/data/nbms/org-netbeans-fxmediaplayer.nbm2015-11-20 17:03:58elcocolioUploading new binary for version 8.12015-10-26 05:14:17carlosqtVote cast by carlosqt for NetBeans Media Player Module, UC 8.0, vote value: 1; verification overall status recalculated: 1 (0 NoGos, 3 Gos of 6 requests, therefore overal GO)2015-08-17 11:03:36geertjanVote cast by geertjan for NetBeans Media Player Module, UC 8.0, vote value: 1; verification overall status recalculated: 1 (0 NoGos, 2 Gos of 8 requests, therefore overal GO)2015-08-15 09:44:48ent38Vote cast by ent38 for NetBeans Media Player Module, UC 8.0, vote value: 1; verification overall status recalculated: 0 (0 NoGos, 1 Gos of 8 requests, therefore overal Undecided)2015-08-12 17:30:54elcoc
Speaker BureauLog inRegisterSearchSearchCancelError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in Java Media Framework All PlacesJavaJava SEJava Media Framework This discussion is archived 10 Replies Latest reply on Mar 13, 2007 6:39 AM by 843802 New to JMF please help me out. 843802 Mar 9, 2007 4:40 PM Hi, I want to know how to use both the JDK and JMF at the same time, please help. 21Views Tags: none (add) This content has been marked as final. Show 10 replies 1. Re: New to JMF please help me out. 843802 Mar 9, 2007 5:39 PM (in response to 843802) Yes you can. I assume that you have already installed jdk in your computer. This is the direct link to download JMF 2.1.1 http://java.sun.com/products/java-media/jmf/2.1.1/download.html Install JMF. You don't have to set the classpath as the installer is going to set the classpath for you. This is it. You can start using JMF along with jdk. You just have to import the necessary packages of JMF and there you are, using JMF. For example this is a small code which lets you play .mp3 import javax.media.*; import java.io.*; import java.net.*; public class Mp3Player { public static void main(String args[]) throws Exception { System.out.println("I have System.out.println from jdk here"); Player player=Manager.createRealizedPlayer(new URL("file:///I:/January 26th 2006/Sum41/All Killer No Filler/02 Sum 41 - Nothing on my Back.mp3")); player.start(); } } [/code[ Change the path in url to some absolute path of some .mp3 on your pc to run it. Does that help? Like Show 0 Likes(0) Actions 2. Re: New to JMF please help me out. 843802 Mar 10, 2007 2:26 PM (in response to 843802) It compiles great but when I try to run it I'm getting this error: Exception in thread "main" java.lang.NoClassDefFoundError: Mp3Player/class Have I done something wrong, maybe I shouldn't run it from cmd.exe. Got any Idea on this? Like Show 0 Likes(0) Actions 3. Re: New to JMF please help me out. 843802 Mar 10, 2007 2:35 PM (in response to 843802) It compiles great but when I try to run it I'm getting this error: Exception in thread "main" java.lang.NoClassDefFoundError: Mp3Player/class Have I done something wrong, maybe I shouldn't run it from cmd.exe. Got any Idea on this?Don't mind this, I was so stupid, forgot you can't type Mp3Player.class you have got to type Mp3Player. Like Show 0 Likes(0) Actions 4. Re: New to JMF pleas