How to play movie on different resolution??

I have mpg movie that it's resolution is 800*600,How to display this movie on 600*600 JPanel,and it's full JPanel,in other words the movie change aspect ratio on playing,but movie source file not change.
Thanks

tom_zhang wrote:
My code:Please use code tags when posting code, code snippets, HTML/XML or input/output. To do that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.
This code is untested, I do not have JMF installed at the moment, so cannot even compile it.
import java.awt.*;
import java.io.IOException;
import javax.media.*;
import javax.media.bean.playerbean.MediaPlayer;
import javax.swing.*;
public class Test22{
     private static final long serialVersionUID = 1L;
     public static void main(String[] args) {
          new PW3();
class PW3 extends JFrame implements ControllerListener{
     private static final long serialVersionUID = 0L;
     MediaPlayer player;
     MediaLocator mediaLocate;
     Container con;
     Component visual,control;
     JPanel jPanel;
     PW3(){
          con = this.getContentPane();
          //this.setBounds(100, 100, 576, 288);
          // For goodness sake, you were advised not to do this on
          // the first sentence of the first post!
          //con.setLayout(null);
          FileDialog fd = new FileDialog(this,"Select File",FileDialog.LOAD);
          fd.setVisible(true);
          String filename = fd.getDirectory()+fd.getFile();
          jPanel = new JPanel(new BorderLayout());
          player = new MediaPlayer();
          player.addControllerListener(this);
          System.out.println("filename is:"+filename);
          player.setMediaLocation("file:"+filename);
          player.realize();
          // Preferred size is more reliable than any 'bounds', especially after you ..
          jPanel.setPreferredSize(new Dimension(500, 500));
          con.add(jPanel);
          // ..call pack
          pack();
          this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          this.setVisible(true);
     public void controllerUpdate(ControllerEvent e){
          if(e instanceof RealizeCompleteEvent){
               if((visual = player.getVisualComponent())!=null){
                    jPanel.add(visual,BorderLayout.CENTER);
               if((control = player.getControlPanelComponent())!=null){
                    jPanel.add(visual,BorderLayout.SOUTH);
               player.start();
          this.validate();
          this.setVisible(true);
}

Similar Messages

  • How to play movies with different ext like wmv and...

    need to know how to play movies with various ext like wmv..mpeg..vlc on e7

    If the phone's built-in video player does not handle those formats, your option are:
    - find some other video player app that does, or
    - convert the videos to a supported format
    The E7 supported video formats are listed on, e.g., this page:
    https://www.developer.nokia.com/Devices/Device_specifications/E7-00/
    Hit "Expand all" and scroll down to "Video Playback Formats".

  • How to play movies without wifi access

    How to play movies without wifi access

    Not sure what you mean by this?  If you've downloaded a Movie, then it will be installed on your iPad (if downloaded to your iPad of course) and it will play from the iPad as is.
    If this doesn't help, please provide more info about what you are trying to do.
    Regards,
    Steve

  • HT3775 how to play movie with mp4

    how to play movie with mp4

    Sorry, but I for one do not understand what it is you're trying to accomplish. Can you please explain in more detail?

  • How to Play Movies Sequentially

    I want to create about ten twenty second movies and then have them play sequentially. 
    The movies are only slightly different from each other.  I don't want to make a movie that is two minutes long though.  I want the movies to play in a different order on each page.
    There has got to be a million ways of doing that, but what is the easiest way.
    You can watch one of my ten second clips here:
    http://www.newfranchise.info/Flash/Register.html

    The FLVplayback component can have several different video players "inside it." Look up the activeVideoPlayerIndex and visibleVideoPlayerIndex properties and how to work with those in the help files.
    I'm not sure how many you can cram in there, but I know we have used up to nine.
    Then you can listen for the complete events and then play the next bit.

  • How to play movies from Accer DD Hard Drive

    I've had my computer for less then 2 weeks and i haven't been able to install all of the major apps in order for certain things to run on my computer. How do i play movies from my external hard drive. I keep having a pop up on saying "QuickTime Player can't open "Bad Grandpa.avi". To see if additional software is available that will enable QuickTime Player to open the movie, click Tell Me More." I have installed QuickPlayer 7 but i am still recieving that pop up message. I have an Accer DD Hard drive. 

    AVI, a windows formatted move. can't be played by QT. Toe AVI's on your mac see:
    http://www.iskysoft.com/topic-snow-leopard/how-to-play-avi-with-quicktime-on-mac .html

  • How to play MOV files inside Windows Media Center Edition

    I've installed QT Pro, but am not able to play MOV files inside Windows Media Center Edition (MCE). Under "My Videos" from the MCE main interface, I can see the files, but once selected, error message indicates unknown/unplayable file type.
    How do I get my MOV files to play inside Windows MCE??
    Marc

    Quote from: cosmosk on 05-April-05, 22:29:47
    I don't use MSI's MC application so I can't directly answer your question.
    However both Win DVD 6 and PowerDVD6 play them just fine by launching the ts.ifo file.
    Yes, I know that, but that means that I should use at least two applications. I need only one front end to launch all my media files, inluding ripped DVD files, not as separate VOBs but as whole movies decribed in IFO files.
    Kiero

  • Save several movies in different resolution in one go

    Hi everyone
    With Quicktime 7 there is an option to export an existing movie and save it with a different resolution such as 1280x840 to 640x480 Pixels etc.! Is there a possibility to make these changes to several files without repeating them for each and every movie (over 100 files)? Maybe with the help of AppleScript?
    Thanks for your help.

    Compress QuickTime Using Most Recent Settings (from Automator).
    The action only works on files (not folders of files). It would use the most recent QuickTime Player Pro export settings.
    Export a "dummy" file (say 30 seconds) from QuickTime Player Pro to your destination dimensions, codec and settings. The Automator action will "remember" those settings and use them in its action.
    Once done with those settings export the dummy file again using different settings and Automator will adjust to the new settings (if saved as a Workflow or Application).

  • How to play movie file using java tv

    hi,
    i am trying to play movie file(.mov or mpg or mp3) using java tv in linux plotform and also using jmf jar.
    problem is while running appear black screen and getting exception or errors like
    Unable to handle format: ima4, 480x320, FrameRate=25.0, Length=460800 0 extra bytes
    Thank in adv

    Well...
    I don't know how to load and play a video with JavaTV. But I've seen some posts telling that .mpg files aren't accepted by the JavaTV.
    Some people said that I had to use .avi files and these .avi files, if they were converted from a .mpg file, must had been converted with the Cinepack technology, but I don't know how to do this.
    If you find out how to load and play a video, I'd like to know, please send me an email or access my page and post there in the comments, so I can continue doing my application with a video.
    []'s
    Cauane B.S.
    Computer Science
    CNPq Researcher - TVDi
    http://cauanebs.blogspot.com
    UCPel - Pelotas - RS

  • How to play movies of AVI format in Nokia 5610

    Hey guys!!!!
    Can any on tell me how to play AVI format videos in Nokia 5610.
    and which converter do i need to download so as to play the videos and which format videos does this phone support?
    Thank you
    Rajat Allen

    U can't Play Avi Videos In Nokia 5610 , Avi video Can Only Play By Softwares Named Divx, Smartmovie e.t.c and These Software are not Available For S40 Handsets.
    Ur Nokia 5610 supports 3gp and Mp4 Videos .
    Just downlaod Nokia Video Manger from www.nokia.com/videos and Convert ur Videos To Mp4 Format and The U can Play Those Videos.
    Message Edited by farhan1989 on 18-Apr-2008 11:51 AM
    Nokia 5530 Xpress Music RM-504
    v30.0.009
    31-5-10

  • How to play movie immediately?

    I'd like to create a project with no theme--i.e., have my movie start up immediately (and loop). Is there a way to do this? If it matters, I'm exporting from iMovie…
    Thanks!
    Mark

    (1) I created a .dv movie from iMovie
    (2) I created a new project
    (3) I switched to view as "map"
    (I see two boxes, one the "drag here…" that points to a second box that contains the theme)
    (4) I drag the movie to that "drag here" box (and it shows up)
    (5) I select that box and select "loop"
    (6) I save as disk image
    (when saving, I see the theme being created)
    (7) I double click the disk image, mounting it
    (8) I launch DVD Player and it starts playing the theme (no "start" button appears).
    (9) If I press the "play" button, the movie starts (and loops)
    Did I miss a step? Do you see different things than I do?
    Thanks!
    Mark

  • How to play movies in player NOT in webpage?

    Quick question. I am used to windows media player to play and view movies. I liked how I could play the movies in the player that resided on top of other web pages while I could still browse.
    I now have an iPod and this has forced me to make use of Quicktime. I like it - but one little function I HATE.
    I will click to play a movie, then it opens to play it in a webpage type of media player.
    Is there anyway to disable this and force the player to do it like the windows media player does?
    Please help when you can!

    What model Mac are you using?  The version of DVD Player in OS 9.2.2 uses a software-decoding scheme for MPEG content, and I think it recommends a 400 MHz G3 processor or faster.  The beige and B&W G3s that had the Build-to-Order DVD-ROM drive used MPEG decoder chips, so Apple's DVD Player 1.x was designed for hardware decoding.  I've successfully watched DVD movies on older beige G3s (266 MHz and 300 MHz) running OS 9.2.2 with a patched version of DVD Player 2.7, but their Radeon graphics cards made up for their slower processor speeds.

  • How to play movie in sync in Logic Pro X 10.0.6 from FCPX 10.1.1

    Hi Guys
    New to Logic Pro X (although I've used Soundtrack Pro a lot in the past). I export XML from FCPX, and then I import the FCPX XML into Logic Pro X. However, the 'movie' to time my sound effects and queue music to etc is mostly frozen. How can I get the movie from FCPX into Logic Pro X in sync, so I can refer to it as a queue for bringing in music etc?
    After importing the FCPX XML the 'open movie' (I opened a default master file that I'd shared/exported from FCPX) the movie that played in the popup was slightly out of sync.
    Warm regards

    Hi Guys
    New to Logic Pro X (although I've used Soundtrack Pro a lot in the past). I export XML from FCPX, and then I import the FCPX XML into Logic Pro X. However, the 'movie' to time my sound effects and queue music to etc is mostly frozen. How can I get the movie from FCPX into Logic Pro X in sync, so I can refer to it as a queue for bringing in music etc?
    After importing the FCPX XML the 'open movie' (I opened a default master file that I'd shared/exported from FCPX) the movie that played in the popup was slightly out of sync.
    Warm regards

  • How to play movie clips for a certain amount of time only

    Hello everyone, I think I have a relatively basic question here but I can't figure it out. I have a movie clip loaded using action script 3 at the start of my animation, I want ito to end at the 120th frame. But I can't use the stop(); command because it will also stop the rest of my animations from the 121st frame onwards. So my problem is, how can I stop the movie clip without stopping the rest of my animations?
    Thank you in advance!

    I don't think I have codes that load the swf, but I've sent you the code that I would like to stop. Thanks!

  • How do i move between different email accounts?

    I would like to move between 3 email accounts on my Ipad, is there a way without going back into settings?

    Example of 3 different accounts

Maybe you are looking for