Error Unable To Realize Com.sun.media.amovie
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 start the player in my code up vote 0 down vote favorite I am trying to launch my my code and start the player. But I can not do that. import javax.media.*; import java.io.*; public class MP3Player { public static void main(String[] args) throws Exception { File file = new File("c://player/trigger.mpg"); MediaLocator mrl = new MediaLocator(file.toURL()); Player player = Manager.createPlayer(mrl); player.start(); } } [Edit by Philipp] According to a comment by the original author, Netbeans prints the following error message: Unable to handle format: MPEG, 160x120, FrameRate=30.0, Length=28800 Failed to realize: com.sun.media.PlaybackEngine@131f71a Error: Unable to realize com.sun.media.PlaybackEngine@131f71a BUILD SUCCESSFUL (total time: 1 second) [/Edit by Philipp] java jmf share|improve this question edited Oct 9 '12 at 14:34 Philipp 37.2k34390 asked Oct 9 '12 at 14:19 Alex 3518 Is the missing / in the path a typo? –Werner Kvalem Vesteras Oct 9 '12 at 14:21 "can not do that" = ? Are you getting an error? Is your computer exploding? –lc. Oct 9 '12 at 14:22 I got this message from Netbeans –Alex Oct 9 '12 at 14:24 Unable to handle format: MPEG, 160x120, FrameRate=30.0, Length=28800 Failed to realize: com.sun.media.PlaybackEngine@131f71a Error: Unable to realize com.sun.media.PlaybackEngine@131f71a BUILD SUCCESSFUL (total time: 1 second) –Alex Oct 9 '12 at 14:27 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote I don't know JMF player at all, but I assume the problem is that the code exits immedia
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 { http://stackoverflow.com/questions/12802134/i-can-not-start-the-player-in-my-code /** * @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() ); audioPlayer.start(); } public void stop( ) { audioPlayer.stop(); audioPlayer.close(); } public static https://coderanch.com/t/586387/java/java/JMF 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 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
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 http://www.java-forums.org/advanced-java/63056-problem-jmf.html playback engine from scratch. The new version of this plugin is a PURE JAVA implementation (NO THIRD-PARTY NATIVE 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:54elcocolioVerificati
with JMF LinkBack LinkBack URL About LinkBacks Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 09-16-2012,02:12 PM #1 oror84 Member Join Date Mar 2012 Posts 4 Rep Power 0 Problem with JMF Hi, I'm trying to play a song with JMF, the song location is in my computer. I'm getting an exception of CannotRealizeException. I'm king of new programmer with JMF, here is my code : Java Code: import javax.media.CannotRealizeException; import javax.media.Manager; import javax.media.NoPlayerException; import javax.media.Player; import java.io.File; import java.io.IOException; import java.net.URL; public class SimpleAudioPlayer { private Player audioPLayer; public SimpleAudioPlayer(URL url) throws IOException, NoPlayerException, CannotRealizeException { audioPLayer = Manager.createRealizedPlayer(url); } public SimpleAudioPlayer(File file) throws IOException, NoPlayerException, CannotRealizeException { this(file.toURI().toURL()); } public void play() { audioPLayer.start(); } public void stop() { audioPLayer.stop(); audioPLayer.close(); } public static void main(String[] args) { try { File file = new File("C://Users//Or//Downloads//Songs//a.mp3") ; SimpleAudioPlayer simpleAudioPlayer = null; simpleAudioPlayer = new SimpleAudioPlayer(file); simpleAudioPlayer.play(); } catch (IOException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (NoPlayerException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (CannotRealizeException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } } I have a song with a.mp3 name at this location, and i dont know what is the reason i'm gettting this exception. Hope that someone can help me.. Thanks, Or. Reply With Quote 09-16-2012,04:18 PM #2 DarrylBurke Forum Police Join Date Sep 2008 Location Madgaon, Goa, India Posts 12,001 Rep Power 23 Re: Problem with JMF Have you installed the MP3 Plugin? db If you're forever cleaning cobwebs, it's time to get rid of the spiders. Reply With Quote 09-16-2012,04:58 PM #3 oror84 Member Join Date Mar 2012 Posts 4 Rep Power 0 Re: Problem with JMF Hi and thank you for your answer. I just installed the plugin, and still get the same exception. Thanks, Or. Reply With Quote 09-16-2012,05:15 PM #4 oror84 Member Join Date Mar 2012 Posts 4 Rep Power 0 Re: Problem with JMF This is the error message : "Failed to