Java video player

Do you guys have any idea to write a rmvb player ? which class should i use?
any example i can have a look?
thanks

Try this article: http://www.javaworld.com/javaworld/jw-04-1997/jw-04-jmf.html.
It's a general discussion of the Java Media Framework, libraries that allows you
to embed audio and video into your applets and applications. I'm just not sure
if it supports the rmvb format.
And try "Google-(ing)" it - there are a lot of other resources that can be useful.

Similar Messages

  • Finding a java video streaming player

    I recently use FreePastry to implement a p2p video streaming system.
    But now i have a new challege, which bother me several days.
    In Splitstream, which uses Byte[] to send the data to other peer.
    I want find a java video player. It would be best to receive Byte[] as input.
    I try JMF, but it use RTP as the input.
    Is there any other video players suited about my case.

    There is a function in LiveStream.java called read. Read passes in a buffer object. The goal is to write all of the data you have available into the buffer object.
    What you want to do is something along the lines of the following pseudocode...
    public void read(Buffer buffer) throws IOException {
        synchronized (this) {
            /* Get the data */
            byte[] data = FunctionThatGetsByteArrayFromTheNetwork();
            /* Write the data to the buffer object */
            buffer.setData(data);
    }As for using the PushBufferDataSource, you just create one like you would a normal class (just use the new operator) and give it to a processor or a player like you would a normal data source.
    You need to include the DataSource.java code like the example does, modify it to use your modified LiveStream.java (you'll probably change the names of classes, so update the DataSource.java class to reflect those changes) and then just use it to create your DataSource.
        /* From DataSource.java */
        DataSource ds = new DataSource();
        /* Normal way of doing this */
        Processor p = Manager.createProcessor(ds);

  • Confirm on - Scratch-resistant glass, oleophobic coating,Adobe Flash HTML,Radio Stereo FM,Java MIDP emulator,Scratch-resistant glass back panel,Audio/video player and editor,TV Out,Document editor (Word, Excel, PowerPoint, PDF)

    Kindly confirm on the following features of Iphone 4s..and advice me accordingly.
    Confirm on - Scratch-resistant glass, oleophobic coating,Adobe Flash HTML,Radio Stereo FM,Java MIDP emulator,Scratch-resistant glass back panel,Audio/video player and editor,TV Out,Document editor (Word, Excel, PowerPoint, PDF)

    You can easily compare any Nokia devices using the web sites, here is a comparison of the N8 from the Nokia UK site:
    http://www.nokia.co.uk/gb-en/products/compare/?action=productcompareaction&site=64060&products=23301...
    And similar from Nokia Developer:
    http://www.developer.nokia.com/Devices/Device_specifications/Comparison.xhtml?dev=Lumia_800,N8-00
    Some information may be incomplete at present, since some device details were kept secret until the final moment of the launch so the pages have been prepared withoug all of the data.
    Nokia Maps is available for Windows Phone at launch.
    Multi-Touch(TM) is the registered trademark of another company, however Windows Phone does feature the common touch features such as swiping, pinch-zooming and so on.
    If this or any post answers your question, please remember to help others by pressing the 'Accept as solution' button.

  • Why are Java and Video Player updates appearing in Safari

    Today these fake Java and Video Player update pop ups started appearing in Safari 6.2.4, in OS 10.8.5.  The Java updates say I need  version 13 which doesn't exist and the video player pop ups are gray with a red square that resemble the Adobe colors.  These are popping up on almost every page I load in Safari.
    I've looked in the Launch Daemons folder and that other Launch folder that keeps being recommended in the post that says I don't need to download anything and there is nothing out of the ordinary there.  How do I stop these pop ups?
    Tracy

    The update alerts are indeed fake, and are intended to dupe you into installing malware or disclosing private information so that your identity can be stolen.
    You might get the alerts when visiting a website that has been hacked. Don't visit the site again. If applicable, notify the site administrator of the problem, but don't send email to an unknown party.
    If you get the alerts when visiting more than one well-known website, such as Google, YouTube, or Facebook, then they may be the result of an attack on your router that has caused you to get false results from looking up the addresses of Internet servers. Requests sent to those sites are redirected to a server controlled by the attacker. It's possible, but less likely, that the DNS server used by your ISP has been attacked.
    Back up all data.
    Unlock the Network preference pane, if necessary, by clicking the lock icon in the lower left corner and entering your password. Cllck Advanced, open the DNS tab, and change the server addresses to the following:
              8.8.8.8
              8.8.4.4
    That's Google DNS. Click OK, then Apply.
    In Safari, select
              Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data
    and confirm. If you’re using another browser, empty the cache. Test. If the fake update alerts stop, see below. Otherwise, ask for instructions.
    The router's documentation should tell you how to reset it to the factory default state. Usually there's a pinhole switch somewhere in the back. It may be labeled "RESET." Insert the end of a straightened paper clip or a similar tool and press the button inside for perhaps 15 seconds, or as long as the instructions specify.
    After resetting the router, quit the web browser and relaunch it while holding down the shift key. From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data
    and confirm. Do the equivalent if you use another browser. Open the Downloads folder and delete anything you don't recognize.
    Then go through the router's initial setup procedure. I can't be specific, because it's different for every model. The key points are these:
    1. Don't allow the router to be administered from the WAN (Internet) port, if it has that option. Most do.
    2. Set a strong password to protect the router's settings: at least ten random upper- and lower-case letters and digits. Don't use the default password or any other that could be guessed. Save the password in your keychain. Any password that you can remember is weak.
    3. If the router is wireless, or if you have a wireless access point on the network, use "WPA 2 Personal" security and set a different strong password to protect the network. If the router or access point doesn't support WPA 2, it's obsolete and must be replaced.
    During the time the router was compromised, you were redirected to bogus websites. If you ever connected to a secure site and got a warning from your browser that the identity of the server could not be verified, and you dismissed that warning in order to log in, assume that your credentials for the site have been stolen and that the attacker has control of the account. This warning also applies to all websites on which you saw the fake update alerts.
    Check the router manufacturer's website for a firmware update.
    If you downloaded and installed what you thought was a software update, ask for instructions.

  • How can i make RealPlayer the default video player?

    I use safari 3.0.4
    When it accesses sites containing video, it plays it in Flash (eg YouTube)
    How do I get safari to use realplayer instead? (Even my Firefox 2.0 uses flash) (I have RP 10)
    I am teaching a course in media literacy and show some of the uploaded old tv commercials to my students. i want to show next year's class some of the same commercials, so i want to save the ones I find this year while they're available.
    At school, I work on a pc, and it plays video back in RealPlayer which gives me a 'download' option, so i can save these commercials.
    But when i find good clips at home, on my mac, all I can do is note the urls, then do it all again at school to get to them to download. it would be much easier if i could download them as I find them, then take them to school on my portable drive.
    any solution?
    Thank you
    Elizabeth

    At school, I work on a pc, and it plays video back in RealPlayer which gives me a 'download' option, so i can save these commercials
    RealPlayer v. 11.0.0 (may still be in beta) now includes that Downloader - a very useful item!
    It is a free download but they will ask for money in July. Must be why they call it RealPlayer Plus!
    You can get it here:
    http://uk.real.com/player/mac/
    I have had it for a couple of weeks and have had no problems.
    As for making RealPlayer the default video player, IMO that is not a good idea. There is a lot of stuff out there that RealPlayer would not be able to handle.
    These are the downloads and the settings you need in order to view/hear pretty much everything that the net can throw at you: The setup described below has proved repeatedly successful on both PPC and Intel macs, but nothing in life carries a guarantee!
    It is known to work in the great majority of cases with Safari 3.0.4, QT 7.3 or 7.4 and OS 10.4.11. (If you are running Leopard, ensure that all plug-ins have been updated for OS 10.5.2, but please see my footnote).
    Assuming you already run Tiger versions OS 10.4.9 or above (this has not yet been verified with Leopard) and have Quicktime 7.2 or above, and are using Safari 2 or 3, download and install (or re-install even if you already had them) the latest versions, suitable for your flavor of Mac, of:
    RealPlayer 10 for Mac from http://forms.real.com/real/player/blackjack.html?platform2=Mac%20OS%20X&product= RealPlayer%2010&proc=g3&lang=&show_list=0&src=macjack
    The new RealPlayer Plus (v.11) is still in beta and therefore free, but works well on Tiger. It includes a download function, and you can get that here:
    http://uk.real.com/player/mac/
    Flip4Mac WMV Player from http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx (Windows Media Player for the Mac is no longer supported, even by Microsoft)
    Perian from http://perian.org/
    You should read this support page http://perian.org/#support in case you need to delete older codecs.
    Adobe FlashPlayer should first be uninstalled using the appropriate uninstaller available here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14157&sliceId=2 and then the latest version obtained from here: http://www.adobe.com/shockwave/download/download.cgi?P1ProdVersion=ShockwaveFlash and installed.
    (You can check here: http://www.adobe.com/products/flash/about/ to see which version you should install for your Mac and OS, but please see my footnote if you are running Leopard.)
    In earlier versions than QT 7.1.3 in Quicktime Preferences, under advanced, UNcheck Enable Flash, and under Mime settings/Miscellananeous only check Quicktime HTML (QHTM).
    You should also ensure, if you are running Tiger 10.4.11 or Leopard, that you have downloaded and installed the correct version for your Mac of Security Update 2007-009.1.1, which also deals with the Quicktime/Flash issues you may have experienced, such as the '?'. What happened was that both Quicktime as well as Adobe FlashPlayer tried to play the Flash video at the same time. This no longer happens. (N.B. Security Update 2007-009 1.1 requires both a restart and a permission repair.)
    If you get problems with viewing video on a website try moving this file to your Desktop:
    Hard drive/Library/Internet Plug-Ins/QuickTime Plugin.webplugin
    and then restarting Safari. If all now works, you can trash that file.
    In Macintosh HD/Library/Quicktime/ delete any files relating to DivX (Perian already has them). However it should be noted that Perian is not an internet plugin and will not play DivX files imbedded on a website. For that you will need the DivX Player browser plugin available from http://www.divx.com/divx/mac/
    Now go to Safari Preferences/Security, and tick the boxes under Web Content (all 4 of them) to enable Java.
    Lastly open Audio Midi Setup (which you will find in the Utilities Folder of your Applications Folder) and click on Audio Devices. Make sure that both Audio Input and Audio Output, under Format, are set to 44100 Hz, and that you have selected 'Built in Audio'.
    Important: Now repair permissions and restart.
    You should also consider having the free VLC Player from http://www.videolan.org/ in your armory, as this plays almost anything that DVD Player might not.
    FOOTNOTE
    If you are running Leopard:
    Some users have mentioned that the latest Flash Player (v.9.0.115.0) conflicts with Leopard, and that they have needed to revert to v. 9.0.47. This can be downloaded from here:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14266&sliceId=1

  • How can I remove a video player?

    Hi, awhile back I installed a video player, that I can't even remember the name of now, and it plays all my video's being watched over the web with this player now, it does give me the option to use original player, but you have to be lightning quick to click it and even then sometimes it won't. Its driving me nuts! I hate it! Can anyone tell me please how to maybe find this program and delete it. And what is the default video player on the Mac supposed to be?
    Thanks so much.

    From the Safari menu bar, select
    Help ▹ Installed Plug-ins
    Besides the following, what plugins are listed?
    iPhotoPhotocast
    Java
    QuickTime
    Shockwave Flash
    WebKit built-in PDF

  • Embedding video player in TLF

    Hi Guys,
    Can we add a video player to a Richeditable text, if yes what is wrong in the code below? I can see it adds to the editor but soesnt show up
    <?xml version="1.0" encoding="utf-8"?>
    <!--
    // Copyright (C) 2009 Rad3 Limited.
    // All Rights Reserved.
    // If you have received this file from a source other than Rad3,
    // then your use, modification, or distribution of it requires
    // the prior written permission of Rad3.
    // -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="initApp();">
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
                        <fx:Script>
                                  <![CDATA[
                                            import flashx.textLayout.edit.EditManager;
                                            import flashx.textLayout.edit.SelectionState;
                                            import mx.controls.Alert;
                                            import spark.components.VideoDisplay;
                                            import spark.components.VideoPlayer;
                                  private var _videoDisplay:VideoPlayer;
                                  private var _editManager:EditManager;
                                  private var _videoContainer:Sprite;
                                  private function initApp():void
                                            var videoPath:String = "sample_vid.flv";
                                            _videoDisplay = new VideoPlayer();
                                            _videoDisplay.source = videoPath;
                                            _videoContainer = new Sprite();
                                            _videoContainer.width = 200;
                                            _videoContainer.height = 200;
                                            //_videoDisplay.play();
                                            // add the video
                                            _videoContainer.addChild(_videoDisplay);
                                            _editManager = rte.textFlow.interactionManager as EditManager;
                                            _editManager.insertInlineGraphic(_videoContainer,500,400, null, new SelectionState(rte.textFlow, 0, 0));
                                  ]]>
                        </fx:Script>
                        <s:RichEditableText id="rte" width="100%" height="100%"/>
    </s:Application>
    Thanks

    gauravjlj wrote:
    ..I need Video.. What formats do you need to support?
    ..Player in my Java Web Application.Do you mean embedded in the web page, or simply available from your site?
    Please guide me the right way to do it.For Sun's latest media project, see [http://javafx.com/].
    For older JREs, you might look to the JMF. See [http://java.sun.com/javase/technologies/desktop/media/jmf/] for further details.

  • Safari 6.0.5 update == no variable speed feature on html5 video player.

    Today I installed the Safari 6.0.5 update and now I don't have the html5 video player variable speed feature -- this allows one to play videos at speeds from 0.5x to 2.0x.  My previous Safari was 6.0.4 and the html5 video var speed feature worked well.
    The other things SW Update installed with the Safari 6.0.5 were:
    Security Update 2013-002
    Java for OS C 2013-004
    iTunes 11.0.4
    Any ideas?

    Today I installed the Safari 6.0.5 update and now I don't have the html5 video player variable speed feature -- this allows one to play videos at speeds from 0.5x to 2.0x.  My previous Safari was 6.0.4 and the html5 video var speed feature worked well.
    The other things SW Update installed with the Safari 6.0.5 were:
    Security Update 2013-002
    Java for OS C 2013-004
    iTunes 11.0.4
    Any ideas?

  • Using the native iOS video player?

    I would like to learn more about using the iOS native video player in my Adobe Air app.
    I understand that you can launch the native iOS video player by using StageWebView.
    What are some of the limitations of using the native IOS player with this method?
    Can I not limit the user's control of the playback controls so the user cannot fastforward thru an ad video?
    Once the video is done, can I auto start to a new video?
    When the user clicks the DONE/BACK button, can I close the StageWebView?
    Are there other ways to launch the iOS native player instead of using StageWebView?
    Is anyone creating a Native Extension for the iOS native video player?
    If you were to create an app using native iOS code instead of Adobe AIR, what can you do with the native player that you can't control using Adobe Air?
    thanks!
    Jack

    Hi, Jack:
    My answers are based on what I have done:
    other than stageWebView, you can load native player from native UIWebview, and probably (I guess) directly open a video players.
    If you do it from UIWebview, you can have the full access control of the video player, and interaction between Flex and Objective-c is also supported.
    Regarding what we can do with the native player, I say we can do anything we want if it's loaded on the UIWebview.
    Let's say 'pause', you can make your native player to be paused in the flex code, besides directly click the pause button. The simple workflow is:
    Mapping 'pause' function to a objective-c function which triggers the native videoplayer pause function. One situation would be that you have HTML5 page only contains a video player, and java script functions to control the video (player pause, fullscreen etc).
    Therefore, you can just call those javascript functions from objective-c.
    You can also get information back from objective-c. Let's say you wanna do something after the video is finished, so the objective-c call javascript to listen end info of the video. then objective-c pass this information back to flex as an event. The Flex side catches this event and maps this event into Flex event for your use.
    If there is a way to direcly invoke native player, those steps above will be much simpler, but I haven't tried. I am sure someone is doing that, hopefully they can answer you here.
    Regards,
    Matthew

  • Multicast video player with FMS 4.0

    I am trying to create a video player in Flash Builder using the new Flash Media Server 4.0 capabilities but I am not able to. The only thread I've seen out there is regarding the P2P player which is not what I want as seen here:
    http://www.swfgeek.net/2010/08/10/multicast-streaming-in-flash-player-10-1-revisited/
    I want to create a custom player that can retrieve a multicast broadcast.
    Here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:mx="library://ns.adobe.com/flex/mx" width="650" height="250">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
        <![CDATA[
        import mx.core.UIComponent;
        import spark.components.Group;
        private const SERVER:String = "rtmfp://172.22.2.150/multicast";
        private const DEVKEY:String = ""; //removed for now
        [Bindable]
        private var connected:Boolean = false;
        private var video:Video;
        private var netConnection:NetConnection;
        private var stream:NetStream;
        public function init():void{
        writeText("Broadcaster:");
        video = new Video(320,240);
        video.x = 10;
        video.y = 10;
        var uic:UIComponent = new UIComponent();
        uic.addChild(video);
        addElement(uic);
        connect();
        private function connect():void{
        netConnection = new NetConnection();
        netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
        netConnection.connect(SERVER+DEVKEY);
        private function onNetConnectionNetStatus(event:NetStatusEvent):void
        switch(event.info.code){
        case "NetStream.Connect.Success":
        event.info.stream.dispatchEvent(event);
        break;
        private function netStatus(event:NetStatusEvent):void{
        writeText(event.info.code);
        switch(event.info.code){
        case "NetConnection.Connect.Success":
        setupStream();
        break;
        case "NetStream.Connect.Success":
        // not using a camera, using another live video source
        //var cam:Camera = Camera.getCamera();   
        //stream.attachCamera(cam);
        //stream.publish("multicast");
        //video.attachCamera(cam);
        stream.attach(netConnection);
        stream.publish("myStream");
        video.attachNetStream(stream);
        break;
        private function setupStream():void{
        //var groupspec:GroupSpecifier = new GroupSpecifier("myGroup/multicastOne");
            var groupspec:GroupSpecifier = new GroupSpecifier("fms.multicast.example");
        groupspec.serverChannelEnabled = true;
        groupspec.multicastEnabled = true;
        groupspec.groupspecWithoutAuthorizations()
        stream = new NetStream(netConnection,groupspec.groupspecWithAuthorizations());
        stream.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
        private function writeText(txt:String):void{
        txtHistory.text += txt+"\n";
        ]]>
        </fx:Script>
        <s:TextArea top="10" bottom="10" id="txtHistory" width="250" right="10"/>
    </s:Group>

    The QT movie opened promptly for me in Firefox 4.0. The fact that it's intermittent for you with FF indicates that it's a connection issue and not an iWeb issue. For some reason not all of the files are being loaded by FF at those times. (The server is probably being run by an Ohio State graduate )
    OT
    Go Blue!
    Note: using Quicktime for you slide presentation will exclude all those users from the dark side who don't have Quicktime installed on their PCs. You might look into a java based method for the presentation. There are lots of them out there. With the free Jalbum you have over 100 themes/skins to choose from.
    Message was edited by: Old Toad

  • My video keeps freezing and I want to know how to fix this problem or which add-ons / plugins need to be installed for improved performance of my video player

    I often like watching videos and movies, current affairs, clips on you tube nine msn, yahoo and other sites and my video player or movie freezes for short and long periods and sometimes doesn't start at all. I don't have much experience with add on's or plugins but have been told this may be the problem, I have tried disabling add on's leaving shock wave flash player 11.7.700.224, adobe acrobat PDF plug in, silver light plug in 5.1.20125.0, java deployment toolkit 7.0.210.11 10.21.2.11 and java (TM) platform SE 7 U21 10.21.2.11. as well as leaving all add on's and plug ins run but it still doesn't fix the freezing problem please help or advise what are best options for peak performance of videos, clips and movies. Thanks

    You can check for problems with current Flash plugin versions and try these:
    *disable a possible RealPlayer Browser Record Plugin extension for Firefox and update the RealPlayer if installed
    *disable protected mode in the Flash plugin (Flash 11.3+ on Windows Vista and later)
    *disable hardware acceleration in the Flash plugin
    *http://kb.mozillazine.org/Flash#Troubleshooting
    *http://helpx.adobe.com/flash-player/kb/flash-player-113-crash-mozilla.html
    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    Boot the computer in Windows Safe mode with network support (press F8 on the boot screen) as a test to see if that helps.

  • Embed video player or flash payer on Jsp page

    HI all, I am new to java, and i want store videos in database(Mysql) and also want to retrieve and play videos on my jsp page,like youtube,how can i embed video player or flash payer on my jsp page so that i can play videos of almost all formats. iam doing all this in servlets.
    Can anybody help me?? and give details about all that??
    Thanks.

    Hi thanks for ur response,
    Can you please help me more, i am using eclipse on linux OS and trying to play video,using JMF,by using jmf.jar,mediaplayer.jar,multiplayer.jar files in my applications ,and when i run my class it gives error "No media player found" as there is no media player in linux,so how can i play my video in real player or in some other player in llinux using eclipse.
    iam using sample code provided by JMF to play video.
    Thanks.

  • Video Player Midlet problem

    A begginer in J2me, i am trying to produce a video player. There are two classes at present being VideoPlayerMIDlet and VideoPlayer. On compiling the two classes with wireless toolkit i recieve the following error.
    \.....\.....\Src\VideoPlayerMIDlet.java:74: cannot resolve symbol
    symbol: method start ()
    location: class VideoPlayerMIDlet
    start ();
    Okay, i understand why this is happening but not sure how to implement the solution.
    The VideoPlayerMIDlet contains the MIDlet functions such as startApp, pauseApp, destroyApp and the CommandAction methods. The command action has a command function to activate the start method which is contained in the VideoPlayer.class. Therefore it is unable to find the method as the CommandAction is located in the VideoPlayerMIDlet.
    Help would be most appreciated.
    I will print the code for the programme below:
    VideoPlayerMIDlet.class
    //import statements
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import javax.microedition.media.*;
    public class VideoPlayerMIDlet extends MIDlet implements
         CommandListener, PlayerListener {
         public Display display;
         public Player player;
         public Command startCommand, exitCommand, stopCommand;
         private Form form;
         private TextField url;
         public VideoPlayerMIDlet() {
              display = Display.getDisplay(this);
              startCommand  = new Command("Play", Command.SCREEN, 1);
              exitCommand  = new Command("Exit", Command.SCREEN, 2);
              form = new Form("Demo Player");
              url = new TextField("Enter URL:", "", 100,
              TextField.URL);
              form.append(url);
              form.addCommand(startCommand);
              form.addCommand(exitCommand);
              form.setCommandListener(this);
              display.setCurrent(form);
         protected void startApp() {
         try {
              if(player != null && player.getState() == Player.PREFETCHED) {
                   player.start();
              }else {
                   defplayer();
                   display.setCurrent(form);
         }catch(MediaException me) {
              reset();
         protected void pauseApp() {
         try {
              if(player != null && player.getState() == Player.STARTED) {
                   player.stop();
              }else{
                   defplayer();
                   display.setCurrent(form);
         }catch(MediaException me) {
              reset();
    protected void destroyApp(boolean unconditional) {
         form = null;
         try {
              defplayer();
         }catch(MediaException me) {
    public void commandAction(Command c, Displayable s) {
         if(c == startCommand) {
              start();        // THIS IS WHERE THE PROBLEM LIES IT IS LOOKING FOR START() CONTAINED
                                        // IN VIDEOPLAYER.CLASS
         //exit command
         if (c == exitCommand) {
              destroyApp(false);
              notifyDestroyed();
    public void playerUpdate(Player player, String event, Object data) {
         if(event == PlayerListener.END_OF_MEDIA) {
              try {
                   defplayer();
              catch(MediaException me) {
              reset();
    public void defplayer() throws MediaException {
         if(player != null) {
              if(player.getState() == Player.STARTED) {
                   player.stop();
              if(player.getState() == Player.PREFETCHED) {
                   player.deallocate();
              if(player.getState() == Player.REALIZED ||
              player.getState() == Player.UNREALIZED) {
                   player.close();
         player = null;
    void reset() {
         player = null;
    VideoPlayer.class
    /**class for player*/
    import javax.microedition.media.*;
    import javax.microedition.media.control.*;
    import javax.microedition.lcdui.*;
    public class VideoPlayer implements Runnable {
         private VideoPlayerMIDlet controller;
         private TextField url;
    public VideoPlayer(VideoPlayerMIDlet controller) {
         this.controller = controller;
    public void start() {
         Thread t = new Thread(this);
         t.start();
    public void run() {
         play(getURL());
    String getURL() {
         return url.getString();
    void play(String url) {
         try {
              VideoControl vc;
              controller.defplayer();
              controller.player = Manager.createPlayer("http://www.leetambiah.pwp.blueyonder.co.uk/diss.mpg");
              controller.player.realize();
              vc = (VideoControl)controller.player.getControl("VideoControl");
              if(vc != null) {
                   Item video = (Item)vc.initDisplayMode (
                   vc.USE_GUI_PRIMITIVE, null);
                   Form v = new Form("Playing Video...");
                   StringItem si = new StringItem("Status:",
                   "Playing...");
                   v.append(si);
                   v.append(video);
                   v.addCommand(controller.startCommand);
                   v.addCommand(controller.stopCommand);
                   v.setCommandListener(controller);
                   controller.display.setCurrent(v);
              controller.player.prefetch();
              controller.player.start();
         }catch(Throwable t)
         controller.reset();

    IMHO sir,,i didnt see this thread is already locked.
    2 years old..even 10 years old didnt mean its already solved or the author solve it.i f you have found the answer of this problem,,why didnt you post that ?? even,,this is a forums,,so many person will read it,,not just you.maybe they have the same problem and still search the answer.
    thank you.
    -regards-
    Adek

  • Issues with basic video player. Help?

    Hi all, I've been working on making an extremely basic video player for my java class at school and everytime I run it I'm getting an error. I assume it's because of the video format. I've tried avi and mpg to no avail.
    The avi error is...
    Unable to handle format: DIVX, 320x240, FrameRate=30.0, Length=230400 44 extra bytes
      Unable to handle format: mpeglayer3, 22050.0 Hz, 0-bit, Mono, Unsigned, 8000.0 frame rate, FrameSize=4608 bits
    Failed to realize: com.sun.media.PlaybackEngine@c5495e
    Error: Unable to realize com.sun.media.PlaybackEngine@c5495e
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerExceptionand the mpg error is...
    run:
    Exception in thread "JMF thread: com.sun.media.PlaybackEngine@c5495e[ com.sun.media.PlaybackEngine@c5495e ] ( configureThread)" java.lang.NegativeArraySizeException
            at com.ibm.media.parser.video.MpegParser.parsePacket(MpegParser.java:1513)
            at com.ibm.media.parser.video.MpegParser.mpegSystemParseBitstream(MpegParser.java:1226)
            at com.ibm.media.parser.video.MpegParser.initTrackSystemStream(MpegParser.java:673)
            at com.ibm.media.parser.video.MpegParser.getTracks(MpegParser.java:333)
            at com.sun.media.BasicSourceModule.doRealize(BasicSourceModule.java:180)
            at com.sun.media.PlaybackEngine.doConfigure1(PlaybackEngine.java:229)
            at com.sun.media.PlaybackEngine.doConfigure(PlaybackEngine.java:193)
            at com.sun.media.ConfigureWorkThread.process(BasicController.java:1370)
            at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)The source code is... (excluding the main class)
    import javax.swing.*;
    import java.awt.*;
    import javax.media.*;
    import java.awt.event.*;
    import java.net.*;
    public class MediaPanel
        JFrame frame = new JFrame();
        Player player = null;
        public MediaPanel()
            try {
                URL url = new URL("file",null,"H:\\test.mpg");
                //URL url = new URL("file",null,"H:\\test.avi");
                player = Manager.createRealizedPlayer(url);
            catch (Exception e) {};
            Component control = player.getVisualComponent();
            frame.getContentPane().add( control, BorderLayout.CENTER);
            frame.pack();
            frame.setVisible(true);
            player.start();
    }This is the first time I've made anything that plays video and I took the basis for my code from this thread http://forum.java.sun.com/thread.jspa?threadID=5269983&tstart=30 so for all I know it could be a problem with the code and not the video file.
    Also, the page of supported formats would probably answer my question ( http://java.sun.com/products/java-media/jmf/2.1.1/formats.html ) except I don't know much about video formats and that table doesn't make much sense to me. Any help or a point in the right direction is awesome. Thanks!

    I have the same problem. I am new to JMF and I can not get an avi or a .mov to play. In fact, I can't find any movie file that actually does work. I am trying VERY simple code just to get this to work. Baby steps:
    javax.media.Player player = javax.media.Manager.createPlayer(ml);
              player.realize();
              java.awt.Component mediaViewer = player.getVisualComponent();ml is a MediaLocator from an url.
    I get the error:
    Unable to handle format: RGB, 200x200, FrameRate=30.0, Length=0, 8-bit, Masks=-1:-1:-1, LineStride=200, Flipped
    Failed to realize: com.sun.media.PlaybackEngine@d3c65d
    Error: Unable to realize com.sun.media.PlaybackEngine@d3c65d

  • J2ME MIDP devices VIDEO player

    Hi friends
    There is or is possible a Java aplication for Celular devices like Motorolas V3 a video player execute the Mp4 and 3gp videos in (/a/mobile/videos) celular.
    like the application slide show with do work jpg files
    thanks

    I think there's at least a couple of small application examples in the java tutorials; why don't you start looking at:
    http://java.sun.com/docs/books/tutorial/sound/
    Just a clue.

Maybe you are looking for